Files
2dph/skills/agent-cost/SKILL.md
T
eSlider 63d3be0e19 build(ci): uv toolchain, release-please semver; feat(skills): vendor tools self-contained (no symlinks, relative refs)
- bin/db/psql-yq + bin/web/search + tools/{yamlout,websearch} vendored as real files
- bin/db/ssh-tunnel added (OnlyOffice VM pg on 5433)
- skills reference local bin/ paths; no agent-skills/abs links in git
- pyproject.toml + uv.lock; CI installs via uv sync --frozen
- release-please auto-tags semver from conventional commits when green
- LICENSE MIT, badges/mermaid README
2026-08-10 21:24:42 +01:00

1.2 KiB

name, description
name description
agent-cost Measure what an agent session actually costs in tokens using bin/agents/cost. Use before and after changing documentation, skills or context layout, and when a session feels unexpectedly expensive.

agent-cost

bin/agents/cost                        # every project, YAML
bin/agents/cost --repo 2dph            # only sessions whose cwd matches
bin/agents/cost --json | jq .cursor.by_tool
bin/agents/cost --snapshot after-x --repo 2dph   # append a row to docs/CONTEXT-BUDGET.md

Reads local session storage from OpenCode and Cursor transcripts. Reports the always-loaded baseline, cache hit/miss/thrash, and which tools moved the most bytes.

How to read it

  • Baseline is what every single message pays for: AGENTS.md plus anything eagerly linked from it. Keep it small; it multiplies by message count.
  • Cache thrash matters more than raw size. Editing a file that sits early in the context invalidates the prompt cache for the whole session.
  • by_tool bytes shows where the real spend is. Usually it is unfiltered command output, not documentation.

Rule

Measure before and after. A claim that something "reduces tokens" without a before and an after number is an opinion, not a result.