aif-review
9
总安装量
9
周安装量
#33410
全站排名
安装命令
npx skills add https://github.com/lee-to/ai-factory --skill aif-review
Agent 安装分布
gemini-cli
9
claude-code
9
github-copilot
9
codex
9
kimi-cli
9
amp
9
Skill 文档
Code Review Assistant
Perform thorough code reviews focusing on correctness, security, performance, and maintainability.
Behavior
Without Arguments (Review Staged Changes)
- Run
git diff --cachedto get staged changes - If nothing staged, run
git difffor unstaged changes - Analyze each file’s changes
With PR Number/URL
- Use
gh pr view <number> --jsonto get PR details - Use
gh pr diff <number>to get the diff - Review all changes in the PR
Review Checklist
Correctness
- Logic errors or bugs
- Edge cases handling
- Null/undefined checks
- Error handling completeness
- Type safety (if applicable)
Security
- SQL injection vulnerabilities
- XSS vulnerabilities
- Command injection
- Sensitive data exposure
- Authentication/authorization issues
- CSRF protection
- Input validation
Performance
- N+1 query problems
- Unnecessary re-renders (React)
- Memory leaks
- Inefficient algorithms
- Missing indexes (database)
- Large payload sizes
Best Practices
- Code duplication
- Dead code
- Magic numbers/strings
- Proper naming conventions
- SOLID principles
- DRY principle
Testing
- Test coverage for new code
- Edge cases tested
- Mocking appropriateness
Output Format
## Code Review Summary
**Files Reviewed:** [count]
**Risk Level:** ð¢ Low / ð¡ Medium / ð´ High
### Critical Issues
[Must be fixed before merge]
### Suggestions
[Nice to have improvements]
### Questions
[Clarifications needed]
### Positive Notes
[Good patterns observed]
Review Style
- Be constructive, not critical
- Explain the “why” behind suggestions
- Provide code examples when helpful
- Acknowledge good code
- Prioritize feedback by importance
- Ask questions instead of making assumptions
Examples
User: /aif-review
Review staged changes in current repository.
User: /aif-review 123
Review PR #123 using GitHub CLI.
User: /aif-review https://github.com/org/repo/pull/123
Review PR from URL.
Integration
If GitHub MCP is configured, can:
- Post review comments directly to PR
- Request changes or approve
- Add labels based on review outcome
Tip: Context is heavy after code review. Consider
/clearor/compactbefore continuing with other tasks.