A guardrail layer for AI coding agents. It runs as a Claude Code PreToolUse hook and blocks or asks before destructive commands, secret access, protected-path writes and risky MCP calls, before the tool runs.
It is a seatbelt, not a sandbox. See What it is not.
uv tool install damage-control-dev # or: pipx install damage-control-dev damage-control-dev init # register the hooks, self-test them, record the install damage-control-dev status # read-only drift report Supports Claude Code on macOS and Linux, Python 3.9 or newer. Nothing else is supported or planned.
damage-control-dev check "git push --force origin main" # what would the hooks decide? damage-control-dev explain "git push --force origin main" # how it was judged: words, files read, rules, mode damage-control-dev rules # list enforced rule ids damage-control-dev packs # list packs; enabling is human-terminal only damage-control-dev doctor --fix # self-test and repair damage-control-dev uninstall # remove exactly our entries What it is not Not a sandbox, and not a boundary against a determined adversary. A process running as the same OS user can edit anything this tool can. Only as strong as the harness's hook surface: commands you type yourself with !, tools that have no hook event, and a hook that times out are outside its reach. No network egress filtering, containment or resource limits. Expect false positives and false negatives. The policy is: ask, then learn. See docs/threat-model.md.
Everything the installer keeps is under ~/.damage-control/ (or $DAMAGE_CONTROL_HOME), except the policy file, which is always ~/.damage-control/damagecontrol.yml:
A policy with no packs: key loads the default groups and no vendor packs; an unreadable policy loads everything.
If the environment breaks (for example a uv tool install --force interrupted mid-upgrade) and the hook cannot start, every tool call is blocked by design. Run python3 ~/.damage-control/bin/damage-control-breakglass unregister from a normal terminal, then reinstall and run init again.
A bypass of a shipped rule that the threat model says should be caught is a vulnerability. Report it privately, see SECURITY.md.
Apache-2.0. Contributions are signed off under the DCO, see CONTRIBUTING.md.
Both files in this release have provenance metadata.
Apache Software License (Apache-2.0)
agent ai claude-code guardrails hooks safety
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Nov 21, 2026 2 release files Full provenance
Nov 10, 2026 2 release files Full provenance
Nov 7, 2026 2 release files Full provenance
Nov 6, 2026 2 release files Full provenance
Nov 5, 2026 2 release files Full provenance
Nov 3, 2026 2 release files Full provenance
Nov 2, 2026 2 release files Full provenance




