{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "hamzafer-claude-code-mods--guard-repo-from-destructive-commands",
 "repo": "hamzafer/claude-code-mods",
 "repo_url": "https://github.com/hamzafer/claude-code-mods",
 "repo_slug": "hamzafer-claude-code-mods",
 "title": "Stop Claude from running destructive commands unseen",
 "page_title": "How to stop Claude from running destructive commands unseen with Claude Code Mods",
 "summary": "Hold rm -r, force pushes and migrations, and see what they would delete before they run.",
 "who": "A developer who lets Claude Code run shell commands and wants a check before any delete, force push or migration goes through.",
 "problem": "A single rm -r or force push issued by an agent can remove files or rewrite history before anyone reads the command.",
 "outcome": "Risky commands stop at a preview that shows what they would delete, and they cancel after 60 seconds with no answer.",
 "steps": [
  "Run `npx claude-code-mods@latest`, tick blast-radius in the checklist, and press Enter to install it.",
  "Restart Claude Code.",
  "Ask Claude Code to delete a test folder you do not need, for example with rm -r.",
  "Read the preview of what would be deleted, then answer yes or no.",
  "Leave the prompt unanswered once and confirm the command is cancelled after 60 seconds."
 ],
 "agent_prompt": "In the hamzafer/claude-code-mods repo, install the blast-radius mod so Claude Code holds risky commands. Ask Claude Code to run rm -r on <test-folder> and confirm the expected output is a preview of the files that would be deleted, with the command cancelled if no answer comes within 60 seconds.",
 "agents": [
  "claude-code"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The installer edits the Claude profile that the claude command uses, so check the profile path shown at the top of the checklist first.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Claude Code 2.1.287 or newer",
  "npx available on your computer (the README installs with npx claude-code-mods@latest)",
  "Chrome, a terminal that shows images, and the Spotify app only for the mods that need them (md-preview, now-playing)",
  "An OpenAI organization Admin key only for openai-balance"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/hamzafer-claude-code-mods/guard-repo-from-destructive-commands/",
 "md": "https://dedupedai.com/use-cases/hamzafer-claude-code-mods/guard-repo-from-destructive-commands/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/hamzafer-claude-code-mods--guard-repo-from-destructive-commands.json",
 "api_version": "v1"
}
