damage-control
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.
Install
mkdir -p .claude/skills/damage-control && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2540" && unzip -o skill.zip -d .claude/skills/damage-control && rm skill.zipInstalls to .claude/skills/damage-control
About this skill
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.md
After 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.py
Project 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.py
Project 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.py
Cookbook
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_v1
Related 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
More by disler
View all skills by disler →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBuild persistent semantic networks for enterprise & engineering data management. Enable data persistence and memory acro
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
Desktop Commander MCP unifies code management with advanced source control, git, and svn support—streamlining developmen
Send and receive WhatsApp messages directly from Claude and other AI assistants. Search conversations, manage contacts,
MCP Installer simplifies dynamic installation and configuration of additional MCP servers. Get started easily with MCP I
Empower your CLI agents with NotebookLM—connect AI tools for citation-backed answers from your docs, grounded in your ow
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.