Code Review Assistant for Openclaw

An automated code review assistant that analyzes changes, pull requests, and files for quality, security, and style violations.

michealxie001
v1.0.0
Apr 1, 2026
0
837
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install openclaw-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 openclaw-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 Assistant?

The Code Review assistant is a comprehensive tool designed to streamline the software development lifecycle by providing instant feedback on code changes. As part of the Openclaw Skills library, it employs multi-level analysis and AST parsing to detect complex issues that standard linters might miss. It serves as a tireless peer reviewer, ensuring that every commit adheres to high standards of maintainability and safety.

By integrating directly with Git, this skill helps teams identify technical debt and security vulnerabilities early in the process. Whether you are working on a solo project or a large-scale enterprise application, using Openclaw Skills like this one ensures consistent code quality across Python and JavaScript environments.

Code Review Assistant Use Cases

  • Pre-commit Validation: Automatically scan staged changes to catch errors before they are committed to the repository.
  • CI/CD Pipeline Integration: Gate pull requests by running automated reviews in GitHub Actions or other CI tools.
  • Security Auditing: Identify hardcoded keys, SQL injection risks, and dangerous function usage like eval() or exec().
  • Technical Debt Assessment: Monitor cyclomatic complexity and function length to maintain codebase health.

How Code Review Assistant Works

  1. Input Selection: The skill accepts various inputs including individual files, staged Git changes, specific commit hashes, or raw diff patches.
  2. Static & AST Analysis: It parses the source code into an Abstract Syntax Tree (AST) to perform deep structural analysis beyond simple regex matching.
  3. Rule Application: The engine runs the code against four primary check categories: Quality, Best Practices, Security, and Style.
  4. Report Generation: Feedback is compiled into either a human-readable Markdown summary or a machine-readable JSON report for downstream automation.
  5. Execution Control: Based on the severity of findings and configuration, the skill returns specific exit codes to signal success or failure to the terminal or CI environment.

Code Review Assistant Setup

To start using this member of the Openclaw Skills collection, navigate to your project and use the following commands:

# Review a specific file
python3 scripts/main.py review file src/main.py

# Review all staged changes in Git
python3 scripts/main.py review staged

# Export a JSON report for CI/CD usage
python3 scripts/main.py review file src/*.py --format json --output report.json

Code Review Assistant Data Schema & Taxonomy

The skill can be customized using a .code-review.json file in the project root. The data structure follows this taxonomy:

Key Description Default
max_complexity Maximum allowed cyclomatic complexity 10
max_function_lines Maximum lines per function 50
ignore List of glob patterns to exclude from review ["tests/**", "node_modules/**"]
severity Minimum reporting level (info, warning, error) "warning"

Code Review Assistant Advanced Features

  • Custom Complexity Thresholds: Fine-tune the analyzer to match your team's specific tolerance for code nesting and logic density.
  • Git Hook Integration: Leverage native Git hooks to enforce a fail-on-error policy locally, preventing low-quality code from reaching the server.
  • Multi-language Support: Seamlessly switch between Python PEP 8 auditing and JavaScript/TypeScript best practice enforcement.
  • Automated Security Scanning: Detects sensitive patterns like api_key, token, and secret within the workflow of Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*