Skip to content
Back to skills

Report

ASecurity

Report Codex token usage, expensive turns or skills, models, session comparisons, usage history, budget insights, live usage, dashboards and aggregate exports. Use when asked where tokens went, what a session cost, or to compare agent usage.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
ai-agentspythonrustshellapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add Wicked-Sick-Ltd/token-usage --skill report --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Report?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Report
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wicked-sick-ltd-report/badge)](https://www.skillsdirectory.com/skills/wicked-sick-ltd-report)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: report
description: Report Codex token usage, expensive turns or skills, models, session comparisons, usage history, budget insights, live usage, dashboards and aggregate exports. Use when asked where tokens went, what a session cost, or to compare agent usage.
---

Use the bundled token-usage MCP server with `runtime: "codex"`. Its tools are
`session_cost`, `history`, `insights`, `diff`, and `top_consumers`; discover their
actual names in this session. Prefer an explicit `session_id` from CODEX_THREAD_ID
or a rollout path. Say when discovery picked the latest session instead.

If MCP is unavailable, run the bundled `scripts/token_usage.py` with Python 3.9+
(`python` on Windows, `python3` on macOS/Linux). Resolve the installed plugin root
from this file; do not assume PLUGIN_ROOT is set in an interactive shell.

```text
python <plugin>/scripts/token_usage.py report --runtime codex <rollout.jsonl> --models --agents
python <plugin>/scripts/token_usage.py history --runtime codex --since 7d --by project
python <plugin>/scripts/token_usage.py insights --runtime codex <rollout.jsonl>
python <plugin>/scripts/token_usage.py top_consumers --runtime codex --since 30d
python <plugin>/scripts/token_usage.py json --runtime codex --diff <old.jsonl> <new.jsonl>
python <plugin>/scripts/token_usage.py live --runtime codex <rollout.jsonl>
python <plugin>/scripts/token_usage.py dashboard --runtime codex --output usage.html
python <plugin>/scripts/token_usage.py export --runtime codex --scope history --output usage.jsonl
```

Read-only sources are `$CODEX_HOME/sessions` and `archived_sessions`, defaulting
to `~/.codex`; tests and exports can use `TOKEN_USAGE_CODEX_HOME`. Reports and
ledgers are local. Do not read credentials or send transcripts elsewhere.

Report measurement confidence and warnings. Attribution follows turns and explicit
skill names; it does not infer which skill caused a shell call. Cached input is
part of input, and reasoning is part of output: never add them twice. Missing
usage is unmeasured, not free. Unpriced models display an unknown cost; don't
guess a rate. Costs use API-equivalent estimates and user pricing overlays,
not the user's ChatGPT subscription bill or remaining allowance.

The Stop hook updates a separate `codex-<session-id>.json` ledger and emits budget
nudges when priced usage crosses TOKEN_USAGE_BUDGET_USD. Hooks require the user's
review through `/hooks`; installation does not grant trust. Python must be on PATH.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…