llm-cost-optimizer

Installation
SKILL.md

LLM Cost Optimizer

Overview

LLM API costs grow fast — a chatbot doing 10K conversations/day at $0.01 each is $3K/month. This skill builds cost controls: track spending per feature and user, route simple tasks to cheap models, cache repeated queries, compress prompts, and alert before budgets blow up.

When to Use

  • Monthly LLM bill is growing and you need visibility into what's driving it
  • Some features use GPT-4o when GPT-4o-mini would work fine
  • Users ask the same questions repeatedly — cache those responses
  • Need budget limits per team, feature, or API key
  • Comparing total cost of ownership between providers

Instructions

Strategy 1: Cost Tracking Middleware

Wrap every LLM call to log tokens, cost, model, and feature. Know exactly where money goes.

Related skills
Installs
2
GitHub Stars
48
First Seen
Mar 13, 2026