{"slug": "your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill", "title": "Your AI coding agent is 100x more expensive than it needs to be — I built a skill to fix that", "summary": "A developer released a free, open-source skill called agent-cost-control that cuts AI coding agent costs by routing routine tasks to cheaper models, enforcing written justification before any task goes to a flagship model, and setting monthly budgets with alerts and a kill switch. The skill, which works with Claude Code, Codex and Copilot, also addresses context waste through prompt caching and batch pricing; a worked refactor example prices at $0.02 on Haiku versus $1.11 on Fable, against a 100x per-token spread between the two models on the Anthropic API.", "body_md": "An AI coding agent is cheap until it is not. One long session on the most expensive model, one runaway loop re-reading a whole codebase, one fleet of parallel agents each on a flagship model — and the bill is ten times what the work was worth.\n\nThe price spread is the whole story. On the Anthropic API, as published in October 2026: Haiku 5.5 costs $0.10 per million input tokens. Fable 5.1 costs $10. That is 100x for the same million tokens — and most routine agent work does not need the expensive model at all.\n\nThe skill enforces one more rule: no task gets routed to Fable/Opus without a named reason written down. That one line stops most of the waste.\n\nA budget nobody watches is not a budget. The skill sets a monthly dollar budget with alerts at 50% and 80%, a per-task cap, and a kill switch — a spend limit that stops the run instead of letting it keep going. It also writes a cost record (agent-cost.json or COST.md) with the budget and the routing table, so the next run starts from the same rules.\n\nMost agent spend is not the model — it is context. Re-reading whole files instead of the changed lines, loops that re-fetch what was already fetched, parallel agents each re-doing the same setup. The skill covers prompt caching, batch pricing (50% off), and estimating a task's cost before running it. One worked example in the skill prices the same refactor on all four models: $0.02 on Haiku, $1.11 on Fable.\n\nThe skill is free and open source: [https://github.com/jeffdrizzy/agent-cost-control-skill](https://github.com/jeffdrizzy/agent-cost-control-skill)\n\nIt works with Claude Code, Codex, Copilot and other agents, and it includes a check script that verifies a project has a budget, a routing table, and a spend guard.\n\nIf you build with AI agents, your bill is a design decision. Make it before the run, not after.\n\nIf this helped, you can support my open-source work here: [https://github.com/sponsors/jeffdrizzy](https://github.com/sponsors/jeffdrizzy)", "url": "https://wpnews.pro/news/your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill", "canonical_source": "https://dev.to/jeffdrizzy/your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill-to-fix-that-42hf", "published_at": "2026-11-27 12:41:52+00:00", "updated_at": "2026-11-27 12:45:13.439963+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["Anthropic", "Claude Code", "Codex", "Copilot", "Haiku 5.5", "Fable 5.1", "jeffdrizzy"], "also_reported_by": [], "takeaway": "Routing routine agent tasks to a cheap model and requiring a written reason before using a flagship model can cut a refactor's cost from $1.11 on Fable to $0.02 on Haiku, with prompt caching and batch pricing (50% off) further reducing spend.", "recommendation": {"advice": "Set a monthly dollar budget with 50% and 80% alerts, a per-task cap and a kill switch, and require a named written reason before routing any task to a flagship model.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill", "markdown": "https://wpnews.pro/news/your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill.md", "text": "https://wpnews.pro/news/your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill.txt", "jsonld": "https://wpnews.pro/news/your-ai-coding-agent-is-100x-more-expensive-than-it-needs-to-be-i-built-a-skill.jsonld"}}