cc-hud: Instructions file for Claude Code

AGENTS.md

cc-hud AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from WaterTian/cc-hud. It costs 5,513 tokens per session, scanned C, original, MIT.

A technical reference for cc-hud, a compact status bar for Claude Code and a footer preset for Codex CLI. It documents what the display shows, how to install it, and the files, processes, and network endpoints involved.

In plain words
What is it for?
It is for maintaining cc-hud, checking its displayed model, context, usage, and spending information, and verifying its installation and runtime contract.
Why use it?
It gives maintainers one place to check the tool's runtime rules and expected behavior when changing it. Keeping this reference aligned with the README and maintainer notes helps prevent stale instructions.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: Claude Code plugin machinery, but also reads $CODEX_HOME. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions CLAUDE.md.

This is WaterTian/cc-hud's own configuration. It tells Claude Code, Codex and OpenCode how to work on cc-hud itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-hud configures →

Reuse

Borrowing it

Nothing to install: this file belongs to WaterTian/cc-hud. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/WaterTian/cc-hud/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/WaterTian/cc-hud

Made for: Claude Code, Codex, OpenCode.

Wrote 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.

agentmods badge for cc-hud AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/watertian/cc-hud/agents-md/github.svg)](https://agentmods.dev/instructions/watertian/cc-hud/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/watertian/cc-hud/agents-md"><img src="https://agentmods.dev/badge/instructions/watertian/cc-hud/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cc-hud AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/watertian/cc-hud/agents-md"><img src="https://agentmods.dev/badge/instructions/watertian/cc-hud/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,513 This file is loaded in full into every session.
When invoked 5,513 The same file — it is already loaded in full.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.05513 $0.05513
Opus 5.5 $0.02205 $0.02205
Sonnet 5.5 $0.01103 $0.01103
Haiku 4.5 $0.00551 $0.00551

Measured 3d ago against content hash 8190be6a57ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

cc-hud AGENTS.md scanned grade C with 2 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 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

optionally `rm -rf ~/.cache/cc-hud`.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| spawns | `curl --config -` (token via stdin, never argv); `security find-generic-password` on macOS | refresher only |
AGENTS.md · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cc-hud — agent reference

Compact single-line status bar for Claude Code, plus a one-command native footer preset for Codex CLI. This file is the machine-oriented reference: exact commands with expected output, the runtime contract, every file, process and endpoint the tool touches, and the invariants to keep when changing it. The human tour is README.md; maintainer notes (Chinese) are in CLAUDE.md. Keep the three in sync when behaviour changes.

What it renders

[Fable 5.1 · XHigh] █▊░░░░░░░░ 18% (1M) │ ◐ explore [haiku] │ 5h:1% (4.5h) │ 7d:35% (4.1d) │ Fable:51% │ spend:$12/$50 (3d) │ cc-hud · main*
Segment Source Shown when
[Fable 5.1 · XHigh] model.id (fallback display_name), effort.level (fallback: transcript) always; depth only when an effort is known
█▊░░░░░░░░ 18% context_window.used_percentage, else derived from current_usage tokens ÷ context_window_size always; —% until Claude Code reports usage (session start, right after /compact)
(1M) [1m] suffix in model.id, or context_window_size ≥ 1_000_000 extended-context sessions
◐ explore [haiku] <transcript dir>/<session>/subagents/agent-*.meta.json without finished: true (Claude Code writes one per Agent call at launch, async); fallback: a transcript-tail Agent tool_use with no tool_result (older synchronous builds) while a subagent runs (max 3 listed); an unfinished meta idle for > 15 min is ignored
5h:1% (4.5h) / 7d:35% (4.1d) rate_limits.five_hour / seven_day (used_percentage, resets_at); MiniMax quota on that backend subscription sessions (absent for API-key sessions)
Fable:51% OAuth usage endpoint, via the detached refresher's cache official backend with rate limits; ~ prefix = cache older than 30 min
spend:$12/$50 (3d) rate_limits.spend_limit when the org sets a spend cap; bare % if dollar figures are absent
one day:7% any other rate_limits.<key> with used_percentage whenever Claude Code adds a window cc-hud has no slot for
cc-hud · main* workspace.current_dir (fallback cwd), worktree.branch or git symbolic-ref, git status --porcelain always; * = uncommitted tracked changes, ? = status failed/timed out, no branch outside a repo
¥13.44 CC_HUD_EXTRA_FILE first line, else DeepSeek balance, else GLM balance when one of those applies; ~ prefix (also on 5h / 7d from MiniMax) = cached value not refreshed for > 30 min

Read the full file on GitHub · 241 lines

Changes

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.

  1. 3d ago Changed · +1 lines · +243 tokens per session 8190be6a57ac
  2. 4d ago First seen · 240 lines · 5,270 tokens per session scan C 8b284d875a1d

Subscribe to this mod's changes

cc-hud AGENTS.md is an instructions file published in the GitHub repository WaterTian/cc-hud (9 stars, last pushed 4d ago), licensed MIT. It adds 5,513 tokens to every session, about $0.0221 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-06.

Related

cc-hud AGENTS.md compared with instructions from other repositories

cc-hud AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cc-hud AGENTS.mdWaterTian/cc-hudInstructions file94d agoMITC5,513Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot