Install
openclaw skills install llm-cost-optimizerAnalyze LLM API usage logs and suggest cost optimizations. Use when you need to reduce LLM spending, compare model costs, find downgrade opportunities, detect caching wins, or compress verbose outputs. Supports OpenAI, Anthropic, Google, DeepSeek, and Meta models.
openclaw skills install llm-cost-optimizerAnalyze LLM API usage patterns and suggest optimizations to reduce costs by 50%+.
Run the analysis script against a usage log JSON file:
python3 scripts/analyze.py --input usage_logs/
Usage logs are JSON arrays of objects with:
timestamp (ISO 8601)model (e.g. "gpt-4o", "claude-sonnet-4-20250514")input_tokens (int)output_tokens (int)task_type (optional: "general", "coding", "classification", "extraction", "summary", "creative", "analysis")session_id (optional)cached (optional bool)All pricing is per 1M tokens (input/output). Rates are in the PRICING dict in scripts/analyze.py.
Downgrade suggestions map premium → mid → budget for simple tasks.