Install, configure, and manage the Claude Code Damage Control security hooks system...
Defense-in-depth protection system for Claude Code. Blocks dangerous commands and protects sensitive files via PreToolUse hooks.
This skill helps users deploy and manage the Damage Control security system, which provides:
ask: true)zeroAccessPaths - No access at all (secrets/credentials)readOnlyPaths - Read allowed, modifications blockednoDeletePaths - All operations except delete.claude/skills/damage-control/
āāā SKILL.md # This file
āāā patterns.yaml # Shared security patterns (single source of truth)
āāā cookbook/
ā āāā install_damage_control_ag_workflow.md
ā āāā modify_damage_control_ag_workflow.md
ā āāā manual_control_damage_control_ag_workflow.md
ā āāā list_damage_controls.md
ā āāā test_damage_control.md
ā āāā build_for_windows.md
āāā hooks/
ā āāā damage-control-python/ # Python/UV implementation
ā ā āāā bash-tool-damage-control.py
ā ā āāā edit-tool-damage-control.py
ā ā āāā write-tool-damage-control.py
ā ā āāā python-settings.json
ā ā āāā test-damage-control.py
ā āāā damage-control-typescript/ # Bun/TypeScript implementation
ā āāā bash-tool-damage-control.ts
ā āāā edit-tool-damage-control.ts
ā āāā write-tool-damage-control.ts
ā āāā typescript-settings.json
ā āāā test-damage-control.ts
āāā test-prompts/ # Test prompts for validation
āāā sentient_v1.md
āāā sentient_v2.md
āāā sentient_v3.md
āāā sentient_v4.md
The install workflow copies hooks and creates settings based on the chosen level:
~/.claude/
āāā settings.json # Hook configuration
āāā hooks/
āāā damage-control/
āāā patterns.yaml
āāā bash-tool-damage-control.py (or .ts)
āāā edit-tool-damage-control.py
āāā write-tool-damage-control.py
<agents current working directory>/
āāā .claude/
āāā settings.json # Hook configuration (shared)
āāā hooks/
āāā damage-control/
āāā patterns.yaml
āāā bash-tool-damage-control.py (or .ts)
āāā edit-tool-damage-control.py
āāā write-tool-damage-control.py
<agents current working directory>/
āāā .claude/
āāā settings.local.json # Personal overrides (gitignored)
āāā hooks/
āāā damage-control/
āāā patterns.yaml
āāā bash-tool-damage-control.py (or .ts)
āāā edit-tool-damage-control.py
āāā write-tool-damage-control.py
This section defines the decision tree for handling user requests. Based on what the user says, read and execute the appropriate workflow prompt.
Trigger phrases: "install damage control", "setup security hooks", "deploy damage control", "add protection"
Workflow: Read and execute cookbook/install_damage_control_ag_workflow.md
Trigger phrases: "help me modify damage control", "update protection", "change blocked paths", "add restricted directory"
Workflow: Read and execute cookbook/modify_damage_control_ag_workflow.md
Trigger phrases: "how do I manually update", "explain damage control config", "show me the settings"
Workflow: Read and execute cookbook/manual_control_damage_control_ag_workflow.md
Trigger phrases:
- "test damage control",
- "run damage control tests",
- "verify hooks are working"
- "damage control test this command
Workflow: Read and execute cookbook/test_damage_control.md
What it does:
Trigger phrases: "build for windows", "add windows patterns", "convert to windows", "windows damage control"
Workflow: Read and execute cookbook/build_for_windows.md
What it does:
Trigger phrases: "update global read only paths to include X", "add /secret to zero access paths", "block command Y"
Action: Execute immediately without prompts - the user knows the system.
Examples:
| Level | Path | Scope |
|---|---|---|
| Global | ~/.claude/settings.json |
All projects |
| Project | .claude/settings.json |
Current project (shared) |
| Project Personal | .claude/settings.local.json |
Current project (personal) |
| Type | Read | Write | Edit | Delete | Use Case |
|---|---|---|---|---|---|
zeroAccessPaths |
No | No | No | No | Secrets, credentials |
readOnlyPaths |
Yes | No | No | No | System configs, history |
noDeletePaths |
Yes | Yes | Yes | No | Important project files |
| Implementation | Runtime | Install Command |
|---|---|---|
| Python | UV (Astral) | curl -LsSf https://astral.sh/uv/install.sh | sh |
| TypeScript | Bun | curl -fsSL https://bun.sh/install | bash && bun add yaml |
| Code | Meaning |
|---|---|
| 0 | Allow operation |
| 0 | Ask (JSON output triggers dialog) |
| 2 | Block operation |
Use the test prompts in test-prompts/ to validate the hooks:
sentient_v1.md - Tests rm -rf blocking (bashToolPatterns)sentient_v2.md - Tests find -delete blocking (noDeletePaths)sentient_v3.md - Tests ask patterns (SQL DELETE with ID)sentient_v4.md - Tests simple command blockingRun a test:
/project:test-prompts/sentient_v1