All products
Production AI Skills

AI Cost Optimization Playbook

Cut your LLM costs by 60-90%. Without sacrificing quality.

Cut LLM costs by 60-90% without sacrificing quality.
See use cases ↓
One-time paymentLifetime updatesCommercial license

5

Skills

5

Layers

60-90%

Typical savings

What you'll be able to do

Concrete outcomes, not vague promises.

01

Your LLM bill is growing faster than usage

Last month $2k, this month $8k, next month projected $30k. You don't know where the money is going. Finance is asking questions.

Run the cost audit. Find the waste. Apply the funnel. Cut the bill by 60-90% without losing quality.
02

You're using the most expensive model for everything

Sonnet for every call, including simple classification. Haiku would work for 80% of your calls at 1/30 the cost.

Audit by task type. Route simple tasks to Haiku, complex tasks to Sonnet. Save 60-70% with no quality loss.
03

You're building for scale

1k users today, 100k next quarter. At current cost, 100k users = $50k/month. You need a cost-aware architecture from day 1.

Apply the funnel. Build cost attribution. Set budgets per feature. Scale without the bill scaling linearly.

Built for

If any of these are you, this is for you.

AI engineers whose LLM bill is growing too fastAI engineering managers who need cost attribution across teamsCTOs who need to defend LLM costs to the boardIndie hackers who need LLM features to be profitable
Built withpi-agentClaude CodeCursorClineMarkdownOpenAI, Anthropic, Google (vendor-agnostic)

Why this playbook works

Three things that make this different from a wall of prompts.

The 5-layer funnel

Cache first (50-90% reduction). Token optimization second (20-50%). Model selection third (50-80%). Batch API fourth (50% off). Fine-tune last. Apply in order.

Most teams find 80% waste

The first audit almost always reveals 80% waste. Unnecessary calls, oversized prompts, expensive models for simple tasks. The pack teaches you to find it.

Quality preservation

Cost optimization doesn't mean quality loss. The pack teaches you to measure quality (via evals) and optimize cost with the constraint that quality doesn't drop.

Quick start

Drop the package into your project and start using the commands.

terminal
$tar -xzf cost-optimization-0.1.0.tgz && cd cost-optimization-0.1.0
$# Pick your agent host
$ls adapters/
$# pi-agent: cp -r skills/* ~/.pi/agent/skills/

What's in the box

  • 5 skills
    funnel + 4 layer skills
  • 5 tool adapters
    pi-agent, Claude Code, Cursor, Cline, generic
  • 2 worked examples
    token reduction + budget alerts
  • Cost math per layer
    know the savings
  • Vendor-agnostic
    works with any LLM provider

Everything in the pack

What you get the moment your payment clears.

cost-optimization skill — master orchestrator + 5-layer optimization funnel
token-economics skill — input vs output, prompt caching, batch API, context window math
model-selection skill — cost/quality tradeoff, distillation, fine-tuning economics
caching-strategies skill — prompt caching, semantic caching, response caching
finops-for-llms skill — cost attribution, budgets, alerts, vendor management
5 tool adapters — pi-agent, Claude Code, Cursor, Cline, generic
2 worked examples — token cost reduction + budget alert setup

Adapters included

These skills were authored for pi-agent, but we include drop-in adapters for the major AI coding tools.

