plugins/v1tamins/skills/v1-code-review/SKILL.md
Use when reviewing a PR, reviewing the current branch, or posting code review feedback to GitHub. Triggers on "review this PR", "code review", "check this pull request", "review my branch", "review and fix".
npx skillsauth add v1-io/v1tamins v1-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Perform a staff-level code review using repo context, stated intent, and the actual diff. Prioritize bugs, regressions, missing requirements, security risks, data issues, and test gaps.
For a harsh maintainability and structure audit (abstraction quality, file-size growth, spaghetti branching, ambitious simplification), recommend v1-deep-review instead of stretching this skill into that mode.
Default mode is review-only. Apply fixes only when the user explicitly asks for "review and fix", "fix review findings", or a shipping workflow clearly requested code changes.
Typical invocations:
/v1-code-review <PR_URL_or_NUMBER>/v1-code-review to review the current branchv1-code-review from the skills menu or use $v1-code-review <PR_URL_or_NUMBER>Examples:
/v1-code-review https://github.com/your-org/your-repo/pull/123
/v1-code-review 123
/v1-code-review
/v1-code-review --post
/v1-code-review --fix
In Codex, the slash examples below map directly to $v1-code-review ....
file_path:line_number for every finding.--post, explicitly asked to post, or the existing workflow clearly expects posting. Otherwise return review text in chat.Determine whether the target is a PR or the current branch.
For a PR argument:
gh pr view <PR> --json title,body,author,baseRefName,headRefName,commits,files,labels,additions,deletions
gh pr view <PR> --comments
gh pr diff <PR> --name-only
gh pr diff <PR>
For the current branch:
git status --short
git branch --show-current
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
BASE_BRANCH=${BASE_BRANCH:-main}
git diff --name-only origin/$BASE_BRANCH...HEAD
git diff origin/$BASE_BRANCH...HEAD
git log --oneline origin/$BASE_BRANCH..HEAD
If the default branch is not available locally, fetch it before reviewing. Never use destructive git commands.
Extract what the work claims to do from:
TODOS.md, if presentdocs/plans/ or docs/brainstorms/, if presentProduce a one-line intent summary before reviewing:
Intent: <what this branch appears to be trying to accomplish>
Changed surface: <main files/modules touched>
Risk flags: <auth/data/API/async/UI/migrations/external services/tests/docs>
Before code quality review, compare stated intent against the diff.
Check for:
If a plan file is found, extract actionable items and classify each as:
[DONE] Clear evidence in diff
[PARTIAL] Some evidence, incomplete
[NOT DONE] No evidence
[CHANGED] Different implementation, same goal achieved
Keep this audit concise. It is informational unless a missing item causes a real bug or user-facing gap.
For each meaningful changed file:
rg "<Symbol>" -n.AGENTS.md, CLAUDE.md, README, and local docs.Run these passes in the main review. Use them as lenses, not as separate reports.
Always run:
Run when applicable:
When a UI change crosses an API, service client, state hook, or server route boundary, build a contract matrix before writing findings:
| Layer | File(s) | Contract to verify | Tests/evidence |
| --- | --- | --- | --- |
| API route or handler | ... | auth, status codes, request/response shape, pagination, timeout/abort behavior | ... |
| Service client | ... | typed inputs/outputs, error mapping, retry/abort behavior | ... |
| State hook/store | ... | loading, empty, stale, error, optimistic update, cancellation | ... |
| Component/view | ... | rendered states, accessibility, responsive layout, destructive-action affordances | ... |
Use the matrix to catch half-wired work: backend without user path, UI without backend contract, service-client type drift, missing empty/error states, or tests that cover only one layer.
After specialist passes, do one adversarial pass:
Think like an attacker, a chaos engineer, and a hostile QA tester. What fails under load, bad input, retries, concurrency, stale state, partial failure, or confused users?
Use this severity model:
Use confidence gates:
For each finding, include:
[Severity] file_path:line_number - Short title
Problem: What is wrong and when it fails.
Impact: Why it matters.
Fix: Concrete change to make.
Test: Specific test or verification to add/run.
Confidence: N/5.
If no issues are found, say that clearly and mention residual risk or unverified areas.
Only enter this mode when the user explicitly asks to fix findings.
Classify findings:
Apply AUTO-FIX items directly with Edit, then report:
[AUTO-FIXED] file_path:line_number - Problem -> fix applied
Batch ASK items in one concise question with recommended choices. Do not commit, push, or create PRs from this skill.
If tests are already failing, invoke or recommend v1-fix-tests instead of trying to fold a full test repair loop into the review. If the issue is missing coverage, invoke or recommend v1-write-tests after the user approves adding tests.
Return this structure:
## Findings
<severity-ordered findings, or "No findings.">
## Open Questions
<only questions that affect review confidence or implementation safety>
## Scope Check
Intent: ...
Delivered: ...
Drift/missing work: ...
## Verification
Tests/checks reviewed or run:
- ...
Residual risk:
- ...
Keep the final summary short. Findings are the product.
When posting is requested:
## Code Review
### Findings
...
### Scope Check
...
### Verification
...
gh pr review <PR> --request-changes -b "$(cat /tmp/review.md)"
gh pr review <PR> --comment -b "$(cat /tmp/review.md)"
Reduce score for: migrations, auth/permissions, concurrency, broad refactors, missing tests.
tools
Use when planning or synthesizing user tests for prototypes, mockups, clickable demos, product concepts, design flows, landing pages, or early product specs. Triggers on "test this prototype", "prototype testing", "user test plan", "validate this product idea", "test with users".
development
Use when creating a polished self-contained HTML page would help the user understand, compare, review, present, tune, or interact with information better than Markdown. Triggers on "make an HTML page", "HTML artifact", "nice HTML", "visual report", "interactive explainer", "one-page dashboard", "shareable page".
data-ai
Use when turning a textbook, PDF, blog post, article, paper, course, notes, transcript, or other source material into suggested agent skills or skill improvements. Triggers on "what skills could come from this", "extract skills from", "turn this into skills", "skill ideas from this source".
development
Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for large prs, new features/architectures, a deep code quality audit, or especially harsh maintainability review.