Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add latestaiagents/agent-skills --skill cost-quality-tradeoffgit clone --depth 1 https://github.com/latestaiagents/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/latestaiagents/agent-skills/cost-quality-tradeoff)<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/cost-quality-tradeoff"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/cost-quality-tradeoff/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/cost-quality-tradeoff"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/cost-quality-tradeoff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00098 | $0.01448 |
| Opus 5 | $0.00049 | $0.00724 |
| Sonnet 5 | $0.00020 | $0.00290 |
| Haiku 4.5 | $0.00010 | $0.00145 |
Grade A, and why
cost-quality-tradeoff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cost vs Quality Tradeoff
Quality without cost context is half a decision. You need the Pareto frontier — for each quality bar, what's the cheapest config that hits it?
When to Use
- Choosing a default model for a new feature
- Reducing LLM spend on an existing feature
- Justifying (or not) an upgrade to a premium model
- Trading off prompt complexity, model size, and thinking budget
The Pareto Frontier
Plot each candidate config (model × prompt × settings) on quality (y-axis) vs cost per request (x-axis). The frontier is the set of configs where no other config is both cheaper AND better.
Any config NOT on the frontier is dominated — always strictly worse than another option. Drop it.
quality
↑
1 | *A (opus + thinking)
| *B (opus)
|*G *D (sonnet + few-shot)
|*F *C (sonnet)
0 |*E (haiku)
+---------------→ cost
Pareto: A, B, D, C, E. Dominated: F (worse than E at same cost), G (worse than D at same cost).
Measurement
For each candidate, measure:
| Metric | Example |
|---|---|
| Input tokens / request | 2,500 |
| Output tokens / request | 400 |
| $ / request | $0.012 |
| Quality score | 0.87 |
| p95 latency | 1.8s |
const costPerRequest = (usage.input_tokens / 1e6) * inputRate +
(usage.output_tokens / 1e6) * outputRate +
(usage.cache_creation_input_tokens / 1e6) * cacheWriteRate +
(usage.cache_read_input_tokens / 1e6) * cacheReadRate;
Always include cache costs — they dominate on cached workloads.
Common Configs to Compare
For any feature, try at least:
- Haiku with concise prompt
- Haiku with longer / few-shot prompt
- Sonnet with concise prompt
- Sonnet with few-shot + structured output
- Sonnet with extended thinking
- Opus with concise prompt
- Opus with extended thinking
One of these usually sits on the frontier for your workload. Don't assume — measure.
Prompt as a Lever
Before jumping to a bigger model, try prompt levers:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 165 lines · 98 tokens per session scan A 4f784c70630c
cost-quality-tradeoff is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 98 tokens to every session and 1,448 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
ai-enterprise-ai-usecase-priority-assessment
A business-diagnosis helper for deciding which enterprise AI use cases deserve attention first. It turns supplied information into a summary, findings, recommended actions, and reusable deliverables.
mem0-integration
Mem0 memory layer integration for AI agents. Implement persistent, semantic memory for long-term context retention and personalization.
chroma-integration
Chroma local vector database setup and operations for development and production.
few-shot-example-gen
Few-shot example generation and optimization for improved LLM performance.
llm-classifier
LLM-based zero-shot and few-shot classification for flexible intent detection.
fw-review
Full Freshworks marketplace app review — iparams, frontend, serverless, FDK, security, and structured text report output — in one skill.