Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/waleedkhanbaloch/claude-code-safety-netWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/waleedkhanbaloch/claude-code-safety-net/set-custom-rules)<a href="https://agentmods.dev/commands/waleedkhanbaloch/claude-code-safety-net/set-custom-rules"><img src="https://agentmods.dev/badge/commands/waleedkhanbaloch/claude-code-safety-net/set-custom-rules.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00006 | $0.00724 |
| Opus 5 | $0.00003 | $0.00362 |
| Sonnet 5 | $0.00001 | $0.00145 |
| Haiku 4.5 | $0.00001 | $0.00072 |
Grade A, and why
set-custom-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
{
"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"
}
]
}
]
}
Step 2: Show Examples and Ask for Rules
Show examples in natural language:
- "Block
git add -Aandgit add .to prevent blanket staging" - "Block
npm install -gto prevent global package installs" - "Block
docker system pruneto prevent accidental cleanup"
Ask the user to describe rules in natural language. They can list multiple.
Step 3: Generate and Show JSON Config
Parse user input and generate valid schema JSON using the schema documentation above.
Then show the generated config JSON to the user.
Step 4: Ask for Confirmation
Use AskUserQuestion to let user choose:
{
"questions": [
{
"question": "Does this look correct?",
"header": "Confirmation",
"multiSelect": false,
"options": [
{
"label": "Yes",
},
{
"label": "No",
}
]
}
]
}
Step 5: Check and Handle Existing Config
- Check existing User Config with
cat ~/.cc-safety-net/config.json 2>/dev/null || echo "No user config found" - Check existing Project Config with
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",
}
]
}
]
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 133 lines · 6 tokens per session scan A f0abe1bd448a
set-custom-rules is a command published in the GitHub repository waleedkhanbaloch/claude-code-safety-net (2 stars, last pushed today), licensed MIT. It adds 6 tokens to every session and 724 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
agentlas-local
Staff a task only from Agentlas agents registered on this machine.
dashboard-session-list
List all pi sessions (id, status, name, cwd). Runs locally, no LLM.
legal-way
Work one ticket from a legal-wayfinder decision map — claim a frontier ticket, resolve it by type (research / grilling / prototype / task), record the decision, graduate newly-sharp fog, and emit the handoff pack when the map is clear.
aw-upgrade
Upgrade gh-aw extension, recompile and validate all workflows, and open a PR with changes.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.