Code Review Skill for Openclaw

A professional-grade four-dimensional code review system designed to evaluate security, performance, quality, and maintainability in development workflows.

penghang1223
v1.0.0
Apr 1, 2026
0
606
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install oc-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 oc-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 Skill?

The Code Review Skill is a robust analysis engine built for the Openclaw Skills ecosystem. It provides a standardized framework for auditing source code through a multi-dimensional lens, ensuring that every line of code adheres to industry best practices. Whether you are reviewing a single file or a complex Pull Request, this skill automates the detection of security vulnerabilities, performance bottlenecks, and technical debt.

By leveraging specialized checklists and complexity analysis scripts, it empowers developers to maintain high standards across the codebase. It functions as an automated peer reviewer that not only identifies issues but also provides actionable refactoring suggestions and quantitative scoring to guide the merge process.

Code Review Skill Use Cases

  • Automating Pull Request (PR) reviews for GitHub and local Git repositories.
  • Conducting deep security audits to identify SQL injection, XSS, and authorization flaws.
  • Analyzing performance to detect N+1 query issues and memory leaks.
  • Evaluating code quality against SOLID, DRY, and KISS principles.
  • Assessing technical debt and maintainability through complexity metrics.

How Code Review Skill Works

  1. Code Acquisition: The skill fetches code from various sources including local files, Git diffs, GitHub PRs, or even external documentation like Feishu.
  2. Four-Dimensional Analysis: It runs a systematic audit against four core checklists: Security, Performance, Quality, and Maintainability.
  3. Scoring and Grading: Each dimension is rated on a 1-10 scale, and an overall average score is calculated to determine the production-readiness of the code.
  4. Report Generation: A detailed Markdown report is generated, documenting every finding with its location, severity, and impact.
  5. Decision Support: The process concludes with a clear recommendation: Approve, Request Changes, or Needs Discussion, prioritized by the top 3 critical fixes.

Code Review Skill Setup

To integrate this tool into your Openclaw Skills workspace, ensure your environment has access to the required Python analysis scripts.

# Navigate to your skill directory
cd ~/.openclaw/workspace/skills/code-review

# Run complexity analysis on a specific file
python3 scripts/analyze-metrics.py <target_file>

# Compare complexity between versions
python3 scripts/compare-complexity.py <original_file> <modified_file>

Code Review Skill Data Schema & Taxonomy

The skill organizes analysis data into a structured hierarchy to ensure clarity and consistency in reporting:

Data Component Description
Dimensions Security, Performance, Quality, Maintainability
Scoring Scale 1 (Dangerous) to 10 (Excellent)
Severity Levels Critical, Major, Minor, Suggestion
Templates Uses finding-template.md and checklist-*.md for standardized output
Metrics Cyclomatic complexity and cognitive complexity data via Python scripts

Code Review Skill Advanced Features

  • Comparative Complexity Analysis: Compare code metrics before and after changes to prevent technical debt regression.
  • Multi-Source Fetching: Native support for gh CLI, web scraping, and Feishu document integration.
  • Specialized Review Modes: Choose between Quick Review for hotfixes, Deep Review for core modules, and Security Audit for compliance-heavy changes.
  • Code Highlights: Automatically identifies and documents positive patterns and best practices worth sharing with the team.
  • Automated PR Statistics: Generates diff statistics including lines added/removed and file impact analysis.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*