Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

scope-creep-detector — Claude Code skill: detect off-topic changes

Compares a git diff against a stated intent and flags files that don't belong: stray dependencies, API renames, config edits, oversized hunks, and formatting. Runs locally, offline, no network calls.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Shubhamsaboo/awesome-llm-apps --skill scope-creep-detector -a claude-code
Open on GitHub

What scope-creep-detector does

The skill parses unified diff and classifies each file by signal: keyword overlap between path and intent, new dependencies, public function or class renames, CI and build config changes, YAML and TOML edits, large hunks, formatting-only changes. Output is a table with recommendations for each flagged file: keep (if necessary for the intent), split (land in a separate PR), or justify (explain the connection).

Run python3 scripts/scope_creep.py with --repo, --intent, --staged or --base. Reads diff from working tree, staging area, branch, or file. Does not change commits or touch the repository.

Use before opening a PR that may have drifted from its scope: when a one-line bug fix touches unexpected subsystems, when dependencies or config snuck in, or when you need a concrete plan to split a mixed commit into logical pieces.

What it helps with

  • detect when a PR is too broad or drifts from stated intent
  • split a mixed commit into separate PRs by concern
  • find stray dependency additions, API changes, or config edits
  • decide where to keep an unwieldy hunk versus where to refactor
  • verify before opening a PR that scope matches the description

Example prompts for the agent

  • Check if my staged changes exceed the fix scope: `python3 scripts/scope_creep.py --repo . --staged --intent "fix null dereference in parser" --json`
  • Show me which files to split into a separate PR for the feature-retry branch: `python3 scripts/scope_creep.py --repo . --base main --intent "add retry limit to webhook delivery" --json`
  • Analyze this saved diff and tell me if the changes relate to the intent: `python3 scripts/scope_creep.py --diff change.diff --intent "refactor database layer" --json`

How to install scope-creep-detector

1Skills CLI (Vercel)

npx skills add Shubhamsaboo/awesome-llm-apps --skill scope-creep-detector -a claude-code

2Manually: put the files in place

~/.claude/skills/scope-creep-detector/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/scope-creep-detector/

From the same set3

The whole set →

Similar

memory-safety-patterns Seth Hobson This skill applies ownership, RAII, smart pointers, and resource management to Rust, C++, and C. Use it for systems code or memory-bug debugging. Claude Code CX Codex Cursor 11,746installs shellcheck-configuration Ryan Snodgrass This skill guides ShellCheck setup and use for shell script analysis. Use it when adding CI/CD linting, fixing warnings, or checking script portability. Claude Code CX Codex Cursor 11,533installs dependency-upgrade Seth Hobson This skill plans major dependency upgrades, checks compatibility, and stages changes with tests. Use it for framework updates or library breaking changes. Claude Code CX Codex Cursor 11,079installs react-native-best-practices callstackincubator Provides React Native performance guidelines based on Callstack practices. It helps agents diagnose FPS drops, memory leaks, and large bundles. Claude Code CX Codex Cursor +1 30,100installs gitnexus-refactoring abhigyanpatwari Safely rename symbols, split services, and extract modules using GitNexus semantic graphs. It verifies call hierarchies before touching files. Claude Code CX Codex Cursor +1 1,700installs deslop cursor Inspects branch diffs against main to remove AI-generated code clutter and inconsistent styling. Ideal for polishing branch changes before pull request review. Claude Code CX Codex Cursor +1 9,300installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. Claude Code 1,141,062installs

Questions about scope-creep-detector

How do I install scope-creep-detector in Claude Code?

Run npx skills add Shubhamsaboo/awesome-llm-apps --skill scope-creep-detector -a claude-code, then find the skill in ~/.claude/skills/scope-creep-detector/SKILL.md.

What does scope-creep-detector do?

It parses a git diff and compares it against your stated intent. It flags files that fall outside the scope, detects stray dependencies, API renames, config changes, and tells you whether to keep, split, or justify each flagged file.

Does the skill need internet or special setup?

No. It runs entirely locally, makes no network calls, and needs only Python 3. Analyzes the repository on disk or a diff you pass to it.

Source text

SKILL.md · Apache-2.0
---
name: scope-creep-detector
description: >-
  Analyzes git diffs against a stated intent to detect scope creep, unrelated
  files, broad pull requests, changes that grew beyond a fix, dependency
  additions, public API renames, config or CI edits, oversized hunks, and
  formatting-only files. Use when the user asks whether a change grew beyond
  the fix, a PR is too broad, or what unrelated stuff they touched, and wants
  keep, split, or justify guidance. Operates locally and offline.
