Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    LLM Cost Optimizer: Prompt Cache & Plan Break-Even

    1

    Offline Python CLI comparing 14 LLM APIs with prompt caching math, prompt bloat auditing, and Plus/Pro subscription break-even analysis.

    Free

    Security scanned
    LLM Cost Optimizer: Prompt Cache & Plan Break-Even

    LLM Cost Optimizer: Prompt Cache & Plan Break-Even

    Example session with this skill installed

    Compare monthly API costs for 60 turns/day (8,000 input / 1,200 output tokens, 65% prompt cache hit rate) across GPT-5, Claude Sonnet 4, and Gemini 2.5 Flash, and check break-even vs $20/mo subscriptions.

    • Read your context and instructions
    • Compiled the llm cost optimizer

    Monthly LLM Cost & Break-Even Comparison

    ModelPer TurnMonthly API Costvs $20 PlanRecommendation
    Gemini 2.5 Flash-Lite$0.00089$1.60/mo-$18.40PAY_AS_YOU_GO_API
    GPT-5$0.01615$29.07/mo+$9.07SUBSCRIPTION (BE: 41.3 t/d)
    Claude Sonnet 4$0.02796$50.33/mo+$30.33SUBSCRIPTION (BE: 23.9 t/d)
    python scripts/llm_cost.py estimate --daily-turns 60 --avg-input-tokens 8000 --avg-output-tokens 1200 --cache-hit-rate 0.65 --format md
    python scripts/llm_cost.py audit-prompt --file system_prompt.txt --model claude-sonnet-4
    

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Estimating LLM API costs across multiple providers is a manual, error-prone task that often leads to budget overruns. This skill provides an offline Python CLI to calculate exact spend, audit prompts for token bloat, and determine when a flat-rate subscription beats pay-as-you-go billing.

    What it does

    • Cost estimation across 14 models including GPT-5, Claude 4, Gemini 2.5, and DeepSeek with prompt-caching hit rates.
    • Token auditing for local files to identify bloat like excessive whitespace, unminified JSON, or duplicate lines.
    • Subscription analysis comparing API spend against ChatGPT Plus, Claude Pro, Cursor Pro, and $200/mo enterprise tiers.
    • Savings projections calculating monthly and annual dollar savings from context trimming and prefix caching.

    How it works

    1. Estimate workload costs by passing daily turns, average input/output tokens, and expected cache hit rates.
    2. Audit specific local files or system prompts to detect token-heavy patterns and estimate file-level pricing.
    3. Compare current API usage against flat-rate subscription tiers to find the exact daily turn break-even point.
    4. List current 2026 reference pricing or load a custom JSON file for internal/private model rates.

    Frameworks & tools

    Python 3.8+ standard library. Uses argparse, json, math, and re. No external dependencies or tokenizers like tiktoken required.

    Why this beats prompting it yourself

    Manual calculations fail to account for provider-specific caching logic, such as Anthropic's 1.25x cache write fees versus DeepSeek's automatic prefix caching. This tool automates the blended math for 14 models simultaneously, ensuring your architectural choices are backed by dollar-accurate data.

    Use cases

    • Budgeting agent workloads before deploying high-volume automated pipelines.
    • Optimizing system prompts by identifying and removing redundant tokens.
    • Evaluating plan migrations from API-only to Cursor Pro or ChatGPT Pro seats.
    • Auditing codebase context to estimate the cost of RAG or full-repo context windows.

    Known limitations

    Uses an EN/CJK/code tokenization heuristic instead of exact BPE, requiring a 10-15% safety margin. Reasoning models require manually increased output token counts to account for internal tokens.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Token counts use a heuristic (~5-10% of BPE). Reasoning models (o3, R1) require manual adjustment of output token counts for internal reasoning overhead.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed today

    • Free with an Agensi account

    Software
    Python 3.8+

    Permissions

    Terminal / Shell
    Read Files

    Strictly offline local file reads for audit-prompt and optional custom pricing JSON files; zero outbound network calls.

    Listedtoday

    What's inside

    Frequently Asked Questions

    This is an offline Python CLI tool designed to solve the complexity of manual cost forecasting. It automates calculations for prompt-caching fees, token bloat, and subscription break-even points across 14 leading models.

    The tool is built on the Python 3.8+ standard library with no external dependencies, making it compatible with any terminal-based agent or CI/CD pipeline. It can be easily integrated into larger AI frameworks to audit costs before a script executes.

    The tool uses a high-performance heuristic for EN, CJK, and code tokenization that eliminates the need for heavy libraries like tiktoken. While not an exact bit-for-bit match, it provides a reliable 10-15% safety margin for budget planning.

    Yes, the purchase includes a reference file for 2026 pricing, and you can easily load a custom JSON file to track your own internal model rates or private enterprise discounts.

    You receive the full source code for the CLI and a pre-configured pricing database. This allows you to run it locally, modify the model list, and integrate it into your existing workflows immediately.

    New in LLM Ops

    Free