Code Review for Openclaw

An AI-powered automated code review tool driven by Gemini to analyze Python codebases, catch bugs, suggest fixes, and debug errors dynamically.

stigg86
v1.0.0
Jun 4, 2026
0
704
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install bud-code-review

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install bud-code-review using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Code Review?

The Code Review skill is a powerful, AI-driven assistant designed to inspect and analyze your codebase. Powered by Google's Gemini API, this tool scans entire projects, single files, or inline code snippets to catch critical bugs, performance bottlenecks, race conditions, and security issues before they hit production. It serves as an essential utility within the ecosystem of Openclaw Skills, giving developers immediate feedback on code health.

By leveraging parallel execution, the tool scales efficiently to handle large directories, providing developers with clear, actionable insights categorized by severity. It goes beyond simple linting by interpreting the developer's intent, offering tailored recommendations for trading bots, APIs, databases, and machine learning models.

Code Review Use Cases

  • Pre-Commit Auditing: Automatically run reviews on modified files or directories before merging code to catch bugs early.
  • Automated Bug Hunting: Quickly scan complex codebases to detect subtle race conditions, concurrency issues, and unhandled errors.
  • Refactoring & Code Modernization: Receive immediate, AI-suggested refactoring fixes and best-practice recommendations for legacy Python files.
  • Targeted Codebase Debugging: Provide specific error traces alongside code blocks to pinpoint the root cause of an issue.
  • Domain-Specific Verification: Conduct deep evaluations of security protocols in APIs, database atomicity, or trading logic.

How Code Review Works

  1. Codebase Discovery: The skill scans the targeted directory recursively to identify all applicable files (primarily Python .py files).
  2. Contextual Analysis: It securely packages and sends each file to the Gemini API using optimized, domain-specific evaluation prompts.
  3. Parallel Execution: Files are processed concurrently to deliver rapid feedback without bottlenecking your development loop.
  4. Report Generation & Classification: Findings are aggregated into a structured, color-coded report highlighting Critical errors (e.g., security risks), Important issues (e.g., unhandled API responses), and General suggestions (e.g., best practices).

Code Review Setup

Prerequisites

  • Python 3.8 or higher
  • A Gemini API key (obtainable for free from Google AI Studio)
  • The filelock library for managing concurrent state files

Step-by-Step Installation

  1. Install the required file locking dependency:
pip install filelock
  1. Retrieve your Gemini API key from the Google AI Studio console.

  2. Configure your API key by adding it to your TOOLS.md file:

GEMINI_API_KEY=your_key_here
  1. Alternatively, you can export the key directly to your environment variables:
export GEMINI_API_KEY='your_key_here'

Once configured, this addition to your Openclaw Skills is ready to use immediately.

Code Review Data Schema & Taxonomy

The Code Review skill organizes its analysis by evaluating project files and generating a priority-ranked taxonomy of findings. This data-driven model maps specific risks to targeted files.

Report Classification Schema

Severity Level Color Code Target Issues
Critical Red Security vulnerabilities, race conditions, data loss risks, critical logic flaws.
Important Yellow Unhandled exceptions, missing API retries, incorrect error-handling structures.
Suggestions Green Readability, maintainability, architectural best practices, locking strategies.

Focus Area Schema

Application Domain Key Analytical Targets
Trading Bots Concurrent state access, atomic order logic, stale order checks, risk calculations.
APIs Authentication token lifetimes, retry backoff algorithms, strict timeout behavior.
State/Database JSON corruption prevention, atomic writes, concurrent access controls.
ML/AI Lookahead bias in time-series data, model overfitting patterns, feature leaks.

Code Review Advanced Features

  • Targeted Domain Analysis: Customizes feedback patterns dynamically depending on the code purpose, such as checking trading bots for concurrency issues or APIs for rate-limiting mitigations.
  • High-Performance Parallel Processing: Executes multiple file scans simultaneously, dramatically reducing analysis times on larger repositories.
  • Error & Snippet Isolation: Supports analyzing specific inline snippets or standalone files when full-directory scans are unnecessary.
  • Actionable Remediation: Generates highly context-specific, copy-pasteable bug fixes directly within the output report.
  • Robust Environment Compatibility: Seamlessly integrates into developer workflows using standardized environmental configurations across various Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*