Code review

From metaspartan/cybara · View interactive version

Code review is an AI agent skill from the GitHub repository metaspartan/cybara. Review code changes for correctness, security, performance, and maintainability before merging. Use when reviewing a PR/diff or auditing a file for quality.

How to use this skill

Skill file

Code Review

Review changes against a consistent checklist. Be specific and kind; cite file:line.

Procedure

  1. Understand intent. Read the PR description / linked issue first. What is this change trying to do?
  2. Read the diff in full (git diff main...HEAD). Then read the surrounding context, not just changed lines.
  3. Check correctness first: does it do what it claims? Edge cases? Error handling? Off-by-ones? Null/empty inputs?
  4. Check security: untrusted input handling, injection (SQL/HTML/cmd), authz, secrets in code/logs, path traversal, unsafe deserialization.
  5. Check performance: N+1 queries, accidental O(n²), unbounded loops, missing pagination, large allocations in hot paths.
  6. Check maintainability: naming, duplication (DRY), dead code, overly long functions, missing tests, misleading comments.
  7. Verify tests actually cover the new behavior and aren't just happy-path.

Severity levels

Writing good review comments

Output format

## Blocking
- path/file.ts:42 — <issue>

## Important
- path/file.ts:88 — <issue>

## Nits / Suggestions
- path/file.ts:120 — <nit>

## What's good
- <concise positive note>
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.