model-usage
Summarize Hermes model usage windows by provider.
Files2
View on GitHubSKILL.mdskills/devops/model-usage/SKILL.md
GitHubModel Usage Skill
Summarize Hermes model usage windows by provider: how much of each quota window is used, when it resets, and which window is closest to exhausted. The source is Hermes' own accounting in agent/account_usage.py (fetch_account_usage, AccountUsageSnapshot, AccountUsageWindow), not any third-party cost log.
When to Use
- User asks how much usage is left, which model is closest to its limit, or when a window resets
- Before a long run, to check whether the current provider has headroom
- Comparing usage across providers (Codex, Anthropic, OpenRouter, Nous)
- Turning a
/usageblock orhermes usageoutput into a short summary
Prerequisites
- Run commands with the
terminaltool hermes usageis available on any Hermes host; in a session the same block comes from/usage- Providers with a usage fetcher report windows (Codex, Anthropic, OpenRouter, Nous, plus provider plugins with a usage hook). A provider with no usage endpoint reports nothing; that is a gap in the provider, not a failure to summarize.
How to Run
- Fetch the snapshot with
terminal:hermes usage --jsonfor the configured provider, orhermes usage --provider <slug> --jsonfor one provider. - Summarize with the bundled script (skill-relative path
scripts/model_usage.py), or read the text block directly. - Report the most-used window first, with its reset time, and say which windows are account-scope vs model-scope.
Quick Reference
hermes usage
hermes usage --provider codex
hermes usage --provider anthropic --json
hermes usage --json | python scripts/model_usage.py --mode current
hermes usage --provider codex --json > /tmp/codex-usage.json
python scripts/model_usage.py --input /tmp/codex-usage.json --mode all
hermes usage --json prints one JSON document: provider, title, plan, fetched_at, windows (each with label, used_percent, resets_at, detail), details, unavailable_reason. It exits 1 when nothing could be fetched: no credential configured, no usage endpoint, or the fetch failed.
Procedure
- Fetch fresh numbers. A snapshot older than about 15 minutes is stale: usage windows move in minutes, and the picker cache is at most one turn or one refresh interval behind. Re-run
hermes usageinstead of quoting an old block. - Read the windows. Each
AccountUsageWindowcarries alabel,used_percent,reset_at, anddetail, plus a scope:accountscope: exhausting this window exhausts the whole login.modelscope: the window caps only one model family and never implies the account itself is out of quota.
- Summarize with the bundled script:
--mode current: the most-used window per provider (the one closest to exhausted).--mode all: every window, most-used first.--format jsonkeeps the structured form for piping.
- Present the summary: provider, plan, most-used window with percent used and reset time, then the remaining windows in descending use. State
fetched_atso the reader knows how fresh the numbers are. - For several providers, fetch one JSON document per provider and pass them all to the script with repeated
--inputflags; the script groups by provider.
Pitfalls
- Do not present a stale snapshot as live. If
fetched_atis old, re-fetch before answering. - A provider with no usage endpoint returns nothing. Say so plainly; do not invent a percentage.
used_percentcan be missing for a window (the provider did not report it). Report the window as unavailable, not as 0% used.- Usage windows are quota gauges, not cost. Hermes has no per-model cost log; do not present percents as dollars.
- Do not reference any external cost-log tool: Hermes usage comes from
agent/account_usage.pyandhermes usage.
Verification
- The summary's most-used window matches the top line of
hermes usagerun again immediately after. - Every percent in the summary traces to a
used_percentin the JSON document; every reset time traces to aresets_at. - Re-running the fetch after a window resets shows the new window with a fresh
fetched_at.