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 skills/fmind/dot/agent-usagenpx skills add fmind/dot --skill agent-usagegit clone --depth 1 https://github.com/fmind/dotWrote 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/skills/fmind/dot/agent-usage)<a href="https://agentmods.dev/skills/fmind/dot/agent-usage"><img src="https://agentmods.dev/badge/skills/fmind/dot/agent-usage.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.00050 | $0.01126 |
| Opus 5 | $0.00025 | $0.00563 |
| Sonnet 5 | $0.00010 | $0.00225 |
| Haiku 4.5 | $0.00005 | $0.00113 |
Grade A, and why
agent-usage scanned grade A with 0 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 yesterday.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Usage
Token usage for all AI harnesses (agy, claude, codex, copilot, grok, opencode) is recorded to ~/.agents/usages/<harness>/<session_id>.json on session completion and turn boundaries.
Directory Layout & Schema
Every session record is stored atomically with permissions 0o600:
~/.agents/usages/
├── agy/
│ └── <session_id>.json
├── claude/
│ └── <session_id>.json
├── codex/
│ └── <session_id>.json
├── copilot/
│ └── <session_id>.json
├── grok/
│ └── <session_id>.json
└── opencode/
└── <session_id>.json
Each record contains:
{
"timestamp": "2026-09-03T18:00:00Z",
"harness": "claude",
"agent": "claude",
"session_id": "abc-123",
"model": "claude-opus-5",
"input_tokens": 12500,
"output_tokens": 3400,
"cached_tokens": 82000,
"cache_write_tokens": 1200,
"reasoning_tokens": 0,
"total_tokens": 99100,
"cost_usd": 0.1425,
"turn_count": 8,
"cwd": "~/project"
}
Commands
dot agent usage stats # summary table of token usage per harness
dot agent usage stats --by-model # break down token usage by harness and model
dot agent usage stats --harness claude # filter stats to a specific harness
dot agent usage stats --since 24h --json # emit json array for scripting
dot agent usage list -n 20 # list recent session records
dot agent usage show claude <session_id> # inspect a specific session record
dot agent usage sync # scan raw stores and backfill missing records
duckdb -c "SELECT harness, count(*), sum(total_tokens) FROM read_json_auto('~/.agents/usages/*/*.json', union_by_name=true) GROUP BY harness" # ad-hoc SQL
Workflow
- Check aggregate usage: run
dot agent usage statsto inspect overall token consumption and costs across harnesses. - Break down by model: run
dot agent usage stats --by-modelwhen comparing prompt efficiency or model tiers. - Filter by time window: pass
--since 24hor--since 7dto isolate a recent sprint or experiment. - Deep dive with DuckDB: query
~/.agents/usages/*/*.jsondirectly withread_json_autoinduckdbfor custom aggregations, percentiles, or CSV exports. - Synchronize historical sessions: run
dot agent usage syncafter adding an integration to extract metrics from historical transcripts.
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.
- yesterday First seen · 91 lines · 50 tokens per session scan A 0962c1eead69
agent-usage is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,126 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
go-stack
Build Go projects, libraries, CLIs, TUIs, web apps, or ADK agents with the standard package layout and pinned tooling.
python-stack
Build typed Python projects with uv, Ruff, ty, pytest, Litestar, and Typer. Use for packages, CLIs, web apps, tests, typing, or API verification.
hugo
Canonical Hugo static-site stack with the Hextra docs theme — Hugo Modules, mise tasks, dprint, lefthook, and GitHub Pages deploy. Use for documentation sites, project docs, and static websites.
k8s-local
Create and manage local Kubernetes clusters (k3d or kind) and deploy to them with kubectl, helm, helmfile, and skaffold. Use for local k8s cluster setup, dev loops, and debugging.
release
Cut or verify a versioned release — bump semver, generate the changelog with git-cliff, tag and publish on GitHub, or reconcile an already-published tag and assets.
chezmoi
Manage chezmoi dotfiles: source naming, Go templates, age-encrypted secrets, and the edit-source then apply/diff workflow.