Agent skill

LLM Cost Latency Budget

by mohitagw15856 in mohitagw15856/pm-claude-skills

Model the cost and latency of an LLM feature before it ships and surprises the bill.

MITAuto-check passedAI & LLM Engineering

Install LLM Cost Latency Budget

skills CLI
$ npx skills add mohitagw15856/pm-claude-skills --skill llm-cost-latency-budget -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitagw15856/pm-claude-skills llm-cost-latency-budget --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/llm-cost-latency-budget .claude/skills/llm-cost-latency-budget && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
llm-cost-latency-budget
GitHub stars
1.4k
Token cost
~985 tokens
SKILL.md length
498 words
Files
1
Skills in repo
1,348
Repo updated
First seen
Licence
MIT

At a glance

Model the cost and latency of an LLM feature before it ships and surprises the bill.

  • Asked to estimate LLM API costs
  • SKILL.md covers Required Inputs, Output Format, Quality Checks and Anti-Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Set a latency/token budget

What it does

LLM Cost Latency Budget is an agent skill from mohitagw15856/pm-claude-skills. Model the cost and latency of an LLM feature before it ships and surprises the bill. Use when asked to estimate LLM API costs, set a latency/token budget, decide which model tier to use, or bring down the cost of an AI feature. Produces a cost & latency budget — token math per request, monthly cost projection, model tiering, caching/streaming levers, p95 latency targets, and a guardrail/alert plan.

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM cost and token optimization, Caching and LLM API integration. The repository describes itself as: 1255 professional Agent Skills for Claude, ChatGPT, Gemini, Cursor & Codex — PRDs, postmortems, leases, medical bills, layoffs, go-bags, new countries. Plain markdown, MIT, in… The licence is MIT.

When your agent uses it

  • Asked to estimate LLM API costs
  • Set a latency/token budget
  • Decide which model tier to use
  • Bring down the cost of an AI feature

Example prompts

  • “/llm-cost-latency-budget”

What it can do on your machine

Read from SKILL.md and the folder at commit 1cbf1f0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

LLM Cost Latency Budget loads about 985 tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 498 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~985

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitagw15856/pm-claude-skills at commit 1cbf1f0, republished under its MIT licence (© mohitagw15856). 498 words, ~985 tokens.

