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 commands/madappgang/magus/setupgit clone --depth 1 https://github.com/MadAppGang/magusWhat 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 | $0.00027 | $0.01463 |
| Opus 5 | $0.00014 | $0.00732 |
| Sonnet 5 | $0.00005 | $0.00293 |
| Haiku 4.5 | $0.00003 | $0.00146 |
Grade B, and why
setup scanned grade B with 1 finding 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 2d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
1. `~/.claude/settings.json` How it starts
The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Set up code-analysis
Three things, in this order: the shim, the server, the engine. Report all three at the end even when nothing needed changing — a setup command that prints nothing on a healthy system teaches the user nothing about what healthy looks like.
1. The ripgrep shim
The Grep tool runs ripgrep as a subprocess and resolves rg against PATH. A real file at
$HOME/.local/bin/rg is what makes that resolution land on us: the directory sits ahead of the
usual package-manager paths, and the file's mere existence stops the shell snapshot from
defining an rg function that would beat PATH inside Bash.
Read the current state first
ls -l "$HOME/.local/bin/rg" 2>/dev/null && head -6 "$HOME/.local/bin/rg" 2>/dev/null
command -v rg
type rg
The shim carries an owner marker in its header — OWNER= and VERSION= within the first six
lines. Parse it and branch:
OWNER= |
Do |
|---|---|
| absent (no file) | install |
code-analysis |
upgrade in place if VERSION= differs from this plugin's version; otherwise leave it |
| anything else | stop and ask. Another tool owns that path. Never clobber it silently |
Install
mkdir -p "$HOME/.local/bin"
cp "${CLAUDE_PLUGIN_ROOT}/assets/rg" "$HOME/.local/bin/rg"
chmod +x "$HOME/.local/bin/rg"
Route the Grep tool at it
Add to the project's .claude/settings.json:
{ "env": { "USE_BUILTIN_RIPGREP": "0" } }
That setting is a preference, not a switch. The host reads it as "prefer a system rg" and
falls through to its embedded copy without saying so when the PATH lookup finds nothing. So
never infer routing from the setting — read ripgrepStatus instead:
claude doctor --json
ripgrepStatus.mode is system when routing is live and embedded when it is not;
ripgrepStatus.systemPath says which file won.
Three things that break this silently
| Symptom | Check | Meaning |
|---|---|---|
command -v rg is not the shim path |
PATH order | something earlier on PATH shadows it |
type rg says "shell function" |
Bash only | a function beats PATH; the shim is bypassed inside Bash calls |
setting says 0, mode says embedded |
both of the above, or no file at all | routing is not live, and nothing reported an error |
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.
- 2d ago First seen · 153 lines · 27 tokens per session scan B c6f35ab11e0e
setup is a command published in the GitHub repository MadAppGang/magus (9 stars, last pushed 4d ago), licensed MIT. It adds 27 tokens to every session and 1,463 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
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.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.