CodeReview for Openclaw

An AI-powered code review assistant that combines local static analysis with deep LLM reasoning to identify bugs, security flaws, and performance bottlenecks.

theshadowrose
v1.0.4
Mar 10, 2026
0
1.7k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install code-review-sr

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 code-review-sr 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 CodeReview?

CodeReview is a sophisticated analysis tool designed to bridge the gap between instant linting and deep human-level architectural review. By integrating into your development workflow, this tool provides a dual-layered approach to code quality. It leverages the Openclaw Skills framework to offer developers a seamless way to audit their repositories for vulnerabilities, logical errors, and stylistic inconsistencies without manual overhead.

Whether you are working locally with Ollama or utilizing cloud-based providers like Anthropic and OpenAI, CodeReview ensures that your code is scrutinized through both pattern-matching and contextual reasoning. Its ability to run without external dependencies makes it an ideal choice for teams prioritizing performance and security in their CI/CD pipelines or local IDE environments.

CodeReview Use Cases

  • Auditing new pull requests for security vulnerabilities like SQL injection or hardcoded secrets.
  • Improving legacy codebases by identifying deeply nested logic and redundant conditions.
  • Benchmarking code quality across large directories using the automated scoring system.
  • Ensuring consistent coding standards and performance best practices across polyglot projects.
  • Providing an offline-first safety net with local regex analysis when AI APIs are unavailable.

How CodeReview Works

  1. The skill initiates a local pre-pass using regex-based pattern matching to instantly identify high-risk syntax and common security anti-patterns.
  2. Source code and local findings are aggregated and prepared for the AI engine, with intelligent file truncation to maintain token efficiency.
  3. The tool communicates with your chosen provider (Anthropic, OpenAI, or Ollama) to perform a deep-reasoning analysis of logic and architecture.
  4. A comprehensive JSON report is generated, featuring a quality score, categorized issues, and actionable improvement suggestions.
  5. If the AI service is unreachable, the system gracefully degrades to provide the results of the local static analysis alone.

CodeReview Setup

To integrate this into your project, ensure you have Node.js installed. Set your environment variables for your preferred AI provider to get the most out of Openclaw Skills:

export ANTHROPIC_API_KEY="your-api-key"
# Or for OpenAI
export OPENAI_API_KEY="your-api-key"

Initialize the reviewer in your script:

const { CodeReview } = require('./src/code-review');
const reviewer = new CodeReview({ model: 'anthropic/claude-haiku-4-5' });
const result = await reviewer.review('./src/file.js');

CodeReview Data Schema & Taxonomy

The skill produces a structured JSON output for easy integration into other Openclaw Skills or reporting tools:

Field Description
score A 1-10 quality metric based on findings.
issues Array containing severity, line, type, and message.
suggestions List of actionable steps to fix identified problems.
summary A high-level overview of the code's health.
aiPowered Boolean indicating if LLM analysis was successful.
totalIssues Numeric count of all identified problems.

CodeReview Advanced Features

  • Multi-model support including Anthropic, OpenAI, and local Ollama instances for private, air-gapped analysis.
  • Concurrent directory processing with configurable batch sizes to handle large-scale repositories efficiently.
  • Zero-dependency architecture ensuring the skill is lightweight, secure, and easy to audit.
  • Automatic file truncation at 8,000 characters to prevent token limit errors during deep reviews.
  • Extensible pattern matching for local analysis that works across multiple programming languages including Python, Go, Rust, and TypeScript.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*