agent toolingby majiayu000
Agent Cost Optimizer
majiayu000/agent-cost-optimizer
Real-time cost tracking, budget enforcement, and ROI measurement for AI agent operations. Track token usage, predict costs, enforce budget caps ($50-70/month typical), optimize model selection, cache results, measure cost-to-value.
What it changes
Passed 17 of 23 test cases with the skill, and 6 of 23 without it.
Without skill26%
With skill74%
Checks it passed that the model alone missed
- Allocates 3 agents.
- Reports total cost as $0.60.
- Calculates input cost as $10.00.
and 15 more in the full report
11 fixed6 passed either way6 still failing0 broke
- Pass-rate lift
- +48 pp
- Tokens
- +376%
- Agent turns
- 0%
- Response time
- -8%
Model gemini-3.6-flashMeasured 9/3/2026v117 of 23 cases passed with skill
See it in action
One of 11 test cases the skill fixed. Same model, same prompt, with and without the skill.
PromptCalculate the API cost for a run on `o3` consuming 1,000,000 prompt tokens and 500,000 completion tokens.
What was checked, without and with the skill| Checked | Without skill | With skill |
|---|
| Calculates input cost as $10.00. | Missed | Passed |
|---|
| Calculates output cost as $20.00. | Missed | Passed |
|---|
| Calculates total cost as $30.00. | Missed | Passed |
|---|
What's inside
The instructions your model reads when the skill loads.
SKILL.md823 linessingle file
Agent Cost Optimizer
Overview
agent-cost-optimizer provides comprehensive cost tracking, budget enforcement, and ROI measurement for AI agent operations.
Purpose: Control and optimize AI spending while maximizing value delivered
Pattern: Task-based (7 operations for cost management)
Key Innovation: Real-time cost tracking with automatic budget enforcement and cost-effective fallbacks
Industry Context (2025):
- Average AI spending: $85,521/month (36% YoY increase)
- Only 50% of organizations can measure AI ROI
- IT teams struggle with hidden costs
Solution: Comprehensive cost management from tracking to optimization
When to Use
Use agent-cost-optimizer when:
- Tracking AI costs across skills
- Preventing budget overruns
- Measuring ROI (cost vs. value delivered)
- Optimizing model selection (Opus vs. Sonnet vs. Haiku)
- Planning AI budgets
- Cost-effective development
- Enterprise cost accountability
Prerequisites
Required
- AI API access (Anthropic, OpenAI, Google)
- Cost tracking capability (API usage data)
Track record
Benchmark
17 / 23
test cases passed, vs 6 / 23 without
Adoption
- Users
- 0
- Times used
- 0
Safety and source details
SkillSafety
✓ 3 of 3 passed✓Code scan15 of 15 checks clean
0 critical · 0 warning · 0 info — scanner v4 — 8/10/2026
View 15 scanner checks
live_secretremote_code_executionreverse_shelldata_exfiltrationssrf_metadataagent_snoopinganti_refusaldestructive_commandsobfuscated_unicodeunicode_homoglyphopaque_blobsuspicious_urltool_overreachtrigger_abuseprompt_injection_phrasing
✓IntentSafe
LLM judge · does the skill do what it claims
✓ContentClean
LLM judge · policy & harmful-content review
Source
Importedmajiayu000 / claude-skill-registry
skills/ai-llm/agent-cost-optimizer-adaptationio-skrillz-2/SKILL.md
View on GitHub ↗License MITImported 8/10/2026Version v1