cost-tracker
Per-agent per-session cost tracking with configurable ceilings and model tier optimization.
- License 许可
- GPL-3.0
- 最近更新
- 2026-04-24
- Stars
- ★ 1
- Forks
- 3
01 前言 Front Matter
- name
- cost-tracker
- next
- [ "investor-updates" ]
- group
- operate
- workflows
- [ "continuous-improvement" ]
- description
- Per-agent per-session cost tracking with configurable ceilings and model tier optimization.
- prerequisites
- []
- user-invocable
- true
03 SKILL.md 正文
Cost Tracker
Track token usage and estimated cost per agent session. Enforce budget ceilings and optimize costs by routing tasks to the appropriate model tier.
Steps
- Record input and output token counts for every LLM invocation and tool call. Calculate cost using the model's pricing table.
- Aggregate costs by agent session, task, and time period (daily, weekly). Store in
.harness/costs/. - Load per-task budget ceilings from
.harness/agents/*.json. Post a warning at 80% of budget. Hard-stop the agent at 100% and escalate to Slack with a spend summary. - Route tasks to the appropriate model tier based on complexity:
- Haiku: trivial tasks (typos, formatting, simple edits)
- Sonnet: standard tasks (feature implementation, bug fixes)
- Opus: complex tasks (architecture decisions, multi-file refactors)
- Generate per-agent and aggregate cost summaries for investor update reports.
- Store historical cost data for trend analysis and budget forecasting.
Anti-Patterns
- Running Opus for 200 turns on a simple formatting task with no ceiling enforcement
- Tracking only output tokens and ignoring input tokens, underreporting actual spend
- No alerting configured -- team discovers overspend only at end of month
- Estimating costs instead of calculating from actual token counts and pricing tables
Validation
- Every LLM call has a recorded cost entry with both input and output tokens
- Budget ceiling triggers warning at 80% and hard-stops at 100%
- Trivial tasks route to Haiku, not Opus
- Cost reports show per-agent, per-task, and aggregate breakdowns with exact numbers
04 同仓库更多 Skills
writer-memory
Agentic memory system for writers - track characters, relationships, scenes, and themes
wiki
LLM Wiki — persistent markdown knowledge base that compounds across sessions (Karpathy model)
website-creation
Build production-quality SaaS websites with opinionated design presets. Use when creating any startup website. The user MUST pick a design style before building. Enforces shadcn/ui, Figma design principles, specific CSS values per style, and anti-AI-writing. Load alongside anti-ai-writing skill. LIGHT MODE ONLY.
visual-verdict
Structured visual QA verdict for screenshot-to-reference comparisons
visual-qa-pipeline
Screenshot every page with Playwright, feed to visual QA agent for design evaluation, report results to Slack. Use after every build phase to verify UI matches the chosen design preset. Integrates with the Playwright skill and the website-creation preset system.
verify
Verify that a change really works before you claim completion