Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sc-code-review

БесплатноБез исполняемых скриптовНе проверен

Interactive multi-model consensus code review using PAL MCP. Reviews commits, staged changes, or branch diffs with user-directed scope and interactive…

Tony363от Tony363★ 21 звезда на GitHub

Об этом скилле

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

  1. Parse - Extract review mode, focus area, and commit range from arguments
  2. Validate - Verify git state, branch existence, staged changes
  3. Confirm Scope - Interactive scope confirmation with user
  4. Discover - List available models via mcp__pal__listmodels
  5. Gather - Collect git diff, changed files, commit history
  6. Categorize - Map changed files to review focus areas
  7. Handle Large Diffs - Interactive chunking strategy for large changes
  8. Review - Run PAL MCP consensus with multi-model evaluation
  9. Resolve Disagreements - User adjudicates model conflicts
  10. Validate Findings - User confirms critical/high severity items
  11. Format - Present findings in GitHub PR comment style
  12. Follow-up - Ask user what to do next (fix, deep-dive, post to PR)
  13. Post - Optionally post to PR via gh CLI

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-only is 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"

Полный SKILL.md на GitHub

Установить sc-code-review в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

AskUserQuestion
Bash
Read
Edit
Glob
Grep
mcp__pal__consensus
mcp__pal__codereview
mcp__pal__listmodels
mcp__pal__challenge

Вложенные файлы

IMPORT_NOTES.md

FAQ

Что делает скилл sc-code-review?

Interactive multi-model consensus code review using PAL MCP. Reviews commits, staged changes, or branch diffs with user-directed scope and interactive decision points.

Как установить скилл sc-code-review?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sc-code-review запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sc-code-review с