skills/review-scope/SKILL.md
Use before code review - determine if change is minor (review new code only) or major (review impacted code too)
npx skillsauth add troykelly/codex-skills review-scopeInstall 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.
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:
data-ai
Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.
development
Defines context handover format when workers hit turn limit. Posts structured handover to GitHub issue comments enabling replacement workers to continue seamlessly.
data-ai
Use to spawn isolated worker processes for autonomous issue work. Creates git worktrees, constructs worker prompts, and handles worker lifecycle.
tools
Entry point for ALL work requests - triages scope from trivial to massive, asks clarifying questions, and routes to appropriate planning skills. Use this when receiving any new work request.