license: Apache-2.0
metadata:
  author: "Matt Van Horn"
  version: "1.0.0"
  source: "https://github.com/Shubhamsaboo/awesome-llm-apps"
---

# Scope Creep Detector

A one-line fix should not require a reviewer to reverse-engineer fourteen files
across three subsystems. This skill compares a git diff with its stated intent,
surfaces scope signals, and turns them into keep, split, or justify decisions.

Everything runs locally. The script makes no network calls and does not change
the working tree, index, commits, or branches.

## When to use

- Before opening a pull request whose diff may have grown beyond its intent
- When a bug fix touches unexpected files or subsystems
- When the user asks whether staged changes are too broad
- When a diff includes dependency, public API, config, CI, or build changes
- When the user wants a concrete split plan for a mixed change

## When not to use

- Formatting code, running a linter, or writing a commit message
- Reviewing correctness, security, or test quality inside an agreed scope
- Measuring historical project growth across many commits
- Editing or reverting files without the user's approval

## Establish the intent

Use the user's one-line intent when available. Keep it concrete, such as
`fix null dereference in parser` or `add retry limit to webhook delivery`.

If no intent was given, the script falls back to the current branch name. If
that name is generic, detached, or unrelated to the work, ask for one line of
intent before treating relatedness as meaningful.

## Run the classifier

Run from this skill directory and point `--repo` at the target repository.

Working tree diff:

```bash
python3 scripts/scope_creep.py --repo /path/to/repo \
  --intent "fix null dereference in parser" --json
```

Staged diff:

```bash
python3 scripts/scope_creep.py --repo /path/to/repo --staged \
  --intent "fix null dereference in parser" --json
```

Branch diff against a merge base:

```bash
python3 scripts/scope_creep.py --repo /path/to/repo --base main \
  --intent "fix null dereference in parser" --json
```

Saved diff or stdin:

```bash
python3 scripts/scope_creep.py --diff change.diff --intent "parser fix" --json
git diff --staged | python3 scripts/scope_creep.py --diff - \
  --intent "parser fix" --json
```

Use `--hunk-threshold` only when the repository has a documented reason to
change the default churn threshold. Do not tune the threshold merely to make a
warning disappear.

## Interpret the JSON

Read [references/scope-signals.md](references/scope-signals.md) before making a
recommendation. Treat the classifier as triage evidence, not proof of authorial
intent.

- `in_scope`: file paths with at least one intent/path keyword overlap
- `likely_creep`: paths without overlap, with the reason and detected signals
- `new_deps`: dependencies introduced in supported manifest formats
- `api_renames`: nearby removed and added public function or class declarations
- `config_edits`: CI, container, build, YAML, and TOML changes
- `stats`: churn, subsystem counts, oversized hunks, and formatting-only files

Empty arrays are evidence too. Say that no signal was detected, not that the
diff is guaranteed to be in scope.

## Recommend keep, split, or justify

Give every item in `likely_creep` one disposition:

1. **Keep** when the path is necessary for the stated intent and the connection
   is direct. Explain the connection in one sentence.
2. **Split** when it can land independently, belongs to another subsystem, or
   introduces a dependency, API rename, config edit, or large hunk that is not
   required for the intent. Name the files or hunks for the follow-up change.
3. **Justify** when a cross-cutting edit cannot be separated safely. State the
   invariant or build constraint that requires it and call out reviewer risk.

Prefer split when evidence is ambiguous. Never claim that a zero overlap score
proves a file is unrelated. Path vocabulary is a cheap, deterministic proxy.

## Write the scope report

Use this compact structure:

1. Intent and diff source
2. Files and subsystems touched, with total additions and deletions
3. In-scope changes
4. Likely creep with signal evidence
5. Keep, split, or justify table
6. Proposed follow-up grouping, if any

Name file paths and hunk headers. For an oversized mixed hunk, explain that the
script cannot split it automatically and describe the smallest coherent edit.
Ask before applying any split, revert, staging, or commit operation.

## Files

- `scripts/scope_creep.py`: deterministic unified-diff parser and classifier
- `references/scope-signals.md`: signal definitions, thresholds, and limits

© Matt Van Horn · Apache-2.0 · Shubhamsaboo/awesome-llm-apps

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor