Skip to content

Phở Founder Lifetime: $59 once, 1 year of Phở AI included. Limited seats. See the offer

Engineering · Skill

LLM Cost Optimizer

Use whenever an LLM feature is being built or its costs come up (model choice, prompt caching, token limits, per-feature spend). Sets routing, caching, max_tokens and cost logging before launch rather than after the bill.

Open in Phở

What the skill covers

The sections of its instructions, in order.

  1. 01 Step 0: Classify Before You Ask
  2. 02 Context You Need
  3. 03 Mode 1: Cost Audit
  4. 04 Mode 2: Optimize Existing System
  5. 1. Model Routing (60–80% cost reduction on routed traffic)
  6. 2. Prompt Caching (40–90% reduction on cacheable traffic)
  7. 3. Output Length Control (20–40% reduction)
  8. 4. Prompt Compression (15–30% input token reduction)
  9. 5. Semantic Caching (30–60% hit rate on repeated queries)
  10. 6. Request Batching (10–25% reduction via amortized overhead)
  11. 05 Mode 3: Design Cost-Efficient Architecture
  12. 06 Proactive Flags
  13. 07 Failure Modes and Recovery
  14. 08 Handoff Triggers
  15. 09 Output Artifacts
  16. 10 Communication Standard
  17. 11 Anti-Patterns

More in Engineering review

  • PR Review Expert

    Review a pull request or diff for bugs, security and quality, file by file. Use whenever the user asks to review a PR or look over their changes.

  • Adversarial Code Reviewer

    Tough, critical review of a diff or PR before merge, through hostile reviewer personas that catch shared blind spots. Use whenever the user wants a change torn apart, a harsh…

  • Database Schema Designer

    Use when asked for an ERD, table relationships, normalization or a schema migration plan. Produces the ERD and normalized DDL with migration steps.

  • API Test Suite Builder

    Use when asked to write API, integration or contract tests for REST endpoints. Builds the suite from the routes: happy paths, auth, validation errors and edge cases per endpoint.

  • Focused Fix — Deep-Dive Feature Repair

    Use when a whole feature or module is broken and needs fixing end to end ('make X work', 'the Y module is broken'). Maps every file and dependency of the area before changing…

  • Security Guidance Hook

    Use when installing or tuning the PreToolUse security hook that warns before Claude writes command injection, XSS, SQL injection, unsafe deserialization, eval or GitHub Actions…

  • Stripe Integration Expert

    Use for any Stripe integration: subscriptions, trials, proration, checkout, usage billing, webhooks, customer portal or invoicing in Next.js, Express or Django. Writes idempotent…

  • Prompt Governance

    Use when prompts run in production and need versioning, a registry, A/B tests, regression checks or an eval pipeline. Sets up the release process for prompts; single-prompt…

  • Zero-Hallucination Coder

    Use before high-stakes or multi-file coding (auth, databases, migrations), or when asked to plan carefully and avoid invented APIs. Runs discuss, map, decompose, execute and…

  • Embedded / IoT Mentor

    Use for any embedded or IoT hardware project (ESP32, STM32, Arduino, Pico, firmware, PCB, MQTT, Home Assistant, sensor dashboards), before buying parts. Picks the MCU, board and…

Similar engineering skills

Frequently asked questions

What does LLM Cost Optimizer do?

Use whenever an LLM feature is being built or its costs come up (model choice, prompt caching, token limits, per-feature spend). Sets routing, caching, max_tokens and cost logging before launch rather than after the bill.

Is LLM Cost Optimizer free to use?

Yes. LLM Cost Optimizer is published by Alireza Rezvani under the MIT licence, and you can use it with a free Phở account.

How do I use LLM Cost Optimizer in Phở?

Press Open in Phở, then Try to apply it to your next message, or add the Engineering review set so Phở loads it whenever a request matches.

Does LLM Cost Optimizer need other tools?

No. It works in a normal Phở chat with what you type or upload.

Copied unchanged from alirezarezvani/claude-skills at commit c85b17e and credited to Alireza Rezvani, who is not affiliated with Phở. The full instructions and licence text ship with the skill inside Phở.