agent-kit-costlisted
Install: claude install-skill th3r-dev/th3-skills
# Agent cost
Most agent spend is waste of three kinds: a frontier model doing a search, an agent with no finish
line looping, and an agent spawned for work that was five tool calls. Each rule below cuts one of them.
Prompt-cache rules (byte-stable prefixes, forks, SendMessage, TTL) live in
[`../prompt-cache/SKILL.md`](../prompt-cache/SKILL.md); follow both.
## Rules
1. **Do it inline first.** A lookup whose target you know, or a handful of tool calls, costs less in
this session than any agent: an agent re-reads context, and its summary drops detail you then
redo. Spawn only for independent work that can run in parallel, or a side task that would flood
this context with file dumps.
2. **Route by tier, start cheap.** Set `model` on every Agent call:
| Work | `model` |
|---|---|
| search, file inventory, reading logs, collecting facts | `haiku` |
| a bounded code change with a test, a review of one diff | `sonnet` |
| planning, multi-file architecture, a task a cheaper tier already failed | omit (inherit) or `opus` |
Escalate one tier when an agent fails its finish line, not before. The orchestrator plans; workers
on cheaper tiers execute.
3. **Every brief has a finish line.** Goal, scope (files, what not to touch), what to return, and how
done is checked (a command and its expected output, a test name, a count). "Improve this" with no
check is how an agent loops.
4. **Split big jobs into checkpoints.** Several small agents with testable