From safety-net
Guides users through configuring custom blocking rules for claude-code-safety-net, supporting user-level and project-level scopes with merge or replace options.
How this command is triggered — by the user, by Claude, or both
Slash command
/safety-net:set-custom-rulesThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
You are helping the user configure custom blocking rules for claude-code-safety-net. ## Context ### Schema Documentation !`npx -y cc-safety-net --custom-rules-doc` ## Your Task Follow this flow exactly: ### Step 1: Ask for Scope Use AskUserQuestion to let user select scope: ### Step 2: Show Examples and Ask for Rules Show examples in natural language: - "Block `git add -A` and `git add .` to prevent blanket staging" - "Block `npm install -g` to prevent global package installs" - "Block `docker system prune` to prevent accidental cleanup" Ask the user to describe rules in natural...
You are helping the user configure custom blocking rules for claude-code-safety-net.
!npx -y cc-safety-net --custom-rules-doc
Follow this flow exactly:
Use AskUserQuestion to let user select scope:
{
"questions": [
{
"question": "Which scope would you like to configure?",
"header": "Configure",
"multiSelect": false,
"options": [
{
"label": "User",
"description": "(`~/.cc-safety-net/config.json`) - applies to all your projects"
},
{
"label": "Project",
"description": "(`.safety-net.json`) - applies only to this project"
}
]
}
]
}
Show examples in natural language:
git add -A and git add . to prevent blanket staging"npm install -g to prevent global package installs"docker system prune to prevent accidental cleanup"Ask the user to describe rules in natural language. They can list multiple.
Parse user input and generate valid schema JSON using the schema documentation above.
Then show the generated config JSON to the user.
Use AskUserQuestion to let user choose:
{
"questions": [
{
"question": "Does this look correct?",
"header": "Confirmation",
"multiSelect": false,
"options": [
{
"label": "Yes",
},
{
"label": "No",
}
]
}
]
}
cat ~/.cc-safety-net/config.json 2>/dev/null || echo "No user config found"cat .safety-net.json 2>/dev/null || echo "No project config found"If the chosen scope already has a config:
Show the existing config to the user. Use AskUserQuestion tool to let user choose:
{
"questions": [
{
"question": "The chosen scope already has a config. What would you like to do?",
"header": "Configure",
"multiSelect": false,
"options": [
{
"label": "Merge",
},
{
"label": "Replace",
}
]
}
]
}
Write the config to the chosen scope, then validate with npx -y cc-safety-net --verify-config.
If validation errors:
Tell the user:
npx claudepluginhub crmitchelmore/claude-code-safety-net --plugin safety-net6plugins reuse this command
First indexed Jan 8, 2026
/hookifyInteractively creates hookify rule files to warn or block unwanted behaviors from conversation analysis or explicit instructions, after user confirmation.
/install-guardrailsInstalls an opt-in PreToolUse guardrail that blocks dangerous git/shell commands (git push, reset --hard, rm -rf /) before Bash runs them. Copies a matcher script into project or user settings.
/setupApplies Casper security settings to Claude Code .claude/settings.json by merging deny/allow rules and telemetry env vars without overwriting. Confirms changes and reminds to restart.
/allowAllows warden-blocked or flagged commands by adding YAML rules to project (.claude/warden.yaml) or user (~/.claude/warden.yaml) config. Supports args for commands/subcommands or recent context.
/hookifyCreates hook rules to prevent unwanted Claude Code behaviors by analyzing conversation patterns or explicit user instructions. Generates rule files in .claude/hookify.*.local.md.