From m2ai-skills-pack
Model token costs and optimization opportunities for any agent workflow, producing per-task costs, monthly burn, and model-routing savings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/m2ai-skills-pack:agent-cost-modelThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Takes an agent workflow description and produces a full cost model: per-task cost, daily/monthly burn, model-routing optimization, and break-even analysis.
Takes an agent workflow description and produces a full cost model: per-task cost, daily/monthly burn, model-routing optimization, and break-even analysis.
Use when the user says "cost model", "how much will this cost", "token economics", "estimate the cost", "optimize model costs", or describes an agent pipeline and asks about pricing.
Gather the workflow details. Ask for (accept estimates):
If the user can't estimate tokens, help them:
Use current Anthropic pricing (per million tokens):
| Model | Input | Output | Cache Write | Cache Read |
|---|---|---|---|---|
| Haiku 3.5 | $0.80 | $4.00 | $1.00 | $0.08 |
| Sonnet 4 | $3.00 | $15.00 | $3.75 | $0.30 |
| Opus 4 | $15.00 | $75.00 | $18.75 | $1.50 |
For other providers (OpenAI, Google, OpenRouter), ask the user or check current published rates. Do not guess pricing from training data -- ask or verify.
For each pipeline step, calculate:
step_cost = (input_tokens * input_price) + (output_tokens * output_price)
+ (cache_write_tokens * cache_write_price) + (cache_read_tokens * cache_read_price)
Then aggregate:
| Step | Model | Input Tokens | Output Tokens | Cost/Task |
|---|---|---|---|---|
| [step name] | [model] | [N] | [N] | $X.XXXX |
| ... | ... | ... | ... | ... |
| Total | $X.XXXX |
Daily burn: cost/task * tasks/day Monthly burn: daily * 30 Annual burn: monthly * 12
Identify savings opportunities:
Present as:
| Optimization | Monthly Savings | Effort |
|---|---|---|
| [description] | $X.XX (Y%) | [low/medium/high] |
# Agent Cost Model: [Pipeline Name]
## Per-Task Cost: $X.XXXX
## Monthly Burn (at N tasks/day): $X.XX
## Annual Burn: $X,XXX
## Cost Breakdown
[table from Phase 3]
## Optimization Opportunities
[table from Phase 4]
## Optimized Monthly Burn: $X.XX (savings: Y%)
## Break-Even Analysis
- vs. human labor at $X/hr: breaks even at N tasks/month
- vs. alternative approach: [comparison if relevant]
Extracted from Nate Kadlac newsletter (2026-03-26) -- "The K-Shaped AI Labor Market" -- cost/token economics as a core AI-native skill.
npx claudepluginhub m2ai-mcp-servers/claude-skills --plugin m2ai-skills-packGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.