Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Forge Llm Cost Optimization?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-forge-llm-cost-optimization)
---
name: forge-llm-cost-optimization
description: Cut LLM latency and cost with prompt caching, model routing, token budgets, batching and evals that guard quality
---
<!-- Generated from catalog/skills/llm-cost-optimization/SKILL.md by scripts/build-plugin.ts. Edit the catalog, not this file. -->
# LLM cost optimization
Every optimization must be checked against an eval, or you are trading quality for savings blindly.
## Tokens
- Measure tokens per request and per feature first.
- Trim system prompts and context; retrieve less but better; cap `max_tokens`.
## Caching and routing
- Use provider prompt caching for long stable prefixes; cache full responses for repeated deterministic queries.
- Route easy tasks to smaller models; escalate on low confidence.
## Throughput
- Batch APIs for offline work; stream for perceived latency; set timeouts and per-user quotas.
## Verify
Report cost and latency per request before and after, alongside eval scores showing quality held.