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/watertian/cc-hud/setupgit clone --depth 1 https://github.com/WaterTian/cc-hudWrote 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/watertian/cc-hud/setup)<a href="https://agentmods.dev/commands/watertian/cc-hud/setup"><img src="https://agentmods.dev/badge/commands/watertian/cc-hud/setup.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 | $0.00012 | $0.00814 |
| Opus 5 | $0.00006 | $0.00407 |
| Sonnet 5 | $0.00002 | $0.00163 |
| Haiku 4.5 | $0.00001 | $0.00081 |
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 3d 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.
- User settings: `<HOME>/.claude/settings.json` How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Configure cc-hud as the Claude Code statusline. Since v0.5.0, cc-hud uses a stable-path launcher so future plugin upgrades do not require re-running this setup — the launcher resolves whichever cc-hud version is currently installed on each tick.
Steps below are idempotent — safe to re-run.
Step 1 — Resolve paths
Resolve the user's home directory:
node -e "console.log(require('os').homedir())"
Call the output HOME. From it derive:
- Launcher source:
${CLAUDE_PLUGIN_ROOT}/scripts/launcher.cjs - Launcher destination (stable path):
<HOME>/.claude/bin/cc-hud-launcher.cjs - User settings:
<HOME>/.claude/settings.json
Step 2 — Install the launcher
Always overwrite (the launcher is a managed file):
mkdir -p <HOME>/.claude/bin- Read
${CLAUDE_PLUGIN_ROOT}/scripts/launcher.cjsverbatim, then Write the exact same content to<HOME>/.claude/bin/cc-hud-launcher.cjs. Do not modify or annotate it.
The launcher reads <HOME>/.claude/plugins/installed_plugins.json on each tick and spawns the latest installed cc-hud's dist/index.js. Its contents stay valid across cc-hud versions, so this file rarely needs rewriting.
Step 3 — Update statusLine in ~/.claude/settings.json
Read <HOME>/.claude/settings.json (treat as {} if missing or unreadable). The target merged config:
{
"statusLine": {
"type": "command",
"command": "node <HOME>/.claude/bin/cc-hud-launcher.cjs",
"padding": 2
}
}
Substitute <HOME> with the absolute path — do not leave ~ or ${HOME} in the JSON.
Branch on the current statusLine.command:
- Missing → merge in the target. Tell user:
✓ statusLine registered (cc-hud launcher). - Already points at
cc-hud-launcher.cjs→ leave untouched. Tell user:✓ launcher already registered (idempotent skip). - Direct cc-hud path (contains
cc-hudanddist/index.js— i.e. the old version-pinned form) → overwrite. Tell user:✓ migrated statusLine from version-pinned path to stable launcher — future cc-hud upgrades no longer need re-running /cc-hud:setup. - cc-bot shim (contains
cc-botandstatusline.js) → leave untouched. Tell user:ℹ cc-bot's statusline shim already wraps cc-hud automatically — no change needed. - Other non-empty value → ask via
AskUserQuestionwhether to overwrite (default = keep existing). On "keep", skip the write and tell user the launcher is installed at<HOME>/.claude/bin/cc-hud-launcher.cjsfor manual wiring.
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.
- 3d ago First seen · 74 lines · 12 tokens per session scan B d8debad709a0
setup is a command published in the GitHub repository WaterTian/cc-hud (8 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 814 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
configure
Configure HUD display options (layout, language, presets, display elements) while preserving advanced manual overrides.
setup
Configure claude-hud as your statusline.
uninstall
Completely uninstall CAP and restore previous statusline.
setup
Configure claude-ultimate-hud as your statusline.
setup
Set up claude-statusline by registering it in /.claude/settings.json.
setup
Install or repair the Usage HUD statusline.