Cuihua Code Reviewer
by @supermario11
AI-powered code review assistant for OpenClaw agent developers. Automatically analyzes code quality, detects security vulnerabilities, performance issues, an...
clawhub install cuihua-code-reviewerπ About This Skill
name: code-reviewer description: | AI-powered code review assistant for OpenClaw agent developers. Automatically analyzes code quality, detects security vulnerabilities, performance issues, and provides actionable improvement suggestions. Built specifically for AI agent code with a focus on safety, best practices, and maintainability.
metadata: openclaw: requires: bins: - git env: [] primaryEnv: null version: "1.0.0" author: "ηΏ θ± (ClawHub Pioneer)" license: "MIT" tags: - code-quality - security - development - ai-agents - best-practices capabilities: - Multi-language support (JavaScript, TypeScript, Python, Go, Rust) - Security vulnerability detection - Performance issue identification - Code smell detection - Best practices validation - Markdown report generation
code-reviewer - AI Code Review Assistant π
> Built for AI agent developers who care about code quality.
An intelligent code review assistant that analyzes your codebase and provides detailed, actionable feedback on:
π― Why code-reviewer?
When building AI agents with OpenClaw, code quality matters more than ever:
code-reviewer understands these unique challenges and provides tailored advice.
π Quick Start
Review a single file
Tell your agent:
> "Review the code quality of src/agent.js"
Review an entire directory
> "Analyze all Python files in ./skills/my-skill/"
Get a detailed report
> "Generate a full code review report for the current project"
π What Gets Checked
Security π‘οΈ
Performance β‘
Code Quality π§Ή
Best Practices β¨
π¨ Output Format
Terminal Summary
π Code Review Summary
βββββββββββββββββββββββββββββββββββββββπ Files analyzed: 12
β οΈ Issues found: 8
Severity Breakdown:
π΄ Critical: 1
π High: 2
π‘ Medium: 3
π’ Low: 2
Top Issues:
1. [CRITICAL] SQL injection vulnerability in query.js:45
2. [HIGH] Hardcoded API key in config.js:12
3. [HIGH] Memory leak in worker.js:78
π‘ Run with --detailed for full report
Detailed Markdown Report
Saved to code-review-report.md:
# Code Review ReportGenerated: 2026-03-24 20:30 PDT
Project: my-agent-project
Files Reviewed: 12
Total Issues: 8
π΄ Critical Issues (1)
1. SQL Injection Vulnerability
File: src/query.js:45
Severity: CRITICALIssue:
Unsanitized user input directly interpolated into SQL query.
Code:
\\\javascript
const query = SELECT * FROM users WHERE id = ${userId};
\\\
Impact:
Allows arbitrary SQL execution. Attacker could read/modify database.
Fix:
Use parameterized queries:
\\\javascript
const query = 'SELECT * FROM users WHERE id = ?';
db.query(query, [userId]);
\\\
π High Priority Issues (2)
2. Hardcoded API Key
File: config.js:12
...
βοΈ Configuration
Create .codereview.json in your project root for custom rules:
{
"severity": {
"min": "medium",
"failOnCritical": true
},
"ignore": {
"files": ["*.test.js", "dist/*"],
"rules": ["magic-numbers"]
},
"languages": ["javascript", "python"],
"output": {
"format": "markdown",
"path": "./reports/code-review.md"
}
}
π§ How It Works
1. Parse - Reads your code files using OpenClaw's read tool
2. Analyze - Uses AI to understand code structure and intent
3. Detect - Applies security, performance, and quality rules
4. Report - Generates actionable findings with fix suggestions
5. Learn - Adapts to your codebase patterns over time
π Features
Multi-Language Support
Smart Context Awareness
Understands your project type:
Incremental Reviews
Reviews only changed files in Git: > "Review my latest changes"
Team Integration
Share review reports with your team:
π‘ Usage Examples
Example 1: Pre-commit Review
Agent: Review all staged files before I commit
Output:
β
All clear! No critical issues found.
π‘ 3 minor suggestions:
- Consider adding error handling in auth.js:23
- Variable 'temp' could use a better name in utils.js:56
- Add JSDoc for function processData() in api.js:12
Example 2: Security Audit
Agent: Run a security audit on ./src/
Output:
π‘οΈ Security Audit Results
βββββββββββββββββββββββπ΄ 1 critical vulnerability found
π 2 high-risk issues detected
Details:
1. [CRITICAL] Command injection in exec.js
2. [HIGH] Sensitive data in logs
3. [HIGH] Missing input validation
π Full report: security-audit-2026-03-24.md
Example 3: Performance Check
Agent: Find performance bottlenecks in worker.js
Output:
β‘ Performance Analysis
βββββββββββββββββββββFound 3 optimization opportunities:
1. Line 45: O(nΒ²) loop - use Map for O(n)
2. Line 67: Sync file read blocks event loop
3. Line 89: Regex compiled in hot path
Estimated improvement: 85% faster
π Privacy & Security
π¦ Installation
Via ClawHub (Recommended)
clawhub install code-reviewer
Manual Installation
git clone https://github.com/your-username/code-reviewer
cd code-reviewer
clawhub publish .
π€ Contributing
Found a bug? Have a feature idea?
π License
MIT License - see LICENSE for details.
π Acknowledgments
Built with β€οΈ by ηΏ θ± for the OpenClaw community.
Special thanks to:
π Support
Made with πΈ by ηΏ θ± | ClawHub Pioneer