Individual skill
cost-tracking
Use when metering and capping AI or cloud app spend — tokens read from the response `usage` object, priced off a dated rate table, ledgered per user/tenant/feature, with alerts and a hard cap before the bill. NOT cash runway (that is `finance-ops`), NOT cost-per-unit margin (that is `unit-economics`), NOT booking the spend (that is `bookkeeping`).
skills/cost-tracking/SKILL.md
Source commit d9d6bb338f66cc1e23998585e580a0ea45bbcb82
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 557
- Repository last updated
- Nov 4, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- agentic-ai Repository topic
- ai-agents Repository topic
- ai-coding Repository topic
- claude-code Repository topic
- cli Repository topic
- cline Repository topic
- codex Repository topic
- coding-assistant Repository topic
- cursor Repository topic
- cost-tracking Declared skill tag
- token-accounting Declared skill tag
- llm-spend Declared skill tag
- budgets Declared skill tag
- alerts Declared skill tag
- prompt-caching Declared skill tag
- billing-guardrails Declared skill tag
- finops Declared skill tag
- finance Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 12,991 bytesSKILL.mdcore · 12,991 bytesSKILL.mdcore · 12,991 bytesSKILL.mdcore · 12,991 bytesevals/README.mddoc · 1,120 bytesevals/cases.yamlasset · 3,219 bytesreferences/cloud-caps.mddoc · 2,673 bytesreferences/pricing-tables.mddoc · 3,316 bytesscripts/verify.shruns · 5,472 bytes
Read excerpt
# Cost tracking
You are building the money meter for an AI or cloud app: every model call gets a token count, a price, a ledger row, and a budget check — so a cap fires *before* the invoice, not when finance forwards it in a panic. Model-API spend roughly doubled from $3.5B to $8.4B between late 2024 and mid 2025 (firecrawl.dev best-llm-observability-tools, accessed 2026-06-02); the bill is now big enough to need a guardrail, not a spreadsheet at month-end.
The chain you build, in order — each step feeds the next:
1. **Capture** — read tokens from the response, not from a pre-send guess.
2. **Price** — multiply tokens by a *versioned, dated* rate table.
3. **Ledger** — append one idempotent row per request, tagged for attribution.
4. **Budget** — roll the ledger up against a soft and a hard threshold.
5. **Guard** — alert, degrade, or refuse before the threshold becomes an invoice.
The one rule that organizes everything: **bill against the response `usage` object. Anything you compute before the call is an estimate — good only for the pre-flight cap check, never for the ledger.**