block-dangerous-commands
v1.0.0A PreToolUse guard for Bash that blocks dangerous shell commands before they execute: rm targeting home/root/system dirs, dd to disk devices, mkfs, fork bombs, curl|sh, force push to main, git reset --hard, chmod 777, docker volume rm, and more. Three safety levels (critical/high/strict, picked via HOOK_SAFETY_LEVEL) control how much is blocked, and per-level ask mode (HOOK_ASK_*) turns a hard deny into a prompt you approve or reject. Every block is logged with the pattern id and reason.
By Karan BansalLicense: MIT533 GitHub starsUpdated 2 weeks ago
Directory evidence
- Runtimes
- Claude Code
- Parsed components
- 0 skill or MCP entries
- Source updated
- Oct 4, 2026
- Manifest status
- Canonical path parsed
The directory validates manifest shape and source location. It does not execute the plugin or provide a security endorsement. Review the indexing methodology →
Install block-dangerous-commands for Claude Code
claude plugin marketplace add IchenDEV/agent-plugin-mkt
claude plugin marketplace update agent-plugin-marketplace
claude plugin install block-dangerous-commands@agent-plugin-marketplacePaste and run these commands in a terminal with Claude Code. They add and refresh the PluginsMP catalog, then install this plugin.
The installer fetches third-party code from the source repository shown on this page. This directory validates manifest structure and source location, but does not perform a security audit; review the manifest, components, and source before installing.
Get the source manually
git clone https://github.com/karanb192/claude-code-hooksClone the source repository, then follow its setup instructions to add the plugin to a compatible client. The plugin root is plugins/block-dangerous-commands/.
Plugin files
└── .claude-plugin/plugin.json
Plugin manifests1
{
"name": "block-dangerous-commands",
"description": "A PreToolUse guard for Bash that blocks dangerous shell commands before they execute: rm targeting home/root/system dirs, dd to disk devices, mkfs, fork bombs, curl|sh, force push to main, git reset --hard, chmod 777, docker volume rm, and more. Three safety levels (critical/high/strict, picked via HOOK_SAFETY_LEVEL) control how much is blocked, and per-level ask mode (HOOK_ASK_*) turns a hard deny into a prompt you approve or reject. Every block is logged with the pattern id and reason.",
"version": "1.0.0",
"author": {
"name": "Karan Bansal",
"url": "https://github.com/karanb192"
},
"homepage": "https://github.com/karanb192/claude-code-hooks",
"license": "MIT",
"keywords": [
"claude-code",
"hooks",
"security",
"safety",
"guardrails",
"bash",
"pretooluse"
]
}For maintainers
If you maintain this plugin, link to this source-backed listing from your README so users can review its manifest and indexed components.
[block-dangerous-commands on Agent Plugins Marketplace](https://pluginsmp.com/plugins/block-dangerous-commands)