ai-agent-cost-optimizerlisted
Install: claude install-skill shipshitdev/skills
# AI Agent Cost Optimizer
Reduce AI agent spend without reducing shipped quality. Optimize for cost per correct completed task, not raw token count.
## When to Activate
Activate this skill when:
- AI coding bills, token usage, API inference cost, or model spend are too high
- Reviewing agent workflows for context waste, retry loops, or cache misses
- Choosing model tiers for planning, implementation, review, or cleanup tasks
- Evaluating claims about prompt caching, cheap models, or token savings
- Capturing repeated workflows so future agents do not rediscover the same context
## Core Principle
Price the model and context to the cost of failure.
Use more capable models when a wrong answer could create expensive rework, security risk, data loss, or architectural drag. Use cheaper models and smaller context when the task is bounded, reversible, test-covered, or mechanical.
Do not save tokens in ways that increase retries, hide important evidence, or lower code quality.
## Cost Audit Workflow
### 1. Establish the Spend Shape
Identify what is actually driving cost before recommending changes:
- API versus subscription spend
- Providers and models in use
- Workflows that run most often
- Average input, output, cached input, reasoning, and tool-call tokens when available
- Retry count, failed runs, and human correction time
- Whether costs come from a few large workflows or many small calls
If usage data is unavailable, mark it unknown and inspect local configs, logs,