--- name: code-review-playbook description: Use this skill when conducting or improving code reviews. Provides structured review processes, conventional comments patterns, language-specific checklists, and feedback templates. Use when reviewing PRs or standardizing review practices. version: 2.0.0 author: AI Agent Hub tags: [code-review, quality, collaboration, best-practices] context: fork agent: code-quality-reviewer user-invocable: false --- # Code Review Playbook This skill provides a comprehensive framework for effective code reviews that improve code quality, share knowledge, and foster collaboration. Whether you're a reviewer giving feedback or an author preparing code for review, this playbook ensures reviews are thorough, consistent, and constructive. ## Overview - Reviewing pull requests or merge requests - Preparing code for review (self-review) - Establishing code review standards for teams - Training new developers on review best practices - Resolving disagreements about code quality - Improving review processes and efficiency ## Code Review Philosophy ### Purpose of Code Reviews Code reviews serve multiple purposes: 1. **Quality Assurance**: Catch bugs, logic errors, and edge cases 2. **Knowledge Sharing**: Spread domain knowledge across the team 3. **Consistency**: Ensure codebase follows conventions and patterns 4. **Mentorship**: Help developers improve their skills 5. **Collective Ownership**: Build shared responsibility for code 6. **Documentation**: Create discussion history for future reference ### Principles **Be Kind and Respectful:** - Review the code, not the person - Assume positive intent - Praise good solutions - Frame feedback constructively **Be Specific and Actionable:** - Point to specific lines of code - Explain *why* something should change - Suggest concrete improvements - Provide examples when helpful **Balance Speed with Thoroughness:** - Aim for timely feedback (< 24 hours) - Don't rush critical reviews - Use automation for routine checks - Focus human review on logic and design **Distinguish Must-Fix from Nice-to-Have:** - Use conventional comments to indicate severity - Block merges only for critical issues - Allow authors to defer minor improvements - Capture deferred work in follow-up tickets --- ## Conventional Comments A standardized format for review comments that makes intent clear. ### Format ```