Damage Control
Skill2 starsChanged 9 months agoMITView on GitHub
Install, configure, and manage the Claude Code Damage Control security hooks system. Use when user mentions damage control, security hooks, protected paths, blocked commands, install security, or modify protection settings.
- Pipes a download into a shell
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- disler/claude-code-damage-controlword for word, first seen Jan 4, 2026
Other versions1 project uses a version of this.
Word for word · 1
- disler/claude-code-damage-control★ 480100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository239 other files it gives its agents.
- claude-code-docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- claude-code-docs/llms.txtllms.txt
- agent-native-architectureSkill
- claude-apiSkill
- embedding-strategiesSkill
- fal-ai-mediaSkill
- gemini-imagegenSkill
- hybrid-search-implementationSkill
- langchain-architectureSkill
- llm-evaluationSkill
- ml-pipeline-workflowSkill
- prompt-engineering-patternsSkill
- rag-implementationSkill
- similarity-search-patternsSkill
- vector-index-tuningSkill
- api-design-principlesSkill
- api-designSkill
- architecture-patternsSkill
- cqrs-implementationSkill
- event-store-designSkill
- fastapi-templatesSkill
- microservices-patternsSkill
- openapi-spec-generationSkill
- projection-patternsSkill
- saga-orchestrationSkill
- api-conventionsSkill
- andrew-kane-gem-writerSkill
- angular-migrationSkill
- auth-implementation-patternsSkill
- backend-patternsSkill
- bazel-build-optimizationSkill
- coding-standardsSkill
- database-migrationSkill
- debugging-strategiesSkill
- dependency-upgradeSkill
- dhh-rails-styleSkill
- dotnet-backend-patternsSkill
- dspy-rubySkill
- error-handling-patternsSkill
- monorepo-managementSkill
- nodejs-backend-patternsSkill
- nx-workspace-patternsSkill
- react-modernizationSkill
- temporal-python-testingSkill
- turborepo-cachingSkill
- workflow-orchestration-patternsSkill
- defi-protocol-templatesSkill
- nft-standardsSkill
- solidity-securitySkill
- web3-testingSkill
- backtesting-frameworksSkill
- billing-automationSkill
- competitive-landscapeSkill
- data-storytellingSkill
- employment-contract-templatesSkill
- investor-materialsSkill
- investor-outreachSkill
- kpi-dashboard-designSkill
- market-sizing-analysisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 106
Workflow: Read and execute cookbook/install_damage_control_ag_workflow.md
- Distinctive: line 112
Workflow: Read and execute cookbook/modify_damage_control_ag_workflow.md
- Distinctive: line 118
Workflow: Read and execute cookbook/manual_control_damage_control_ag_workflow.md
- Distinctive: line 132
Workflow: Read and execute cookbook/test_damage_control.md
- Distinctive: line 145
Workflow: Read and execute cookbook/build_for_windows.md
- Distinctive: line 202
Use the test prompts in test-prompts/ to validate the hooks:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Damage Control Skill
Defense-in-depth protection system for Claude Code. Blocks dangerous commands and protects sensitive files via PreToolUse hooks.
Overview
This skill helps users deploy and manage the Damage Control security system, which provides:
- Command Pattern Blocking: Blocks dangerous bash commands (rm -rf, git reset --hard, etc.)
- Ask Patterns: Triggers confirmation dialog for risky-but-valid operations (
ask: true) - Path Protection Levels:
zeroAccessPaths- No access at all (secrets/credentials)readOnlyPaths- Read allowed, modifications blockednoDeletePaths- All operations except delete
Skill Structure
.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.mdAfter Installation
The install workflow copies hooks and creates settings based on the chosen level:
Global Hooks
~/.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.pyProject Hooks
<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.pyProject Personal Hooks
<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.pyCookbook
This section defines the decision tree for handling user requests. Based on what the user says, read and execute the appropriate workflow prompt.
Installation Pathway
Trigger phrases: "install damage control", "setup security hooks", "deploy damage control", "add protection"
Workflow: Read and execute cookbook/install_damage_control_ag_workflow.md
Modification Pathway
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
Manual Control Pathway
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
Testing Pathway
Trigger phrases:
- "test damage control",
- "run damage control tests",
- "verify hooks are working"
- "damage control test this command <x>"
- "damage control test this read to this path <x>"
- "damage control test this write to this path <x>"
- "damage control test this delete to this path <x>"
- "damage control test this run this command <x>"
Workflow: Read and execute cookbook/test_damage_control.md
What it does:
- Reads patterns.yaml to get all configured patterns and paths
- Tests PreToolUse hooks (bash, edit, write) with exit code validation
- Tests ask patterns with JSON output validation
- Reports pass/fail for each test case
- Provides summary of all results
Windows Build Pathway
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:
- Checks for existing installation
- Adds Windows PowerShell and cmd patterns alongside Unix patterns
- Creates cross-platform patterns.yaml that works on both systems
Direct Command Pathway
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:
- "add ~/.credentials to zero access paths" → Edit patterns.yaml directly
- "block the command 'npm publish'" → Add pattern to bashToolPatterns
- "make /var/log read only" → Add to readOnlyPaths
Quick Reference
Settings File Locations
| 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) |
Path Protection Levels
| 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 |
Runtime Requirements
| 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 |
Exit Codes
| Code | Meaning |
| 0 | Allow operation |
| 0 | Ask (JSON output triggers dialog) |
| 2 | Block operation |
Testing
Use the test prompts in test-prompts/ to validate the hooks:
sentient_v1.md- Testsrm -rfblocking (bashToolPatterns)sentient_v2.md- Testsfind -deleteblocking (noDeletePaths)sentient_v3.md- Tests ask patterns (SQL DELETE with ID)sentient_v4.md- Tests simple command blocking
Run a test:
/project:test-prompts/sentient_v1Related Files
- cookbook/install_damage_control_ag_workflow.md - Installation workflow
- cookbook/modify_damage_control_ag_workflow.md - Modification workflow
- cookbook/manual_control_damage_control_ag_workflow.md - Manual guidance
- cookbook/list_damage_controls.md - List all configurations
- cookbook/test_damage_control.md - Test all hooks
- cookbook/build_for_windows.md - Add Windows patterns
- hooks/damage-control-python/ - Python implementation
- hooks/damage-control-typescript/ - TypeScript implementation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

