---
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"
title: scope-creep-detector
canonical_url: https://skilld.dev/gh/shubhamsaboo/awesome-llm-apps/scope-creep-detector
last_updated: 2026-10-07T18:19:59.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [README.md](https://skilld.dev/api/skills-raw/shubhamsaboo/awesome-llm-apps/scope-creep-detector/README.md), [references/scope-signals.md](https://skilld.dev/api/skills-raw/shubhamsaboo/awesome-llm-apps/scope-creep-detector/references/scope-signals.md), [scripts/scope_creep.py](https://skilld.dev/api/skills-raw/shubhamsaboo/awesome-llm-apps/scope-creep-detector/scripts/scope_creep.py).
>
> If the user asked to install this Skill, run `npx skilld install shubhamsaboo/awesome-llm-apps/scope-creep-detector`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/scope-creep-detector`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/shubhamsaboo/awesome-llm-apps/scope-creep-detector) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/scope-creep-detector`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/scope-creep-detector --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/scope-creep-detector --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# 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](https://skilld.dev/api/skills-raw/shubhamsaboo/awesome-llm-apps/scope-creep-detector/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
