contextjet-ai/awesome-llm-observability/estimate-llm-cost
Claude Code and agent skill by contextjet-ai/awesome-llm-observability
- community
Checking that the SKILL.md file is still in the repository.
Use this to estimate what an LLM call or feature will cost, and to compare models on price, before or after shipping. Trigger on "how much will this cost", "estimate my OpenAI/Anthropic bill", "is a cheaper model worth it", "cost of this prompt", "project my LLM spend". Ships a runnable, tested calculator so the numbers are real, not hand-waved.
Install
npx vskill@latest install contextjet-ai/awesome-llm-observability/estimate-llm-costSKILL.md
Estimate LLM cost
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.
Use the bundled script
`scripts/llm_cost.py` is pure Python, no install needed:
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.
How to apply it
- Price the call with realistic token counts (measure them from a trace, see
instrument-llm-observability). - Project the bill with your real call volume. A cheap call at 10k/day beats an expensive one at 10/day.
- Compare models by running the same tokens through two model ids. Pick the cheapest that still passes your evals (see
compare-llm-models). - Feed it into cost cutting (see
reduce-llm-cost).
Validation
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.
Anti-patterns
- Trusting the built-in price table as current (verify against provider pricing).
- Pricing one call and forgetting to multiply by real volume.
- Comparing models on price without checking quality holds on your eval set.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/estimate-llm-cost/SKILL.md
Popularity
- Repository stars
- 45
- Repository forks
- 33
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/contextjet-ai/awesome-llm-observability/estimate-llm-cost)