| name | review-before-commit |
| description | Review all uncommitted changes before pushing. Checks for dead code,
stale comments, AGENTS.md rule violations, unused imports, and
inconsistencies introduced during the current session.
Invoke with $review-before-commit.
|
| author | Claude Code |
| version | 1.0.0 |
| date | "2026-02-10T00:00:00.000Z" |
| user_invocable | true |
| invocation_hint | $review-before-commit |
| arguments | Optional: Scope the review to specific paths
Example: $review-before-commit
Example: $review-before-commit lib/blocs/hashtag_feed/
|
Review Skill
Purpose
Final code review of all uncommitted changes before pushing. Catches issues
that are easy to introduce during iterative development: stale comments
referencing removed code, dead code, rule violations, and inconsistencies.
How to Review
Step 1: Identify changed files
Run git diff --name-only and git diff --cached --name-only to get the full
list of modified files (staged + unstaged). If the user provided a path argument,
filter to only files under that path.
Step 2: Read all changed files
Read every changed file in full. For each file, check the items below.
Step 3: Run checks
For each changed file, check for:
Dead Code
- Unused imports (import not referenced anywhere in the file)
- Unused private fields, methods, or getters
- Unreachable code after early returns
- Commented-out code blocks (should be deleted, not commented)
Stale References
- Comments or doc strings referencing methods, classes, or variables that no
longer exist in the codebase (use Grep to verify references are still valid)
- ABOUTME comments that no longer accurately describe the file
- TODO comments for work that was already completed in this session
Brainstorm Docs
Any file under mobile/docs/brainstorm/ (typically dated like
YYYY-MM-DD-issueNNNN-…-brainstorm.md) is a working artefact, not a
deliverable. By the time the PR is ready, the rationale belongs in the
PR description; the file should not ship with the merge commit.
Flag every staged file under that path and ask the user whether the
brainstorm should be dropped or converted in place:
- Drop it (default) —
git rm the file. Use a separate
docs: drop … brainstorm doc commit so the deletion is auditable.
- Convert it to a decision record — only when the doc has lasting
value beyond the PR (e.g. captures a rejected approach future readers
will keep proposing). Rename, move out of
brainstorm/, and trim to
the durable bits. Precedent: cd723075e docs(notifications): convert badge-desync brainstorm to decision record.
Precedents for outright deletion: 380bf50c1 docs: drop PR #4229 brainstorm doc, and the follow-up to PR #4234 review.
AGENTS.md Rule Violations
Read and apply ALL rules from AGENTS.md and .claude/rules/. Do not
hardcode specific rules here — always check the source of truth in those files.