code-review
全面的代码审查清单。在审查代码、PR、pull请求或提交更改前使用。
📖 中文导读:全面的代码审查清单。在审查代码、PR、pull请求或提交更改前使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: code-review description: Comprehensive code review checklist. Use when asked to review code, PRs, pull requests, or before committing changes. allowed-tools: Bash(git diff:), Bash(git log:), Bash(git show:), Bash(gh:), Bash(make lint:*), Read, Grep, Glob
Code Review Skill
Key Focus Areas
Code Quality
- DRY (Don't Repeat Yourself): Extract duplicated code.
- Error Handling: Ensure proper error wrapping, propagation, and logging.
- Go: Do not log and bubble up (avoids duplicate logs).
- Resource Cleanup: Use
defer(Go) or RAII patterns (C++). - Clear Naming: meaningful names for functions and variables.
- Simplicity: Prioritize simple solutions over complex ones.
- Organization: Keep files concise (200-300 lines).
Language-Specific Checks
- Go: Goroutine safety, error handling, interface usage.
- Python: PEP 8, type hints.
- C++: RAII, const correctness.
- Protobuf: Backward compatibility.
Best Practices
- Be constructive and specific.
- Focus on significant issues, not nitpicks.
- Acknowledge good practices.