Check whether a code change is complete. Use before editing exported code, after a multi-file edit, when reviewing a diff, or when a large repository makes you unsure what a change reaches. Do not use for docs-only changes, one-line fixes, generated files, or when the repository has no source.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Change Guard?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ankurhalder-change-guard)
---
name: change-guard
description: Check whether a code change is complete. Use before editing exported code, after a multi-file edit, when reviewing a diff, or when a large repository makes you unsure what a change reaches. Do not use for docs-only changes, one-line fixes, generated files, or when the repository has no source.
---
# Change Guard
The hook runs this check automatically after edits. Use the commands when you need the full
answer, when the hook is not installed, or when the user asks what a change breaks.
## Use when
- You are about to change an exported function, class, type, or route.
- You changed two or more files, or one file that other files import.
- The user asks "what does this break?", "what else uses this?", or "review this".
- You are about to say "done" after a multi-file change.
## Do not use when
- The change is documentation, comments, formatting, or a generated file.
- The repository is tiny and you have already read every file.
- A clean guard report was already produced in this turn.
## Commands
~~~bash
npx codebase-snapshot@0.22.5 guard --changed
npx codebase-snapshot@0.22.5 guard --paths src/auth.ts --format json
npx codebase-snapshot@0.22.5 guard --diff origin/main --format json
~~~
## Read the output
- `changed`: the paths the guard treated as the change set. An empty set means the host sent no
path the repository could resolve; the hook then prints `{}` and there is nothing to do.
- `gaps`: everything the change reaches outside the diff. Each entry has `kind`
(`consumer`, `test` or `route`), `path`, and optional `distance`, `via`, `confidence`,
`covers` and `methods`. Open the nearest consumers before declaring the change complete, and
run the tests whose `covers` names an affected file.
- `confidence`: `symbol-pruned` means the traversal matched the changed symbols;
`file-import` means it could only follow file-level imports. Treat the second as a candidate
list, not proof.
- `trust.coverage`: `partial` means the traversal hit a depth or file limit. Say so rather than
implying completeness.
- `truncated` and `omitted`: true when the list was capped, with separate
`consumers`, `tests` and `routes` counts for what was left out.
## Stop
- If `trust.coverage` is `complete` and `gaps` is empty, stop. Do not re-run the guard.
- Do not paste the JSON into the answer; summarize the gaps and what you did about them.
- A clean report is not proof. It means no gap was found within the stated bounds.