/llm-observability:estimate-llm-costfrom llm-observability
Estimates LLM call costs, projects monthly bills, and compares model pricing using a bundled Python calculator. Triggered by cost-related queries.
Ships in llm-observability. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Cost surprises come from not doing the arithmetic. This skill ships a small, dependency-free calculator so you can price a call, project a monthly bill, and compare models with actual numbers.
scripts/llm_cost.py is pure Python, no install needed:
from llm_cost import estimate_cost, project_monthly
estimate_cost(1500, 300, model="gpt-6.1-sol") # one call, USD
project_monthly(1500, 300, calls_per_day=5000, model="gpt-6.1-sol") # monthly projection
estimate_cost(2000, 200, model="claude-sonnet-5-5", cached_input_tokens=1800) # with prompt caching
Run it directly to see a worked example: python scripts/llm_cost.py.
The PRICES table holds the current flagship / mid / small model from OpenAI, Anthropic and Google at standard-tier short-context rates, dated by PRICES_AS_OF; two Gemini entries are promotional and step up on the date noted in the file. Prices change often, so pass input_price/output_price explicitly when you need exact figures, or edit the table. The default cached_discount=0.9 matches OpenAI; Anthropic and Google cache reads are closer to 95% off, so pass cached_discount=0.95 there. The arithmetic (not the price table) is what the tests pin down.
instrument-llm-observability).compare-llm-models).reduce-llm-cost).Run the tests: pytest skills/estimate-llm-cost/tests/. They check the math is exact for explicit prices, that model lookups match the table, that prompt-cache discounting is correct, and that monthly projection scales linearly.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub contextjet-ai/awesome-llm-observability --plugin llm-observability26 skills in this plugin
/add-llm-evalsUse this when adding evaluation to an LLM/agent app - measuring output quality (correctness, faithfulness, relevance, safety) rather than just watching traces. Trigger on "add evals", "test my prompt", "is my RAG accurate", "catch regressions", "score outputs", or setting up an eval suite in CI. Covers offline (CI) and online (production LLM-as-a-judge) evaluation./add-llm-fallbacksUse this to make an LLM app resilient to provider failures, rate limits, timeouts, and outages. Trigger on "handle LLM API errors", "add retries/fallbacks", "the app breaks when OpenAI is down", "rate limit errors", "make my LLM calls reliable", "timeout handling". Add retries, timeouts, and model/provider fallbacks, and observe them so failures are visible./Other plugins' skills for the same job