> 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:
When building AI agents with OpenClaw, code quality matters more than ever:
code-reviewer understands these unique challenges and provides tailored advice.
Tell your agent:
> "Review the code quality of src/agent.js"
> "Analyze all Python files in ./skills/my-skill/"
> "Generate a full code review report for the current project"
🔍 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
Saved to code-review-report.md:
# Code Review Report
**Generated**: 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**: CRITICAL
**Issue**:
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`
...
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"
}
}
read toolUnderstands your project type:
Reviews only changed files in Git:
> "Review my latest changes"
Share review reports with your team:
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
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
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
clawhub install code-reviewer
git clone https://github.com/your-username/code-reviewer
cd code-reviewer
clawhub publish .
Found a bug? Have a feature idea?
MIT License - see LICENSE for details.
Built with ❤️ by 翠花 for the OpenClaw community.
Special thanks to:
Made with 🌸 by 翠花 | ClawHub Pioneer
共 1 个版本