ToolAdapter locationWhat you get
pi-agentadapters/pi-agent/SKILL.md drop-in
Claude Codeadapters/claude-code/.claude/commands/*.md + CLAUDE.md
Cursoradapters/cursor/.cursorrules rule sets
Cline / Continueadapters/cline/System-prompt rules
Aider / genericadapters/generic/INSTRUCTIONS.md snippets

Same playbook, different packaging. The adapters translate the methodology into the format each tool expects. Install once, swap agents without re-learning the method.

Full documentation

Everything in the package, every prop, every pattern.

AI Cost Optimization Playbook

Cut your LLM costs by 60-90%. Without sacrificing quality.

Built and battle-tested. 5 skills covering token economics, model selection, caching strategies, and FinOps for LLMs. Adapters for pi-agent, Claude Code, Cursor, Cline.

What's Inside

SkillPurpose
cost-optimizationMaster orchestrator — the cost discipline, where money is hiding, the optimization funnel
token-economicsToken math: input vs output, prompt caching, context window economics, batch pricing
model-selectionPicking the right model, cost/quality tradeoffs, distillation, fine-tuning economics
caching-strategiesPrompt caching, semantic caching, response caching, when each is right
finops-for-llmsCost attribution, budgets, alerts, FinOps discipline applied to LLM workloads

Quick Start

# 1. Extract
tar -xzf cost-optimization-0.1.0.tgz
cd cost-optimization-0.1.0

# 2. Pick your agent host
ls adapters/

# pi-agent (recommended)
mkdir -p ~/.pi/agent/skills
cp -r skills/* ~/.pi/agent/skills/

# Claude Code
mkdir -p .claude/commands
cp -r adapters/claude-code/commands/* .claude/commands/

The Core Idea

The single sentence that ties this whole pack together:

The cheapest LLM call is the one you don't make. The second cheapest is the one that's 100x smaller.

The pack teaches the cost optimization funnel: stop unnecessary calls (caching, deduplication) → reduce call size (token optimization) → use cheaper models (model selection) → batch where possible (batch API) → only then fine-tune. Every layer saves 30-60% when applied.

The 5 Skills in Detail

cost-optimization — The orchestrator

  • The optimization funnel (cache → token → model → batch → fine-tune)
  • Where money hides (most teams find 80% waste on first audit)
  • The "is it worth it?" check

token-economics — Stage 1

  • Input vs output cost (output is 4-5x more expensive)
  • Prompt caching (Anthropic) — 90% cost reduction on cached reads
  • Context window economics
  • Batch API pricing (50% off)

model-selection — Stage 2

  • Cost/quality tradeoff matrix
  • When to use Haiku vs Sonnet vs Opus
  • Distillation (fine-tune small model from large)
  • Fine-tuning economics (when it's worth it)

caching-strategies — Stage 0 (the biggest win)

  • Prompt caching (provider-level)
  • Semantic caching (caching similar queries)
  • Response caching (caching identical queries)
  • When each is right (and when it's wrong)

finops-for-llms — The discipline

  • Cost attribution (per user, per feature, per team)
  • Budgets and alerts
  • Showback vs chargeback
  • Vendor management (rate negotiations, volume discounts)

Adapters Included

Works in every major AI coding tool:

ToolAdapter locationWhat you get
pi-agentadapters/pi-agent/SKILL.md drop-in
Claude Codeadapters/claude-code/.claude/commands/*.md + CLAUDE.md fragments
Cursoradapters/cursor/.cursorrules rule sets
Cline / Continueadapters/cline/System-prompt rules
Aider / genericadapters/generic/INSTRUCTIONS.md snippets

Updates

Free for life. Re-download for new model pricing, new caching techniques, new cost patterns.

What This Isn't

  • Not a cost-monitoring tool — methodology, not infrastructure
  • Not specific to one vendor — applies to OpenAI, Anthropic, Google, open-weight
  • Not "use a smaller model" — that's only one of 5 layers

What's in the download

cost-optimization-0.1.0/
├── README.md
├── OVERVIEW.md
├── METHODOLOGY.md
├── INSTALL.md
├── LICENSE.md
├── package.json
├── skills/                ← 5 SKILL.md files
│   ├── cost-optimization/
│   ├── token-economics/
│   ├── model-selection/
│   ├── caching-strategies/
│   └── finops-for-llms/
├── adapters/
├── examples/              ← 2 worked examples
└── docs/

Common questions

Things people ask before buying.

Does this work with my LLM provider?

Yes. The methodology is vendor-agnostic. Apply the same funnel to OpenAI, Anthropic, Google, open-weight, or any combination. The specific tactics differ (Anthropic has prompt caching, OpenAI has batch API); the layers are the same.

Will cutting costs hurt quality?

Not if you measure quality via evals. The pack teaches you to optimize cost with the constraint that eval scores don't drop. Most teams find 60-90% cost reduction with no measurable quality change.

How long does the first audit take?

A focused first-pass audit (find the biggest waste) takes a day. Applying the fixes takes 1-2 weeks. The pay-back is usually within the first month of cost savings.

£35 — lifetime

One purchase. Yours forever.

Pay once via Stripe. Get the complete package instantly. Free updates for the same major version. Commercial license included.

Secure payment via Stripe · Instant download · 30-day money-back if it doesn't save you time