AGENT SKILL
minimal-diff
Make the smallest correct change that fixes the problem, resisting every incidental refactor. Use when fixing bugs with the smallest surgical change, avoiding refactors.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- minimal-diff
- group
- Build
- description
- Make the smallest correct change that fixes the problem, resisting every incidental refactor. Use when fixing bugs with the smallest surgical change, avoiding refactors.
- last_reviewed
- 1788652800000
02 资源文件 2
- 参考文档evals/routing.yaml829 B
- 其他minimal-diff.skill1.6 KB
03 SKILL.md 正文
Minimal Diff
Make the smallest correct change, and resist everything else.
Process
- Find the root cause before editing. The lazy fix and the correct fix are the same fix when you know where the problem actually is — a guard in the shared function beats a guard in every caller.
- Grep every caller of anything you are about to change. A change that fixes the reported path and leaves three sibling paths broken is not minimal, it is incomplete.
- Change only what the fix requires. Reformatting, renaming and reordering in the same diff hide the actual change from review.
- Do not add abstraction for a single case. One implementation does not need an interface.
- Leave the smallest check that would fail if the logic breaks — usually one test, not a suite.
- Note deliberate shortcuts with the ceiling and the upgrade path, so a knowing trade-off is not mistaken later for an oversight.
Deliverables
- Root cause statement, not a symptom description
- The diff, with unrelated changes excluded
- One test that fails without the fix
Verification & Quality Checklist
- [ ] Code compiles and all automated tests and typechecks pass without new warnings.
- [ ] Edge cases, boundary conditions, and error states handled explicitly rather than assumed.
- [ ] No hardcoded secrets, credentials, or insecure defaults introduced.
- [ ] Changes are covered by a test that fails without them.
Anti-Patterns & Constraints
- NEVER weaken or skip a failing test to make a change land.
- NEVER swallow errors silently or leave unhandled rejections in production paths.
- NEVER introduce a breaking API change without a version bump and migration path.
04 同仓库更多 Skills
workflow-optimizer
Moved to workflow-mapping in skills-agents. Removed in v4.1.
★ 0
webhooks
Build webhook receivers with signature verification, idempotency, retries and dead letter queues. Use when implementing, verifying, or signing incoming/outgoing webhooks.
★ 0
webhook-handler-builder
Moved to webhooks in skills-developer. Removed in v4.1.
★ 0
voice-ai-integration-engineer
Moved to speech-pipelines in skills-developer. Removed in v4.1.
★ 0
typescript-migrator
Moved to port-code in skills-developer. Removed in v4.1.
★ 0
trigger-dev
Moved to trigger-dev in skills-agents. Removed in v4.1.
★ 0