.pi/skills/review-model-guidance/SKILL.md
Guidance for selecting models when performing code review with subtasks. Load this skill to enable intelligent model selection for review analysis — choosing faster models for simple tasks and deeper reasoning models for complex analysis.
npx skillsauth add in-the-loop-labs/pair-review review-model-guidanceInstall 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.
When performing code review analysis, you can switch models at any time to match
the demands of the task. This applies both to your own direct work and to subtasks
you delegate via the task tool. Use /model to switch your own model, or pass
the model parameter when delegating subtasks.
Before switching models, check which models are actually available by running
${PI_CMD:-pi} --list-models via bash. This shows all models with valid API keys
configured in provider model columns. Specify models as
provider/model. Only switch to models that appear in that list.
The following models are never permitted due to extreme cost:
openai/o3 instead, which
provides strong reasoning at a fraction of the cost.Do not select these models for your own work, subtasks, or any model parameter. If a forbidden model is the only reasoning model available, fall back to a balanced model with extended thinking enabled instead.
Not every task benefits from model switching. Use these heuristics:
Use mid-tier models for general code review work:
Good balanced choices: anthropic/claude-sonnet-4-5, google/gemini-2.5-pro, openai/gpt-5
For complex analysis, enable extended thinking or switch to a reasoning model. Here are the higher-end models and their strengths for code review:
Anthropic
OpenAI (note: o3-pro is forbidden — see Forbidden Models above)
xAI
When the goal is specifically to track down bugs or logical flaws in changes, these models excel:
When a review suggestion includes a concrete code fix or refactor, switching to a code-specialized model can produce better, more idiomatic suggestions:
Use code generation models when your review finding warrants a concrete code example — a suggested fix, a refactored alternative, or an idiomatic replacement. For findings that are purely analytical (architectural concerns, design feedback), stick with reasoning or balanced models instead.
Use deep reasoning models for:
Some languages and domains benefit from specific models:
anthropic/claude-opus-4-6 or openai/o3 for their strong reasoning about resource management.
xai/grok-code-fast-1 is also worth considering for Rust-specific patterns.anthropic/claude-sonnet-4-5
or google/gemini-2.5-pro are strong defaults. For complex state management (Redux,
hooks, async flows), use reasoning models.google/gemini-2.5-pro
with thinking is strong given its deep Python training data.openai/o3 is
strong at reasoning about relational constraints and migration ordering.anthropic/claude-opus-4-6 or openai/o3 for their security reasoning.anthropic/claude-sonnet-4-5 with thinking enabled.anthropic/claude-opus-4-6 and openai/gpt-5 have strong Ruby understanding.
For Rails-specific patterns (N+1 queries, callback chains, ActiveRecord
pitfalls), reasoning models help trace the implicit execution flow.openai/o3 for its systematic path tracing.The task tool supports parallel execution with per-task model selection. This is
the key unlock for code review: run multiple review perspectives simultaneously,
each with a model suited to the task.
Each task in the tasks array can specify its own model:
{
"tasks": [
{ "task": "Review changed lines for bugs, logic errors, and edge cases.", "model": "openai/o3" },
{ "task": "Analyze security implications of these changes.", "model": "anthropic/claude-opus-4-6" },
{ "task": "Check architectural consistency with the broader codebase.", "model": "google/gemini-2.5-pro" }
]
}
Tasks without a model inherit the top-level model parameter, or the current
session model if neither is set.
When all subtasks can use the same model, you can set a single top-level model:
{
"tasks": [
{ "task": "Review the changed lines in isolation for bugs and issues." },
{ "task": "Read the full files and check consistency with existing patterns." },
{ "task": "Check test coverage for the changed code." }
],
"model": "anthropic/claude-sonnet-4-5"
}
You don't always need subtasks to use a different model. You can switch your own
model mid-review using /model and continue working directly. This is useful when
you need specific expertise, or when you want to bring deeper reasoning to a
specific part of your analysis without the overhead of spawning a subtask.
Before reaching for the task tool, ask: "Can I do this with read, bash, or
other built-in tools directly?" If yes, do it directly. Subtasks are for
multi-step, context-heavy work — not for simple operations.
Never use subtasks for:
read tool directly. A subtask spawns a full pi
process just to call read — adding seconds of overhead and failure risk for
something that takes milliseconds.bash with git diff, rg, find, etc. is
instant. Don't wrap these in subtasks.read or bash
call, it doesn't need a subtask.Do use subtasks for:
Anti-pattern to avoid: Don't dispatch 5 parallel subtasks to read 5 files.
Instead, read the 5 files yourself with 5 read calls (which can't fail due to
process spawn issues), then use subtasks only if you need parallel analysis of
the content.
development
Fetch human review comments from pair-review and make code changes to address them. Use when the user says "address review feedback", "fix review comments", "address comments", or wants to iterate on code based on feedback left by a human reviewer in pair-review.
development
Open outstanding GitHub review requests in pair-review for AI-powered code review. Finds open PRs where my review is pending from the past week and starts pair-review analysis for each. Use when the user says "review requests", "review my PRs", "check review requests", "open review requests", "pair-review my requests", or wants to batch-review their outstanding GitHub review requests.
tools
Open the GitHub pull request for the current branch in the pair-review web UI. This only opens the browser — it does not run AI analysis or generate suggestions. Once open, the user can browse the diff, leave comments, and trigger analysis from the web UI themselves. Use when the user says "review this PR", "review pull request", "open PR review", or wants to open a pair-review session for the current branch's pull request. If the user wants automated AI analysis of the PR rather than just opening the browser, use the `code-critic:analyze` skill (standalone, requires code-critic plugin) or `pair-review:analyze` skill (requires MCP server) instead. Note that the user can also trigger AI analysis from within the pair-review web UI after opening it.
tools
Open local uncommitted changes for review in the pair-review web UI. This only opens the browser — it does not run AI analysis or generate suggestions. Once open, the user can browse the diff, leave comments, and trigger analysis from the web UI themselves. Use when the user says "review my local changes", "review local", "open local review", or wants to open a pair-review session for uncommitted work in the current directory. If the user wants automated AI analysis of their local changes rather than just opening the browser, use the `code-critic:analyze` skill (standalone, requires code-critic plugin) or `pair-review:analyze` skill (requires MCP server) instead. Note that the user can also trigger AI analysis from within the pair-review web UI after opening it.