agentsclimarketplace

Agent cost control

Skill Amey-Thakur/AI-SKILLS/skills/ai-coding-tools/agent-cost-control

Keep agent usage within budget through context discipline, model selection, and caching, without degrading results. Use when agent costs are rising or long sessions are expensive.From its SKILL.md

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill agent-cost-control

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.7 KB, as published. Nobody here has run it

Agent cost control

Cost scales with tokens processed, and most waste is context that was never needed. Controlling it is mostly about what you send rather than about using a weaker model.

Method

  1. Reduce context before reducing model. Trimming irrelevant files preserves quality while cutting cost; a weaker model may not (see context-compression).
  2. Use prompt caching for stable prefixes. Instructions and reference material that repeat across turns can be cached at substantially lower cost (see prompt-caching).
  3. Match the model to the task. Routine mechanical edits do not need the strongest model, while architectural work does (see agent-progressive-disclosure).
  4. Start fresh sessions for new tasks. Continuing in a long session carries the entire history into every subsequent turn.
  5. Avoid re-reading unchanged files. Repeated reads of the same large file across a session are pure duplication.
  6. Bound autonomous loops. An agent iterating without a cap can consume a large budget on a task it cannot complete (see agent-loop-until-exhausted).
  7. Measure cost per task, not per token. A more expensive model finishing in one pass often costs less than a cheap one iterating five times.

Boundaries

Cost optimisation must not compromise verification on consequential work (see agent-human-checkpoint). Pricing and caching behaviour differ by provider and change. The engineer's time is usually more expensive than the tokens, which bounds how much optimisation is worth.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.