Damage Control

Enforce YAML-based protective patterns and path restrictions across Bash, Edit, and Write tools.

478|78|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/disler/claude-code-damage-control --skill damage-control
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Damage Control
Source: https://github.com/disler/claude-code-damage-control/tree/main/.claude/skills/damage-control
Command: npx skills add https://github.com/disler/claude-code-damage-control --skill damage-control

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Damage Control prevents dangerous commands from executing by enforcing protective patterns and path restrictions, reducing the risk of accidental or malicious data loss.

Core Features & Use Cases

  • Blocks dangerous commands across Bash, Edit, and Write tools using YAML-defined patterns.
  • Enforces path protections like zeroAccessPaths, readOnlyPaths, noDeletePaths.
  • Useful for securing development environments, CI workflows, and sensitive project directories.

Quick Start

Install and configure the Damage Control hooks in your environment. Then run tests to verify that dangerous commands are blocked and that legitimate operations are allowed at appropriate levels.

Frequently Asked Questions about Damage Control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent dangerous bash commands from executing in Claude Code?

To prevent dangerous bash commands in Claude Code, you can enforce protective YAML patterns and path restrictions using PreToolUse hooks. This blocks risky commands before execution, securing your development environment from accidental or malicious data loss.

Can I restrict file edits and writes to protect sensitive project directories?

Yes, you can restrict file edits and writes by enforcing path protections like zeroAccessPaths and readOnlyPaths. Applied across Edit and Write tools, these YAML-based patterns safeguard secrets, configurations, and critical project files from unauthorized modification.

What are Claude Code PreToolUse hooks and how do they secure a project?

Claude Code PreToolUse hooks are scripts that intercept tool calls before execution. By checking commands against YAML-defined patterns, they secure a project by blocking destructive operations and enforcing path restrictions across Bash, Edit, and Write tools.

Does Damage Control work with Python UV and TypeScript Bun for hook scripts?

Yes, Damage Control supports hook scripts written in Python UV or TypeScript Bun. This allows you to implement PreToolUse and PermissionRequest flows that validate commands against your patterns.yaml file before they execute.

How do I configure noDeletePaths to stop accidental file deletion in CI workflows?

You can stop accidental file deletion in CI workflows by defining noDeletePaths in your patterns.yaml configuration. This enforces path protections that block destructive Bash, Edit, or Write tool actions targeting critical project directories.

What is the best way to secure secrets and configurations from malicious edits?

The best way to secure secrets and configurations is by enforcing zeroAccessPaths and readOnlyPaths via YAML-based patterns. This hardens Claude Code by preventing unauthorized access and modifications to your most sensitive files.