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.
npx agentmods add skills/momentmaker/kaijutsu/dcgnpx skills add momentmaker/kaijutsu --skill dcggit clone --depth 1 https://github.com/momentmaker/kaijutsuWrote 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/skills/momentmaker/kaijutsu/dcg)<a href="https://agentmods.dev/skills/momentmaker/kaijutsu/dcg"><img src="https://agentmods.dev/badge/skills/momentmaker/kaijutsu/dcg.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.00095 | $0.01251 |
| Opus 5 | $0.00048 | $0.00626 |
| Sonnet 5 | $0.00019 | $0.00250 |
| Haiku 4.5 | $0.00010 | $0.00125 |
Grade D, and why
dcg scanned grade D with 3 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 6d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- `sudo ... rm -rf /` — same with sudo Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
| Claude Code | `~/.claude/settings.json` | `PreToolUse` | Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
description: Destructive Command Guard. Installs a pre-tool-use hook that blocks unrecoverable shell commands (rm -rf /, git reset --hard, git clean -fd, rm of .env / credentials, force-pushing to main, fork bombs, shred How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DCG — Destructive Command Guard
A pre-tool-use hook that intercepts every shell command the agent is about to run. If the command matches a known destructive pattern, the hook returns a non-zero exit and a stopReason payload, blocking execution.
What it blocks
rm -rf /— at rootsudo ... rm -rf /— same with sudogit reset --hard— irreversible discard of local workgit clean -fd— force-delete untracked files (commonly nukes.env, generated configs)git push --forcetomain/master— overwriting upstream history on protected branchesrmof.env/ credentials /.pem/ SSH keysshred/dd— disk destruction:(){ :|:& };:— fork bombchmod 777on$HOME— permission disasterfind $HOME -delete— bulk deletion in home
The full pattern list is in hooks/dcg.sh. New patterns can be added by appending to the patterns array.
What it does NOT block
By design DCG is a floor, not a ceiling:
rm -rf <project>/build— project-local cleanup is allowedgit reset HEAD~1— non---hardresets are recoverablerm .DS_Store— junk-file removal is allowed- Anything outside the agent's shell tool
This is intentional. Over-blocking causes alert fatigue; agents start either circumventing or losing trust. DCG focuses on the truly unrecoverable cases.
How install wires it up
jutsu install dcg registers a pre-tool-use hook with matcher Bash for every active agent:
| Agent | Settings file | Native event |
|---|---|---|
| Claude Code | ~/.claude/settings.json |
PreToolUse |
| OpenAI Codex CLI | ~/.codex/config.toml |
PreToolUse |
| Google Antigravity CLI | ~/.antigravity/settings.json |
BeforeTool |
Each entry is tagged with _kaijutsu: skill:dcg:hook:block-destructive-shell so jutsu remove dcg can clean up exactly what we added without disturbing user-authored hooks.
The script at hooks/dcg.sh is platform-agnostic POSIX bash — it reads the hook JSON from stdin, extracts the command field via jq (with a regex fallback if jq is absent), and matches against the pattern list.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 109 lines · 95 tokens per session scan D 4ca25d2090c1
dcg is a skill published in the GitHub repository momentmaker/kaijutsu (3 stars, last pushed 2mo ago), licensed MIT. It adds 95 tokens to every session and 1,251 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
printing-press-import
Bring a published CLI from the public library into the internal library so it's identical to a freshly-generated copy — module path reverted, manuscripts placed alongside, ready for /printing-press-polish or /printing-press-emboss. Use when the public library has a CLI you don't have locally, or to recover from a…
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
work
Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.
trace
Dispatch trace subagent to investigate unknown issues — reproduces, traces, and reports root cause for fix handoff.
preview-design
Render a real artifact through this branch's local MERIDIAN design code (not the published npm package) so the team can test the new Design Convention on the document / handoff / platform surfaces before it ships. Use for /preview-design, "preview the design convention", "render this with the new design", or Design…
sw-do
Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going".