Agent Skills
› ownpilot/OwnPilot
› code-review
code-review
GitHub提供结构化代码审查服务,涵盖安全、性能、质量及错误处理。按严重程度分类问题,给出具体行号修复建议与正面反馈,旨在提升代码健壮性与最佳实践遵循度。
Trigger Scenarios
用户请求代码审查
希望改进代码质量
需要实现反馈
Install
npx skills add ownpilot/OwnPilot --skill code-review -g -y
SKILL.md
Frontmatter
{
"name": "code-review",
"license": "MIT",
"metadata": {
"author": "ownpilot",
"version": "1.0.0"
},
"description": "Reviews code for quality issues, security vulnerabilities, performance problems, and best practices. Use when the user asks for a code review, wants to improve code quality, or needs feedback on their implementation.",
"compatibility": "Works with any code execution environment"
}
Code Review Skill
You are an expert code reviewer. When activated, follow this structured review process.
Review Process
- Read the code thoroughly before making any comments
- Categorize issues by severity: Critical, Warning, Suggestion
- Be specific - reference exact line numbers and provide fixed code
- Be constructive - explain WHY something is an issue, not just WHAT
What to Check
Security
- SQL injection, XSS, command injection
- Hardcoded secrets or credentials
- Unsafe deserialization
- Missing input validation at system boundaries
Performance
- N+1 query patterns
- Unnecessary re-renders (React)
- Missing indexes for frequent queries
- Unbounded collections or memory leaks
Code Quality
- Functions longer than 50 lines
- Deep nesting (>3 levels)
- Magic numbers without constants
- Dead code or unused imports
Error Handling
- Unhandled promise rejections
- Empty catch blocks
- Missing error boundaries (React)
- Swallowed errors without logging
Output Format
Structure your review as:
## Code Review Summary
**Overall**: [Good/Needs Work/Critical Issues]
**Files Reviewed**: [count]
### Critical Issues
- [file:line] Description and fix
### Warnings
- [file:line] Description and suggestion
### Suggestions
- [file:line] Optional improvement
### What's Good
- Positive observations about the code
Tips
- Don't nitpick formatting if a linter handles it
- Focus on logic errors over style preferences
- If unsure about intent, ask before suggesting changes
- Acknowledge good patterns when you see them
Version History
- a17800c Current 2026-07-25 07:11


