sc-code-review
FreeNo executable scriptsNot checkedInteractive multi-model consensus code review using PAL MCP. Reviews commits, staged changes, or branch diffs with user-directed scope and interactive…
by Tony363★ 21 GitHub starsAbout this skill
Code Review Skill
Comprehensive code review using PAL MCP multi-model consensus. Reviews recent commits, staged changes, or branch comparisons with focus on security, quality, performance, and architecture.
Quick Start
# Review last 5 commits (default)
/sc:code-review
# Review staged changes
/sc:code-review --staged
# Compare feature branch against main
/sc:code-review --branch main
# Security-focused review
/sc:code-review commits=3 --focus security
# Post review as PR comment
/sc:code-review --branch main --post-pr
Philosophy: Ask Early, Ask Often
This skill liberally uses AskUserQuestion at every decision point. Code review is subjective — what matters depends on context, and assumptions about reviewer priorities are frequently wrong. The cost of asking is low; the cost of reviewing the wrong scope or missing what the user cares about is high.
Interactive checkpoints:
- Before reviewing — confirm the review scope and what the user cares about
- When the diff is large — let the user choose what to focus on first
- When categorization is ambiguous — ask about severity levels
- When models disagree — let the user break the tie on issue severity
- After findings — ask what to do next (fix, re-review, post to PR)
- When tradeoffs exist — present them explicitly instead of picking silently
- For critical/high findings — validate severity with user before finalizing
The user should feel like they're directing the review, not receiving a fire-and-forget report.
Behavioral Flow
- Parse - Extract review mode, focus area, and commit range from arguments
- Validate - Verify git state, branch existence, staged changes
- Confirm Scope - Interactive scope confirmation with user
- Discover - List available models via
mcp__pal__listmodels - Gather - Collect git diff, changed files, commit history
- Categorize - Map changed files to review focus areas
- Handle Large Diffs - Interactive chunking strategy for large changes
- Review - Run PAL MCP consensus with multi-model evaluation
- Resolve Disagreements - User adjudicates model conflicts
- Validate Findings - User confirms critical/high severity items
- Format - Present findings in GitHub PR comment style
- Follow-up - Ask user what to do next (fix, deep-dive, post to PR)
- Post - Optionally post to PR via
ghCLI
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
commits |
int | 5 | Number of recent commits to review |
--staged |
bool | false | Review only staged changes |
--branch |
string | - | Compare current branch against target branch |
--focus |
string | full | Focus: security, performance, quality, architecture, full |
--post-pr |
bool | false | Post review as PR comment |
--models |
int | 2 | Number of models for consensus (2-5) |
Review Modes
Modes are mutually exclusive:
| Mode | Trigger | Git Command |
|---|---|---|
| Commits | Default or commits=N |
git diff -U10 HEAD~N..HEAD |
| Staged | --staged |
git diff -U10 --cached |
| Branch | --branch <target> |
git diff -U10 origin/<target>...HEAD |
Phase 1: Validate Git State
# Verify git repository
git rev-parse --is-inside-work-tree
# Get current branch
git branch --show-current
Mode-specific validation:
- Commits: Check
git rev-list --count HEAD>= N - Staged: Check
git diff --cached --name-onlyis non-empty - Branch: Check
git rev-parse --verify "origin/$TARGET"exists
Phase 1b: Confirm Review Scope
After gathering git context, present a summary and let the user confirm or adjust:
AskUserQuestion:
question: "Here's what I'll be reviewing. Does this scope look right?"
header: "Scope"
multiSelect: false
options:
- label: "Looks good — proceed"
description: "<N files changed, +X/-Y lines, commits/staged/branch summary>"
- label: "Too much — narrow scope"
description: "I only want to review a subset of these changes"
- label: "Too little — expand scope"
description: "Include more commits or compare against a different branch"
- label: "Different focus"
description: "I want to focus on a specific area (security, performance, etc.)"
If "Too much — narrow scope": Ask which files or directories to focus on:
AskUserQuestion:
question: "Which areas should I focus the review on?"
header: "Focus"
multiSelect: true
options:
- label: "Backend (app/)"
description: "<N files, +X/-Y lines in app/>"
- label: "Frontend (frontend/)"
description: "<N files, +X/-Y lines in frontend/>"
- label: "Tests"
description: "<N files, +X/-Y lines in tests/>"
- label: "Config/Infra"
description: "<N files in Docker, CI, config>"
If "Too little — expand scope": Ask how to expand (more commits, different branch).
*If "Different focus"
Install sc-code-review in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
AskUserQuestionBashReadEditGlobGrepmcp__pal__consensusmcp__pal__codereviewmcp__pal__listmodelsmcp__pal__challengeBundled files
FAQ
What does the sc-code-review skill do?
Interactive multi-model consensus code review using PAL MCP. Reviews commits, staged changes, or branch diffs with user-directed scope and interactive decision points.
How do I install the sc-code-review skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the sc-code-review skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic