reviewing-code
1
总安装量
1
周安装量
#51246
全站排名
安装命令
npx skills add https://github.com/mileycy516-stack/skills --skill reviewing-code
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
windsurf
1
zencoder
1
Skill 文档
Code Review Excellence
Transform code reviews from gatekeeping to knowledge sharing through constructive feedback, systematic analysis, and collaborative improvement.
When to Use This Skill
- Reviewing pull requests and code changes
- Establishing code review standards for teams
- Mentoring junior developers through reviews
- Conducting architecture reviews
- Creating review checklists and guidelines
Workflow
- Context Gathering (2-3 mins): Read PR description, check CI status, understand requirements.
- High-Level Review (5-10 mins): Verify architecture, file organization, and testing strategy.
- Line-by-Line Review (10-20 mins): Check logic, security, performance, and maintainability.
- Summary & Decision (2-3 mins): Summarize findings, decision (Approve/Change Request), and offer pairing.
Instructions
1. The Review Mindset
Goals: Catch bugs, ensure maintainability, share knowledge, enforce standards. Anti-Goals: Show off, nitpick formatting (use linters), block unnecessarily.
2. Effective Feedback
- Specific & Actionable: Instead of “This is wrong”, say “This could cause a race condition… consider a mutex.”
- Educational: “Have you considered the Repository pattern? It helps with testing.”
- Non-blocking (Nits): “[nit] Consider
userCountfor clarity.”
3. Review Scope Checklist
Logic & Correctness:
- Edge cases handled?
- Off-by-one errors?
- Null/undefined checks?
- Race conditions?
Security:
- Input validation?
- SQL injection / XSS risks?
- Sensitive data exposure?
Performance:
- N+1 queries?
- Unnecessary loops?
- Memory leaks?
Maintainability:
- Clear naming?
- Single responsibility functions?
- No magic numbers?
4. Code Review Templates
PR Review Comment Template:
## Summary
[Brief overview]
## Strengths
- [Good patterns]
## Required Changes
ð´ [Blocking issue]
## Suggestions
ð¡ [Improvement idea]
## Questions
â [Clarification needed]
## Verdict
â
Approve / ð Request Changes
5. Language-Specific Patterns
Python:
- Avoid mutable default args (
def foo(items=[])). - Be specific with exceptions (
except ValueError, notexcept:). - Initialize mutable class attributes in
__init__.
TypeScript/JavaScript:
- Avoid
any. - Handle async errors properly (try/catch).
- React: Don’t mutate props directly methods.