Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
review
description
Review code changes, auto-fix safe issues, and report bugs
disable-model-invocation
true
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
AUTO-FIX safe obvious issues - Don't ask permission for no-brainers
HUNT FOR BUGS - Logic errors, edge cases, race conditions first
WAIT for confirmation - On BUG/FIX, don't execute until user says "go"
BE CONCISE - One-line items, choices at END
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)
Zero risk of breaking behavior
<5 seconds to fix
No judgment call needed
AUTO examples:
Unused imports/variables
Trailing whitespace
Console.log (unless intentional)
Dead/unreachable code
Obvious typos in comments/strings
NOT AUTO (needs confirmation):
Removing "unused" function (might be used elsewhere)
Type changes (might change behavior)
Any logic change
AI slop removal (might be intentional)
Project-Specific Checks
Always ask these questions during review:
Can this be simpler?
Is there unnecessary abstraction? Could this be done with less code?
Are there helpers/utils being created for one-time operations?
Over-engineered error handling, feature flags, or backwards-compat shims?
Unnecessary wrapper components or HOCs?
Can we remove any code?
Dead code, unused exports, commented-out blocks?
Re-exports or barrel files (we don't use barrel files)?
Backwards-compatibility hacks like renamed _vars or // removed comments?
Types/interfaces exported but only used in the same file?
Is it DRY without premature abstraction?
Obvious copy-paste of entire functions or large blocks → refactor
But 2-3 similar lines are fine — don't abstract too early
The wrong abstraction is worse than duplication
Is it structured correctly?
Colocate page-specific components next to their page (not in a nested components/ subfolder — we don't do that in route directories)
General/reusable components go in apps/web/components/
API routes: One resource per route, not combined data endpoints
Server actions for mutations, not POST routes
Validation schemas in separate .validation.ts files
Helper functions at the bottom of files, not the top
All imports at the top — no mid-file dynamic imports
No barrel files (index.ts re-exporting everything from a folder)
Does it follow project patterns? (see @AGENTS.md)
GET routes wrapped with withAuth or withEmailAccount?
Response types exported as Awaited<ReturnType<typeof fn>>?
SWR for client-side data fetching?
LoadingContent for loading/error states?
useAction from next-safe-action/hooks for form submissions?
Zod schemas with z.infer<typeof schema> instead of duplicate interfaces?
Self-documenting code? Comments explain "why" not "what"?
logger.trace() for PII fields?
Test changes follow .claude/skills/testing/SKILL.md?
Tests avoid mocking @/utils/logger?
If draft-generation prompt, retrieval, routing, or post-processing changed, was apps/web/utils/ai/reply/draft-attribution.tsDRAFT_PIPELINE_VERSION bumped for analytics?
Learnings check
Did this change teach us something that should be captured in AGENTS.md or this review file?
Are there patterns that keep coming up that we should document?
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
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):
Update todo list with selected fixes
For each batch:
Read relevant file(s)
Apply fixes
Mark complete
Run linter if applicable
Severity Guide
BUG (Logic/Security):
Business logic errors, wrong conditions
Race conditions, data loss
Security: injection, XSS, exposed secrets
API routes missing auth middleware
Null/undefined not handled
Edge cases that break
FIX (Quality):
Type safety gaps, unsafe casts
Missing error handling
Test coverage gaps
AI slop (WHAT comments, unnecessary try/catch, as any)
Missing validation
Combined API routes that should be separate
POST routes used for mutations instead of server actions
Barrel files / re-export patterns
CONSIDER (Opinions):
Refactoring opportunities
"I would do it differently"
Performance micro-optimizations
Style preferences
Git Commands
# Staged
git diff --cached
git diff --cached --name-only
# All uncommitted
git diff HEAD
git diff HEAD --name-only