Review

From elie222/inbox-zero · View interactive version

Review is an AI agent skill from the GitHub repository elie222/inbox-zero. Review code changes, auto-fix safe issues, and report bugs

How to use this skill

Skill file

review

Code review with craftsman's eye. Auto-fix obvious issues, surface real bugs.

Reference @AGENTS.md for project conventions. Apply those patterns as review criteria.

Critical Rules

  1. AUTO-FIX safe obvious issues - Don't ask permission for no-brainers
  2. HUNT FOR BUGS - Logic errors, edge cases, race conditions first
  3. WAIT for confirmation - On BUG/FIX, don't execute until user says "go"
  4. BE CONCISE - One-line items, choices at END
  5. USE clickable links - path/to/file.ts:123 format only

Categories

| Category | What | Action |

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

| [BUG] | Logic errors, security, data loss, race conditions | Report → wait |

| [FIX] | Type gaps, missing error handling, test gaps, slop | Report → wait |

| [AUTO] | Unused imports, dead code, console.log, typos | Fix immediately |

| [CONSIDER] | Refactors, style opinions, nice-to-have | Mention only |

AUTO Criteria (all must be true)

AUTO examples:

NOT AUTO (needs confirmation):

Project-Specific Checks

Always ask these questions during review:

Can this be simpler?

Can we remove any code?

Is it DRY without premature abstraction?

Is it structured correctly?

Does it follow project patterns? (see @AGENTS.md)

Learnings check

Mindset

Inheritance Test: Would I curse the previous author? Understand at 2am?

Pride Test: Would I put my name on this?

Workflow

Step 0: Determine Scope & Group Files

Auto-detect: conversation changes → staged → current diff

git diff --cached --name-only  # or HEAD

Group files by area/dependency:

Batch 1: apps/web/app/api/agent/* (3 files)
Batch 2: apps/web/app/(app)/[emailAccountId]/agent/* (related components)
Batch 3: apps/web/utils/actions/* (2 files)

Output: Found X files in Y batches

──────────

Step 1: Create Review Plan (TODO)

BEFORE reading any file content, create todo list:

- [ ] Batch 1: API routes (skills, allowed-actions)
- [ ] Batch 2: agent page components (agent-page, chat, tools)
- [ ] Batch 3: server actions (agent.ts, agent.validation.ts)

Use todo_write to track batches.

──────────

Step 2: Process Each Batch

For each batch:

  1. Read diff for batch files only (git diff --cached -- path/to/files)
  2. Review & categorize issues
  3. Auto-fix [AUTO] items immediately
  4. Note [BUG]/[FIX]/[CONSIDER] items
  5. Mark batch complete in todos

Issue format:

1. **[BUG]** Race condition in concurrent saves — `src/db.ts:45`
2. **[FIX]** Missing error boundary — `src/App.tsx:12`
3. **[CONSIDER]** Extract to custom hook — `src/Form.tsx:34`

After each batch:

Batch 1 done: AUTO: 2 fixed | BUG: 1 | FIX: 2

──────────

Step 3: Summary & Options (After All Batches)

Total: BUG: X | FIX: X | CONSIDER: X (auto-fixed: Y)

Issues:
1. [BUG] ... — `path:line`
2. [FIX] ... — `path:line`

What to fix?
- a) BUG + FIX [recommended]
- b) BUG only
- c) All including CONSIDER
- d) Custom (e.g., "1,3")

I'll assume a) if you don't specify.

Learnings:
- Any patterns worth adding to AGENTS.md?
- Any new review checks to add to this file?

STOP. Wait for selection.

──────────

Step 4: Execute Fixes

Process fixes batch-by-batch (same grouping):

  1. Update todo list with selected fixes
  2. For each batch:
  1. Run linter if applicable

Severity Guide

BUG (Logic/Security):

FIX (Quality):

CONSIDER (Opinions):

Git Commands

# Staged
git diff --cached
git diff --cached --name-only

# All uncommitted
git diff HEAD
git diff HEAD --name-only

Error Handling

| Error | Response |

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

| No changes | "Check git status or specify files" |

| File not found | List available, ask to specify |

| Binary files | Skip, mention in summary |

| Large file (>10k) | "Review specific sections?" |

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.