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/holyshite/claude-hud-for-api/setupgit clone --depth 1 https://github.com/holyshite/claude-hud-for-apiWrote 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/holyshite/claude-hud-for-api/setup)<a href="https://agentmods.dev/commands/holyshite/claude-hud-for-api/setup"><img src="https://agentmods.dev/badge/commands/holyshite/claude-hud-for-api/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.00016 | $0.00771 |
| Opus 5 | $0.00008 | $0.00385 |
| Sonnet 5 | $0.00003 | $0.00154 |
| Haiku 4.5 | $0.00002 | $0.00077 |
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 4d 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.
Read `~/.claude/settings.json` first (use the Read tool). Then update it to add the `statusLine` config. How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude HUD Setup
自动配置 Claude Code 状态栏,显示实时 token 使用量和模型信息。
你的任务
按照以下步骤自动完成配置,无需让用户手动操作。
Step 1: 检测 node 路径
Run which node to find the node binary path. If it returns empty, also try:
- Check common paths:
~/.nvm/versions/node/*/bin/node - Check if there's a node in PATH via
command -v node
Save the node path for later use.
Step 2: 找到插件目录
插件通过 Claude Code plugin 系统安装时,文件在 ~/.claude/plugins/<plugin-name>/ 下。但 Claude 不会自动告诉你这个路径。
Run these to find the plugin directory:
# Check common plugin locations
ls -d ~/.claude/plugins/claude-hud 2>/dev/null || \
ls -d ~/.claude/plugins/claude-token-hud 2>/dev/null || \
ls -d ~/.claude/plugins/claude-hud-for-api 2>/dev/null || echo "NOT_FOUND"
If NOT_FOUND, the user may have cloned the repo manually. Ask them for the full path, or check the current working directory.
Step 3: 验证插件入口
# Verify the entry point exists
ls -la <plugin_dir>/dist/index.js
If it doesn't exist, you may need to build:
cd <plugin_dir> && npm run build
Step 4: 配置 settings.json
Read ~/.claude/settings.json first (use the Read tool). Then update it to add the statusLine config.
The statusLine config format:
{
"statusLine": {
"type": "command",
"command": "<node_path> <plugin_dir>/dist/index.js",
"padding": 1
}
}
Important rules:
command字段直接是命令字符串,不要用bash -c包裹- 用空格分隔 node_path 和插件路径
- 如果 settings.json 已有其他配置,只更新
statusLine字段,保留其他字段 - 使用 Edit 工具精确替换,不要重写整个文件
Step 5: 验证安装
Run this to test the plugin works:
echo '{"model":{"display_name":"Claude Test"},"context_window":{"context_window_size":200000,"current_usage":{"input_tokens":45000}}}' | node <plugin_dir>/dist/index.js
Expected output: something like Claude Test | ██░░░░░░░░ 23% 45k/200k
Step 6: 告知用户
告诉用户配置完成,状态栏会在 Claude Code 重启后显示。如果用户想立即看到效果,建议运行 /reload-plugins。
可用的 slash 命令
/claude-hud:setup- 自动配置状态栏(当前命令)/claude-hud:configure- 查看并编辑 HUD 显示选项、颜色和格式配置
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.
- 4d ago First seen · 93 lines · 16 tokens per session scan B 15ffd7600e36
setup is a command published in the GitHub repository holyshite/claude-hud-for-api (2 stars, last pushed 4mo ago), licensed MIT. It adds 16 tokens to every session and 771 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
plan
Plan a feature or initiative through a computed route — a small fix exits with no documents, one capability gets a spec and a plan, a large initiative gets an umbrella PRD with one spec per capability; name sdd, sources, iso, or research to run that path directly.
make
Create structured implementation plan in docs/plans/.
document
Record a decision as an ADR or RFC, or document existing code as a spec, doc, guide, or rule; routes to the right document type.
init
First-time Archcore setup — detect the repo, compose the full first-day seed in one preview, create it on one confirm, and wire host configs.
review
Review branch changes against Archcore docs, or report project health; --drift runs staleness detection, --deep a full documentation audit.
repo-cleanup
Commit accumulated spec doc changes: survey, group by logical batch, branch, commit, merge.