Download SKILL.mdSave it as .claude/skills/llm-cost-latency-budget/SKILL.md (or your agent's skills folder).
name
llm-cost-latency-budget
description
Model the cost and latency of an LLM feature before it ships and surprises the bill. Use when asked to estimate LLM API costs, set a latency/token budget, decide which model tier to use, or bring down the cost of an AI feature. Produces a cost & latency budget — token math per request, monthly cost projection, model tiering, caching/streaming levers, p95 latency targets, and a guardrail/alert plan.

LLM Cost & Latency Budget Skill

LLM features have a unit cost and a tail latency that demos hide and production exposes. This skill does the token math up front — what one request costs, what a million cost, where the p95 latency comes from — and lays out the levers (model tiering, caching, prompt trimming) so cost and speed are designed, not discovered.

Required Inputs

Ask for these only if they aren't already provided:

  • The request shape — typical system prompt, user input, retrieved context, and output sizes (in rough tokens).
  • Volume — requests/day now and at target scale; peak concurrency.
  • Models in play — candidate model(s) and their per-token input/output prices.
  • Targets — acceptable cost per request (or per user/month) and the latency users will tolerate (p50 / p95).

Output Format

Cost & Latency Budget: [feature]

1. Per-request token math — a table estimating tokens in/out per call, and the resulting cost at each candidate model's price.

ComponentTokens$ in$ out
System prompt
Retrieved context
User input
Output
Per request$x

2. Monthly projection — per-request cost × volume, at current and target scale; the headline number leadership will ask for.

3. Model tiering — route easy requests to a cheaper/faster model and only escalate hard ones (cascade); show the blended cost. Often the single biggest saving.

4. Latency — where the p95 comes from (model TTFT + output length + retrieval + network), the target, and how streaming changes perceived latency even when total time is unchanged.

5. Cost levers — ranked by impact: prompt/context trimming, caching (prompt cache + response cache for repeats), shorter outputs (max_tokens), batching, tiering, and "do you need the model at all for this path."

6. Guardrails — per-user / per-day rate limits, a max-tokens cap, a spend alert threshold, and a kill switch — so a bug or abuse can't produce a surprise invoice.

Show full SKILL.md (207 more words)Show less

Quality Checks

  • Token estimates are itemised (system + context + input + output), not a single guessed number
  • The monthly cost is projected at target scale, not just today's volume
  • Model tiering / cascade is considered before accepting the flagship-model cost everywhere
  • p95 (not just average) latency is targeted, and streaming is considered for perceived speed
  • Caching is evaluated for repeated prompts/contexts
  • A spend alert + rate limit + kill switch are specified to cap the downside

Anti-Patterns

  • Do not budget on average latency — users feel the p95, and the tail is where AI features feel broken
  • Do not default every call to the most capable model — most requests don't need it; tiering often cuts cost by more than half
  • Do not forget output tokens cost more than input — verbose responses are often the hidden cost driver
  • Do not ship without a spend cap and alert — an unbounded LLM feature is an unbounded bill
  • Do not optimise cost before measuring it — itemise the real token usage first, then pull the biggest lever

Based On

LLM production cost/latency practice — token accounting, model cascades/tiering, prompt & response caching, and tail-latency budgeting.

Example Trigger Phrases

  • "Estimate LLM API costs."
  • "Set a latency/token budget."
  • "Decide which model tier to use."
  • "Bring down the cost of an AI feature."

© mohitagw15856, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/llm-cost-latency-budget of mohitagw15856/pm-claude-skills.

Open the folder on GitHubat commit 1cbf1f0

Compare with similar skills

LLM Cost Latency Budget next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

LLM Cost Latency Budget compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
LLM Cost Latency Budget this skillmohitagw15856/pm-claude-skills1.4k—~985Automated safety check: PassMIT
LLM Cost Optimizationsickn33/agentic-awesome-skills47k1 repos~2.5kAutomated safety check: PassMIT
Anth Performance Tuningjeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: PassMIT
LLM Cost OptimizationBagelHole/DevOps-Security-Agent-Skills1.2k—~2.2kAutomated safety check: PassMIT
AIbutterbase-ai/butterbase-skills534—~1.1kAutomated safety check: PassMIT
Continue Enable DefaultsOnlyTerp/prompt-cache-skills114—~977Automated safety check: PassCustom licence

Similar skills

  • LLM Cost Optimization

    sickn33/agentic-awesome-skills

    Reduce LLM API and infrastructure costs through model selection, prompt caching, batching, caching, quantization, and self-hosting strategies.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Anth Performance Tuning

    jeremylongshore/tons-of-skills-marketplace

    Optimize Claude API performance with prompt caching, model selection, streaming, and latency reduction techniques.

    2.8k GitHub stars~1.9k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • LLM Cost Optimization

    BagelHole/DevOps-Security-Agent-Skills

    Reduce LLM API and infrastructure costs through model selection, prompt caching, batching, caching, quantization, and self-hosting strategies.

    1.2k GitHub stars~2.2k tokensUpdated 4 mo ago
    AI & LLM EngineeringAuto-check passed
  • AI

    butterbase-ai/butterbase-skills

    A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

    534 GitHub stars~1.1k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • Continue Enable Defaults

    OnlyTerp/prompt-cache-skills

    Continue's prompt caching is opt-in via config and off by default.

    114 GitHub stars~977 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Prompt Caching

    sickn33/agentic-awesome-skills

    Caching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation)

    47k GitHub starsUsed in 2 repos~3.4k tokens
    AI & LLM EngineeringAuto-check passed

More from mohitagw15856/pm-claude-skills

