llm-cost-latency-benchmark

llm-cost-latency-benchmark is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 30 tokens per session (317 once invoked), scanned A, original, MIT.

A measurement workflow for an AI process's token usage, cost, and end-to-end response time across representative requests. It includes retrieval, tool calls, retries, queues, and streaming times where applicable.

In plain words
What is it for?
Use it to compare AI configurations, report latency percentiles, and calculate costs while checking that each option meets the required quality level.
Why use it?
It replaces guesses about AI expense and speed with recorded measurements and documented pricing. It separates cold and warm runs and reports failed or retried requests instead of hiding them.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the mas-ai-workflows plugin — 10 skills shipped together

Good fit Use it to compare AI configurations, report latency percentiles, and calculate costs while checking that each option meets the required quality level.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alivirgo/Major-AI-Skills --skill llm-cost-latency-benchmark
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install mas-ai-workflows, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for llm-cost-latency-benchmark

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for llm-cost-latency-benchmark

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/llm-cost-latency-benchmark.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 317 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.00317
Opus 5 $0.00015 $0.00159
Sonnet 5 $0.00006 $0.00063
Haiku 4.5 $0.00003 $0.00032

Measured today against content hash bef50ab516f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

llm-cost-latency-benchmark scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/mas-ai-workflows/skills/llm-cost-latency-benchmark/SKILL.md · 35 lines

What it actually says

Cost and Latency Benchmark

Scope

Define the request population, concurrency, warm-up policy, cache state, budget, and required quality floor. Read current provider pricing from an authoritative source and record its date; do not hard-code remembered prices as current.

Procedure

Measure wall-clock latency around the complete workflow, including retrieval, tools, retries, and queueing. Separate time to first output from time to completion when streaming. Use provider-reported usage where available.

Checks

Track input, cached input, output, and other separately billed usage using the provider's documented units. Include failed and retried requests in totals. Mark unavailable usage as unknown instead of estimating it silently.

Failure Handling

Report counts and latency percentiles with the measurement method and sample size. Separate cold and warm runs. Compare only configurations that meet the agreed quality floor and do not extrapolate small synthetic tests as production guarantees.

Deliverable

Deliver raw sanitized measurements, pricing references, cost arithmetic, and configuration. A faster response that fails acceptance checks is not an optimization win.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 35 lines · 30 tokens per session scan A bef50ab516f1

Subscribe to this mod's changes

llm-cost-latency-benchmark is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 317 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.