scope-creep-detector
它能做什么
这项技能把一组代码改动与你给出的一句话目的进行比较。它会标记无关的文件、大幅的编辑和有风险的改动,使一个修复保持为修复。适合希望改动聚焦、便于审阅的开发者。
适用场景
- ✓你询问某项改动是否已经超出了它原本要进行的修复范围的时候。
- ✓拉取请求看起来过于宽泛,你想知道应拆分出哪些内容的时候。
- ✓某项改动涉及了你没有预料到的依赖、公开名称、配置或构建文件的时候。
技能链接
https://github.com/Shubhamsaboo/awesome-llm-apps/blob/main/agent_skills/scope-creep-detector/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的改动是为了修复解析器中的一个崩溃。请检查我是否改动了不该改动的内容,并告诉我应该拆分出哪些部分。”
每周 5 个新技能,1 分钟读完。
工作原理
它把你代码中的改动与你说明的目的进行比较,查找无关文件和依赖修改等信号,并建议每个部分是保留、拆分还是加以说明。它不会修改你的文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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:
python3 scripts/scope_creep.py --repo /path/to/repo \
--intent "fix null dereference in parser" --json
Staged diff:
python3 scripts/scope_creep.py --repo /path/to/repo --staged \
--intent "fix null dereference in parser" --json
Branch diff against a merge base:
python3 scripts/scope_creep.py --repo /path/to/repo --base main \
--intent "fix null dereference in parser" --json
Saved diff or stdin:
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 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 overlaplikely_creep: paths without overlap, with the reason and detected signalsnew_deps: dependencies introduced in supported manifest formatsapi_renames: nearby removed and added public function or class declarationsconfig_edits: CI, container, build, YAML, and TOML changesstats: 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:
- Keep when the path is necessary for the stated intent and the connection is direct. Explain the connection in one sentence.
- 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.
- 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:
- Intent and diff source
- Files and subsystems touched, with total additions and deletions
- In-scope changes
- Likely creep with signal evidence
- Keep, split, or justify table
- 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 classifierreferences/scope-signals.md: signal definitions, thresholds, and l
常见问题
它会修改我的代码吗?
不会。它只分析改动,不进行任何编辑、提交或分支更改。
如果我不提供目的怎么办?
技能会退而使用你的分支名称,但如果分支名称不清楚,它会要求你提供一句话的目的。
它会检查我的代码是否正确吗?
不会。它关注的是改动的范围,而不是正确性、安全性或测试质量。
详情
作者的原始描述
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.
热度
- GitHub 星标
- 144k
- 排名
- #678
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/22
评论
- …
同一仓库的更多技能
advisor-orchestrator-worker
144k帮你的智能体把非常庞大的任务分配给一组 AI 模型,由较强的模型负责规划和检查,较便宜的模型负责执行。
commit-archaeologist
144k帮你的智能体通过阅读本地 git 历史,解释某段代码存在的原因,包括是谁添加的以及之后发生了哪些改动。
dependency-doctor
144k帮你的智能体检查 requirements.txt、pyproject.toml 或 package.json 文件中常见的依赖问题,并提出小而便于审阅的修复建议。
first-reader
144k帮你的智能体模拟真实读者的阅读体验来测试草稿,指出读者可能在哪里失去兴趣,以及他们会记住什么。