Code review quality

From aAAaqwq/AGI-Super-Team · View interactive version

Code review quality is an AI agent skill from the GitHub repository aAAaqwq/AGI-Super-Team. Conduct context-driven code reviews focusing on quality, testability, and maintainability. Use when reviewing code, providing feedback, or establishing review practices.

How to use this skill

Skill file

Code Review Quality

<default_to_action>

When reviewing code or establishing review practices:

  1. PRIORITIZE feedback: šŸ”“ Blocker (must fix) → 🟔 Major → 🟢 Minor → šŸ’” Suggestion
  2. FOCUS on: Bugs, security, testability, maintainability (not style preferences)
  3. ASK questions over commands: "Have you considered...?" > "Change this to..."
  4. PROVIDE context: Why this matters, not just what to change
  5. LIMIT scope: Review < 400 lines at a time for effectiveness

Quick Review Checklist:

Critical Success Factors:

</default_to_action>

Quick Reference Card

When to Use

Feedback Priority Levels

| Level | Icon | Meaning | Action |

|-------|------|---------|--------|

| Blocker | šŸ”“ | Bug/security/crash | Must fix before merge |

| Major | 🟔 | Logic issue/test gap | Should fix before merge |

| Minor | 🟢 | Style/naming | Nice to fix |

| Suggestion | šŸ’” | Alternative approach | Consider for future |

Review Scope Limits

| Lines Changed | Recommendation |

|---------------|----------------|

| < 200 | Single review session |

| 200-400 | Review in chunks |

| > 400 | Request PR split |

What to Focus On

| āœ… Review | āŒ Skip |

|-----------|---------|

| Logic correctness | Formatting (use linter) |

| Security risks | Naming preferences |

| Test coverage | Architecture debates |

| Performance issues | Style opinions |

| Error handling | Trivial changes |


Feedback Templates

Blocker (Must Fix)

šŸ”“ **BLOCKER: SQL Injection Risk**

This query is vulnerable to SQL injection:

db.query(SELECT * FROM users WHERE id = ${userId})


**Fix:** Use parameterized queries:

db.query('SELECT * FROM users WHERE id = ?', [userId])


**Why:** User input directly in SQL allows attackers to execute arbitrary queries.

Major (Should Fix)

🟔 **MAJOR: Missing Error Handling**

What happens if `fetchUser()` throws? The error bubbles up unhandled.

**Suggestion:** Add try/catch with appropriate error response:

try {

const user = await fetchUser(id);

return user;

} catch (error) {

logger.error('Failed to fetch user', { id, error });

throw new NotFoundError('User not found');

}

Minor (Nice to Fix)

🟢 **minor:** Variable name could be clearer

`d` doesn't convey meaning. Consider `daysSinceLastLogin`.

Suggestion (Consider)

šŸ’” **suggestion:** Consider extracting this to a helper

This validation logic appears in 3 places. A `validateEmail()` helper would reduce duplication. Not blocking, but might be worth a follow-up PR.

Review Questions to Ask

Logic

Security

Testability

Maintainability


Agent-Assisted Reviews

// Comprehensive code review
await Task("Code Review", {
  prNumber: 123,
  checks: ['security', 'performance', 'testability', 'maintainability'],
  feedbackLevels: ['blocker', 'major', 'minor'],
  autoApprove: { maxBlockers: 0, maxMajor: 2 }
}, "qe-quality-analyzer");

// Security-focused review
await Task("Security Review", {
  prFiles: changedFiles,
  scanTypes: ['injection', 'auth', 'secrets', 'dependencies']
}, "qe-security-scanner");

// Test coverage review
await Task("Coverage Review", {
  prNumber: 123,
  requireNewTests: true,
  minCoverageDelta: 0
}, "qe-coverage-analyzer");

Agent Coordination Hints

Memory Namespace

aqe/code-review/
ā”œā”€ā”€ review-history/*     - Past review decisions
ā”œā”€ā”€ patterns/*           - Common issues by team/repo
ā”œā”€ā”€ feedback-templates/* - Reusable feedback
└── metrics/*            - Review turnaround time

Fleet Coordination

const reviewFleet = await FleetManager.coordinate({
  strategy: 'code-review',
  agents: [
    'qe-quality-analyzer',    // Logic, maintainability
    'qe-security-scanner',    // Security risks
    'qe-performance-tester',  // Performance issues
    'qe-coverage-analyzer'    // Test coverage
  ],
  topology: 'parallel'
});

Review Etiquette

| āœ… Do | āŒ Don't |

|-------|---------|

| "Have you considered...?" | "This is wrong" |

| Explain why it matters | Just say "fix this" |

| Acknowledge good code | Only point out negatives |

| Suggest, don't demand | Be condescending |

| Review < 400 lines | Review 2000 lines at once |


Related Skills


Remember

Prioritize feedback: šŸ”“ Blocker → 🟔 Major → 🟢 Minor → šŸ’” Suggestion. Focus on bugs and security, not style. Ask questions, don't command. Review < 400 lines at a time. Fast feedback (< 24h) beats thorough feedback.

With Agents: Agents automate security, performance, and coverage checks, freeing human reviewers to focus on logic and design. Use agents for consistent, fast initial review.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.