Use before code review - determine if change is minor (review new code only) or major (review impacted code too)
Analyzes code changes to determine review scope, classifying changes as minor (review new code only) or major (review impacted code too). Claude uses this before code reviews to decide whether to examine just changed lines or trace callers, dependencies, and integration points.
/plugin marketplace add troykelly/claude-skills/plugin install issue-driven-development@troykelly-skillsThis skill is limited to using the following tools:
Determine the appropriate scope for code review based on change size.
Core principle: Major changes need broader review. Minor changes need focused review.
Question to answer: Is this a minor change or a major change?
Review only NEW code.
Indicators:
| Indicator | Example |
|---|---|
| Few files changed | 1-3 files |
| Isolated change | Single function modification |
| No API changes | Internal implementation only |
| No new dependencies | Uses existing code |
| Localized impact | Doesn't affect other modules |
Examples:
Review scope:
Review NEW code AND IMPACTED code.
Indicators:
| Indicator | Example |
|---|---|
| Many files changed | 4+ files |
| Cross-cutting change | Touches multiple modules |
| API changes | Public interface modified |
| New dependencies | Adds libraries or modules |
| Behavioral changes | Affects existing functionality |
| Architecture impact | Changes patterns or structure |
Examples:
Review scope:
┌─────────────────────────────────────┐
│ FILES CHANGED │
└─────────────────┬───────────────────┘
│
▼
┌─────────────────┐
│ > 3 files? │
└────────┬────────┘
│
┌─────────┴─────────┐
│ │
Yes No
│ │
▼ ▼
MAJOR ┌─────────────────┐
│ Public API │
│ changed? │
└────────┬────────┘
│
┌────────┴────────┐
│ │
Yes No
│ │
▼ ▼
MAJOR ┌─────────────────┐
│ Behavioral │
│ change? │
└────────┬────────┘
│
┌────────┴────────┐
│ │
Yes No
│ │
▼ ▼
MAJOR MINOR
For major changes, identify impacted code:
# Find all files that import the changed module
grep -r "import.*from.*'./changed-module'" src/
# Find all usages of changed function
grep -r "changedFunction" src/
# What does the changed code import?
grep "import" src/changed-file.ts
# Trace the dependency chain
Changed function
│
├── Called by: parentFunction() ← Review this
│ │
│ └── Called by: grandparent() ← Review if behavior changed
│
└── Calls: childFunction() ← Review if inputs changed
│
└── Calls: database.save() ← Review if data shape changed
Before starting review, document scope:
## Review Scope: MINOR
**Changed files:**
- src/utils/format.ts (10 lines)
**Review focus:**
- New formatDate() function
- Associated tests
**Not reviewing:**
- Callers of format module (unchanged behavior)
## Review Scope: MAJOR
**Changed files:**
- src/services/auth.ts
- src/middleware/authenticate.ts
- src/routes/login.ts
- src/models/session.ts
- tests/auth.test.ts
**Impacted code to review:**
- src/routes/protected/* (use auth middleware)
- src/services/user.ts (calls auth service)
**Integration points:**
- Login flow end-to-end
- Session management
- Protected route access
**Review focus:**
- All changed code
- All callers of auth service
- Auth middleware consumers
- Session handling throughout
All of minor, PLUS:
If unsure whether change is minor or major:
Default to major. Better to over-review than miss issues.
Sometimes few lines have large impact:
// Small change, but MAJOR scope
// Changing default timeout affects all HTTP calls
const DEFAULT_TIMEOUT = 30000; // Was 5000
Review all code affected by the changed behavior.
Many files changed but pure refactor:
// Renamed variable across 20 files
// No behavior change
Still MAJOR for structural review, but behavioral review is lighter.
This skill is called by:
issue-driven-development - Step 9comprehensive-review - Before starting reviewThis skill informs:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.