codex-hud: Instructions file for Claude Code

CLAUDE.md

codex-hud CLAUDE.md is an instructions file for Claude Code, Codex from haenara-shin/codex-hud. It costs 477 tokens per session, scanned B, original, MIT.

A command-line tool for viewing OpenAI Codex token usage, rate limits, and API costs. It reads information from local Codex logs and, where available, the Codex app server.

In plain words
What is it for?
Use it to check today's or weekly token usage, view local-only activity, inspect rate limits and model information, see daily cost breakdowns, or print a short summary.
Why use it?
It collects usage information that would otherwise be spread across log files or difficult to inspect. This helps developers see how much Codex is being used and what API activity costs.

Instructions file for Claude CodeCodex

Written for Claude Code and Codex: Claude Code plugin machinery, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

This is haenara-shin/codex-hud's own configuration. It tells Claude Code and Codex how to work on codex-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 codex-hud configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/Haenara.SHIN/Documents/2_Study.

Reuse

Borrowing it

Nothing to install: this file belongs to haenara-shin/codex-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/haenara-shin/codex-hud/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/haenara-shin/codex-hud

Made for: Claude Code, Codex.

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 codex-hud CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/haenara-shin/codex-hud/claude-md/github.svg)](https://agentmods.dev/instructions/haenara-shin/codex-hud/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/haenara-shin/codex-hud/claude-md"><img src="https://agentmods.dev/badge/instructions/haenara-shin/codex-hud/claude-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 codex-hud CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/haenara-shin/codex-hud/claude-md"><img src="https://agentmods.dev/badge/instructions/haenara-shin/codex-hud/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 477 This file is loaded in full into every session.
When invoked 477 The same file — it is already loaded in full.
Security scan B 1 finding. 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.00477 $0.00477
Opus 5 $0.00238 $0.00238
Sonnet 5 $0.00095 $0.00095
Haiku 4.5 $0.00048 $0.00048

Measured 9d ago against content hash 82c024a9d945, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

codex-hud CLAUDE.md 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 9d 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.

- **Codex app-server RPC**: Codex **0.142+** writes rate limits NOWHERE on disk — they're only available by asking `codex app-server` over JSON-RPC (`account/rateLimits/read`, camelCase fields). ~1s/call, so codex-hud ca
CLAUDE.md · 40 lines

What it actually says

codex-hud

Claude Code plugin that displays OpenAI Codex API usage and costs.

Build

npm install
npm run build

Test locally

node dist/index.js                    # Help
node dist/index.js setup --json       # Check API key status
node dist/index.js usage week         # Token usage (local + API)
node dist/index.js usage today --local-only  # Local logs only
node dist/index.js costs today        # Cost breakdown (API only)
node dist/index.js costs week --daily # Daily cost breakdown
node dist/index.js summary            # One-line summary

Install in Claude Code

/plugin install local "/Users/Haenara.SHIN/Documents/2_Study (Python, Math)/personal/3_codex_hud_in_cc"

Data Sources

  • Local rollout logs: ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (no API key needed) — usage + rate limits from the interactive Codex TUI.
  • Local app-server DB: ~/.codex/logs_2.sqlite (codex.rate_limits events) — rate limits + model for Codex 0.140–0.141 run via the app-server / Claude Code codex plugin. Read via node:sqlite (Node 22.5+) or the sqlite3 CLI.
  • Codex app-server RPC: Codex 0.142+ writes rate limits NOWHERE on disk — they're only available by asking codex app-server over JSON-RPC (account/rateLimits/read, camelCase fields). ~1s/call, so codex-hud caches it (~/.claude/plugins/codex-hud/ratelimit_cache.json, 5-min TTL) and refreshes in a detached background process. Model + effort come from ~/.codex/config.toml (the RPC doesn't return them).
  • OpenAI API: /v1/organization/costs and /v1/organization/usage/completions (needs Admin API key)

API Key

Set OPENAI_ADMIN_KEY env var or run /codex-hud:setup to store in config.

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. 9d ago First seen · 40 lines · 477 tokens per session scan B 82c024a9d945

Subscribe to this mod's changes

codex-hud CLAUDE.md is an instructions file published in the GitHub repository haenara-shin/codex-hud (8 stars, last pushed 2mo ago), licensed MIT. It adds 477 tokens to every session, about $0.0024 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.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens