agents/dot-agents/skills/autoreview/SKILL.md
Run a Pi-based structured code review as a closeout check on local, branch, PR, or commit changes before commit or ship.
npx skillsauth add nathankoerschner/dotfiles autoreviewInstall 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.
Run a structured code review using Pi. Do not use Codex, Claude Code, codex review, Claude harnesses, the old bundled autoreview helper, or nested reviewer panels that invoke non-Pi CLIs. Pi may use any configured model/provider that is appropriate for the task.
Use when:
pi.codex review.Dirty local work:
pi --no-session --tools read,bash -p "$(cat <<'PROMPT'
You are performing a structured code review of the current repository's uncommitted local changes.
Use only read-only inspection. Do not modify files. Inspect `git status --short`, `git diff --stat`, `git diff`, and any relevant adjacent files/tests.
Focus on concrete correctness, regression, security, data-loss, API compatibility, and test-gap issues introduced by this patch.
Return:
1. Findings: severity, file/line, issue, why it matters, minimal fix.
2. If no findings, exactly: autoreview clean: no accepted/actionable findings reported
PROMPT
)"
Branch/PR work:
base=origin/main
pi --no-session --tools read,bash -p "$(cat <<PROMPT
You are performing a structured code review of this branch against ${base}.
Use only read-only inspection. Do not modify files. Inspect `git diff --stat ${base}...HEAD`, `git diff ${base}...HEAD`, and relevant adjacent files/tests.
Focus on concrete correctness, regression, security, data-loss, API compatibility, and test-gap issues introduced by this branch.
Return:
1. Findings: severity, file/line, issue, why it matters, minimal fix.
2. If no findings, exactly: autoreview clean: no accepted/actionable findings reported
PROMPT
)"
If an open PR exists, use its actual base:
base=$(gh pr view --json baseRefName --jq .baseRefName)
base="origin/$base"
pi --no-session --tools read,bash -p "Review this branch against ${base}; inspect git diff ${base}...HEAD and relevant files. Return actionable findings only, or exactly: autoreview clean: no accepted/actionable findings reported"
Committed single change:
commit=HEAD
pi --no-session --tools read,bash -p "Review commit ${commit}. Use read-only inspection of `git show --stat ${commit}`, `git show ${commit}`, and relevant adjacent files/tests. Return actionable findings only, or exactly: autoreview clean: no accepted/actionable findings reported"
Pi is the review harness. You may choose any configured Pi model/provider with --model when useful, for example:
pi --model sonnet:high --no-session --tools read,bash -p "Review the local uncommitted diff..."
pi --model openai/gpt-5.1 --thinking high --no-session --tools read,bash -p "Review the branch diff..."
Do not switch to non-Pi CLIs. If a chosen Pi model fails due to capacity, retry Pi with the same model a few times. If unavailable, use another Pi model and report the fallback.
Run formatting first if it can change line locations. Then it is OK to run focused tests and Pi review in parallel manually, for example in separate tmux panes/windows, or sequentially if simpler.
Focused tests example:
cd apps/backend && .venv/bin/python -m pytest tests/test_chart_routes.py tests/test_agent_tools.py -q
If tests or review lead to code edits, rerun the affected tests and rerun Pi review until clean or consciously rejected.
For each Pi finding:
Reject a finding only when evidence shows it is intentional, not introduced, speculative, or not worth the complexity. Add a code comment only when it documents a real invariant future reviewers should know.
Include:
Do not run another review solely to improve final wording. If the final Pi review says autoreview clean: no accepted/actionable findings reported, report that exact run as clean.
development
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to simplify, refactor lightly, clean up, or improve recently modified code without behavior changes.
tools
Write a path-free, clipboard-ready handoff prompt that lets another agent investigate, discuss, or pick up a specific task.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
development
Deep, rigorous multi-model code review for PRs, branches, diffs, commits, or pre-merge checks. Use this when the user explicitly asks for a deep review, thorough review, rigorous review, pre-merge check, PR review, branch review, or wants maximum confidence. Do not use for quick/casual reviews; use quick-review instead. Treat AI output as a first draft: run independent Pi subagents on Claude Opus, GPT-5.5 extra-high reasoning, and Gemini; validate and synthesize severity-ranked findings before fixes.