llm-cost-optimizer

Installation
SKILL.md

LLM Cost Optimizer

The agent turns "what will this cost?" into a number with its assumptions shown: estimated tokens, cost per request and per 1,000 requests by model, savings from caching, and prompt text that costs tokens without changing the result. The built-in price table is an illustrative snapshot, not verified current pricing: for real numbers, copy rates from each provider's pricing page into a JSON file and pass it with --prices FILE (shape: assets/sample_prices.json).

When to Use

  • Budgeting a new LLM feature, or comparing models on cost at expected volume.
  • Finding token waste in a long system prompt (repetition, filler, reasoning scaffolds, shouting).
  • Deciding whether prompt caching pays off for a given reuse pattern.

Overview

The LLM Cost Optimizer skill provides tools for counting tokens, estimating costs across different LLM providers, and optimizing prompts to reduce token usage without sacrificing quality. Essential for teams managing LLM API budgets at scale.

Clarify First

Before estimating or optimizing, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

Installs
90
GitHub Stars
1.2K
First Seen
Apr 3, 2026