From charon-fan-agent-playbook
Reviews pull requests and code changes for correctness, security, performance, code quality, testing, documentation, and maintainability using git diffs.
npx claudepluginhub zhaono1/agent-playbookThis skill is limited to using the following tools:
A comprehensive code review skill that analyzes pull requests and code changes for quality, security, maintainability, and best practices.
Performs code reviews covering quality, security, performance, testing, maintainability, and best practices. Use for pull requests, vulnerability checks, and improvement suggestions.
Reviews code changes, PRs, and diffs for security vulnerabilities, performance issues, correctness bugs, and maintainability problems with tables for issues and suggestions.
Performs lightweight ad-hoc code reviews on PRs, diffs, files, or commits across security, performance, correctness, and maintainability dimensions.
Share bugs, ideas, or general feedback.
A comprehensive code review skill that analyzes pull requests and code changes for quality, security, maintainability, and best practices.
This skill activates when you:
Get changed files
git diff main...HEAD --name-only
git log main...HEAD --oneline
Get the diff
git diff main...HEAD
Understand project context
Use this structured format for review feedback:
# Code Review
## Summary
Brief overview of the changes (2-3 sentences).
## Issues by Severity
### Critical
Must fix before merge.
- [ ] **Issue Title**: Description with file:line reference
### High
Should fix before merge unless there's a good reason.
- [ ] **Issue Title**: Description with file:line reference
### Medium
Consider fixing, can be done in follow-up.
- [ ] **Issue Title**: Description with file:line reference
### Low
Nice to have improvements.
- [ ] **Issue Title**: Description with file:line reference
## Positive Highlights
What was done well in this PR.
## Suggestions
Optional improvements that don't require immediate action.
## Approval Status
- [ ] Approved
- [ ] Approved with suggestions
- [ ] Request changes
| Issue | Pattern | Recommendation |
|---|---|---|
| Hardcoded secrets | const API_KEY = "sk-" | Use environment variables |
| SQL injection | \"SELECT * FROM...\" + user_input | Use parameterized queries |
| XSS vulnerability | innerHTML = user_input | Sanitize or use textContent |
| Missing auth check | New endpoint without @RequireAuth | Add authentication middleware |
| Issue | Pattern | Recommendation |
|---|---|---|
| N+1 query | Loop with database call | Use eager loading or batch queries |
| Unnecessary re-render | Missing dependencies in useEffect | Fix dependency array |
| Memory leak | Event listener not removed | Add cleanup in useEffect return |
| Inefficient loop | Nested loops O(n²) | Consider hash map or different algorithm |
| Issue | Pattern | Recommendation |
|---|---|---|
| Duplicate code | Similar blocks repeated | Extract to function |
| Magic number | if (status === 5) | Use named constant |
| Long function | Function >50 lines | Split into smaller functions |
| Complex condition | `a && b |
| Issue | Pattern | Recommendation |
|---|---|---|
| No tests | New feature without test file | Add unit tests |
| Untested edge case | Test only covers happy path | Add edge case tests |
| Brittle test | Test relies on implementation details | Test behavior, not implementation |
| Missing assertion | Test doesn't assert anything | Add proper assertions |
unknown instead of any for untyped valuesinterface for public APIs, type for unionsas assertions when possibleuseCallback/useMemo appropriately (not prematurely)Confirm the following:
Run the review checklist script:
python scripts/review_checklist.py <pr-number>
references/checklist.md - Complete review checklistreferences/security.md - Security review guidelinesreferences/patterns.md - Common patterns and anti-patterns