Install
openclaw skills install costclawZero-setup token cost analyzer for OpenClaw. Run one command, get a ranked report with exact dollar amounts for every optimization. No Python dependencies, no integration needed — reads your actual config and workspace. Use when users mention high API costs, token consumption, budget, "why is my bill so high", "help me save money", or "optimize costs".
openclaw skills install costclawOne command. Zero setup. Real dollar amounts.
Most OpenClaw users overpay by 50-90%. CostClaw reads your actual config and workspace, then tells you exactly what to change and how much you'll save.
| Feature | CostClaw | Others |
|---|---|---|
| Zero setup | ✅ Just run it | ❌ Install Python scripts, configure integration |
| Reads YOUR config | ✅ Actual gateway config + workspace | ❌ Generic advice |
| Dollar amounts per file | ✅ "$TOOLS.md costs $4.20/mo" | ❌ "Consider trimming" |
| Priority ranking | ✅ Top actions by savings | ❌ Unranked checklist |
| Before/after estimate | ✅ Current vs optimized cost | ❌ Percentage ranges |
| Single command | ✅ ./scripts/analyze.sh | ❌ 4+ scripts to learn |
When the user asks about costs, the agent should:
Run the analyzer script:
bash scripts/analyze.sh [workspace_path]
Default workspace: current directory. Pass explicit path if needed.
For JSON output (machine-readable):
bash scripts/analyze.sh [workspace_path] json
Present findings using the report output — prioritized recommendations with dollar amounts.
Activate this skill when users say anything like:
The report has 5 sections:
📁 Workspace Files — Each file with size, estimated tokens, and monthly cost. Flagged: ⚠ LARGE (>10K tokens), ⚡ MEDIUM (>5K tokens), ✓ OK.
🔧 Skills — Count of installed skills and their aggregate token cost.
⚙️ Model & Config — Detected default model and its pricing tier.
💰 Cost Summary — Daily and monthly estimates based on actual workspace + assumed turns/day.
📋 Ranked Recommendations — Prioritized by monthly savings. Each recommendation includes:
Based on findings, the agent should:
memory/ files, archive old contentThe analyzer uses these rates. Update scripts/pricing.env to override.
| Provider | Model | Input $/MTok | Output $/MTok | Cache Read | Cache Write |
|---|---|---|---|---|---|
| Anthropic | Claude Opus 4 | $15.00 | $75.00 | $1.875 | $18.75 |
| Anthropic | Claude Sonnet 4.5 | $3.00 | $15.00 | $0.30 | $3.75 |
| Anthropic | Claude Haiku 4 | $0.80 | $4.00 | $0.08 | $1.00 |
| OpenAI | GPT-4.1 | $2.00 | $8.00 | $0.50 | — |
| OpenAI | GPT-4.1 mini | $0.40 | $1.60 | $0.10 | — |
| OpenAI | o3 | $2.00 | $8.00 | — | — |
| OpenAI | o4-mini | $1.10 | $4.40 | — | — |
| Gemini 2.5 Pro | $1.25 | $10.00 | — | — | |
| Gemini 2.5 Flash | $0.15 | $0.60 | — | — |
Most agents load 30-80K tokens of workspace files every turn. Trimming to essentials saves 50-80% of input costs.
Heartbeats and cron jobs don't need Opus. Route to Haiku/Flash for 10-20x savings on background work.
Set heartbeat interval to 55 minutes (just under Anthropic's 1h cache TTL). Keeps cache warm = cache-read rates instead of cache-write rates.
Each skill description adds ~200-500 tokens to system prompt. 20 skills = 4-10K extra tokens/turn. Consider a skill index that loads on-demand.
Enable compaction.mode: aggressive with maxTokens: 8000 to auto-trim conversation history.
All analysis runs locally. No data leaves your machine. No API calls for the audit.
The free analyzer gives you a ranked report. CostClaw Pro gives you the tools to automate savings:
Get CostClaw Pro: https://buy.polar.sh/polar_cl_qKdQKVcwHd4TUo8jXWrDoZyjHZm3rSciMyVCG00EJlO
Storefront: https://polar.sh/morpheis
Author: ClawdActual (@clawdactual) License: MIT