All 1,348 skills in this repo
  • Car Tco

    mohitagw15856/pm-claude-skills

    Compare the total cost of car ownership across buy-new, buy-used, lease, and keep-your-current-car — depreciation, insurance, maintenance ramp, and fuel over a real horizon, not just the monthly…

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Cs Health Scorecard

    mohitagw15856/pm-claude-skills

    Build a customer health scorecard for a specific account. An agent skill from mohitagw15856/pm-claude-skills.

    1.4k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Exit Waterfall

    mohitagw15856/pm-claude-skills

    Compute who gets what at each exit price from a cap table — liquidation preferences, conversion points, and where the founders' share collapses.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Feature Prioritisation

    mohitagw15856/pm-claude-skills

    Apply prioritisation frameworks (RICE, MoSCoW, Kano, ICE, Opportunity Scoring) to rank features and backlog items.

    1.4k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Fire Number

    mohitagw15856/pm-claude-skills

    Compute a financial-independence (FIRE) target and years-to-reach with every assumption labeled as an assumption — plus a sensitivity table instead of a single false-precision answer.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Freelance Rate

    mohitagw15856/pm-claude-skills

    Derive a freelance day/hourly rate backwards from target income, honest billable utilization, overhead, and the self-employment tax premium — the arithmetic that proves a rate is not salary÷2000.

    1.4k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Questions about LLM Cost Latency Budget

What does LLM Cost Latency Budget do?

Model the cost and latency of an LLM feature before it ships and surprises the bill. LLM Cost Latency Budget is an agent skill from mohitagw15856/pm-claude-skills. Model the cost and latency of an LLM feature before it ships and surprises the bill.

When should I use LLM Cost Latency Budget?

LLM Cost Latency Budget fits situations like: asked to estimate LLM API costs; set a latency/token budget; decide which model tier to use; bring down the cost of an AI feature.

How do I install LLM Cost Latency Budget in Claude Code?

Run `npx skills add mohitagw15856/pm-claude-skills --skill llm-cost-latency-budget -a claude-code`. Or copy the skill folder (skills/llm-cost-latency-budget in mohitagw15856/pm-claude-skills) into .claude/skills/llm-cost-latency-budget in your project. Claude Code loads it when a task matches its description.

How do I install LLM Cost Latency Budget in Codex?

Run `npx skills add mohitagw15856/pm-claude-skills --skill llm-cost-latency-budget -a codex`. Or copy the skill folder (skills/llm-cost-latency-budget in mohitagw15856/pm-claude-skills) into .agents/skills/llm-cost-latency-budget in your project. Codex loads it when a task matches its description.

Can I use LLM Cost Latency Budget in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitagw15856/pm-claude-skills --skill llm-cost-latency-budget -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/llm-cost-latency-budget, .gemini/skills/llm-cost-latency-budget, .github/skills/llm-cost-latency-budget and .opencode/skills/llm-cost-latency-budget in your project.

What does LLM Cost Latency Budget need to run?

SKILL.md names no scripts, command-line tools or credentials: LLM Cost Latency Budget is instructions for the agent only.

Does LLM Cost Latency Budget access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is LLM Cost Latency Budget safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does LLM Cost Latency Budget use?

LLM Cost Latency Budget is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does LLM Cost Latency Budget use?

About 985 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to LLM Cost Latency Budget?

Skills that share tags, products or a category with LLM Cost Latency Budget: LLM Cost Optimization (sickn33/agentic-awesome-skills, 47k stars), Anth Performance Tuning (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), LLM Cost Optimization (BagelHole/DevOps-Security-Agent-Skills, 1.2k stars) and AI (butterbase-ai/butterbase-skills, 534 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains LLM Cost Latency Budget?

mohitagw15856 (a GitHub user) maintains it in mohitagw15856/pm-claude-skills, which has 1,434 GitHub stars. The repository holds 1,348 skills in this directory. The repository was last updated on October 9, 2026.

Source: mohitagw15856/pm-claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.