← Back to Skills Marketplace
evezart

Llm Cost Optimizer

by Evez666 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
72
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install llm-cost-optimizer
Description
Analyze LLM API usage logs and suggest cost optimizations. Use when you need to reduce LLM spending, compare model costs, find downgrade opportunities, detec...
README (SKILL.md)

LLM Cost Optimizer

Analyze LLM API usage patterns and suggest optimizations to reduce costs by 50%+.

Quick Start

Run the analysis script against a usage log JSON file:

python3 scripts/analyze.py --input usage_logs/

Input Format

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)

Optimization Strategies

  1. Downgrade: Find simple calls (low output, basic task types) on premium models and suggest cheaper alternatives
  2. Cache: Detect repeated prompt patterns and recommend prompt caching
  3. Compress: Find verbose outputs and suggest prompt tuning for conciseness

Supported Models & Pricing

All pricing is per 1M tokens (input/output). Rates are in the PRICING dict in scripts/analyze.py.

Model Tiers

  • Premium: gpt-4o, claude-sonnet-4, gemini-2.5-pro
  • Mid: gpt-4.1-mini, claude-haiku-3-5, gemini-2.5-flash, deepseek-v3
  • Budget: gpt-4.1-nano, deepseek-r1, llama-4-maverick

Downgrade suggestions map premium → mid → budget for simple tasks.

Usage Guidance
Before using it, make sure the usage-log JSON you provide is appropriate for local analysis and does not contain sensitive prompt contents you do not want processed. The reviewed artifacts show local-only analysis and no credential or network behavior.
Capability Analysis
Type: OpenClaw Skill Name: llm-cost-optimizer Version: 1.0.0 The skill bundle is a legitimate utility for analyzing LLM API usage logs to identify cost-saving opportunities. The core logic in `scripts/analyze.py` performs local data processing on JSON input to calculate potential savings from model downgrades, prompt caching, and output compression; it contains no network requests, shell execution, or unauthorized file access. The instructions in `SKILL.md` are strictly aligned with the stated purpose and do not contain any prompt injection or malicious directives.
Capability Assessment
Purpose & Capability
The stated purpose is to analyze LLM API usage logs for cost optimization, and the included Python code performs local parsing, aggregation, and recommendation generation consistent with that purpose.
Instruction Scope
Instructions are limited to running a local analysis script against a usage-log JSON input; there are no artifact-backed instructions to override user intent, force tool use, or perform autonomous account changes.
Install Mechanism
There is no install spec or third-party dependency installation. The included script uses Python standard-library modules only.
Credentials
The artifacts declare no credentials, environment variables, required config paths, network access, or provider account access. Local usage-log reading is proportionate to the stated purpose.
Persistence & Privilege
No persistence, background execution, privilege escalation, credential storage, or mutation of user data/accounts is shown in the provided artifacts.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install llm-cost-optimizer
  3. After installation, invoke the skill by name or use /llm-cost-optimizer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: cost analysis, model downgrade suggestions, caching detection, prompt compression
Metadata
Slug llm-cost-optimizer
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Llm Cost Optimizer?

Analyze LLM API usage logs and suggest cost optimizations. Use when you need to reduce LLM spending, compare model costs, find downgrade opportunities, detec... It is an AI Agent Skill for Claude Code / OpenClaw, with 72 downloads so far.

How do I install Llm Cost Optimizer?

Run "/install llm-cost-optimizer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Llm Cost Optimizer free?

Yes, Llm Cost Optimizer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Llm Cost Optimizer support?

Llm Cost Optimizer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Llm Cost Optimizer?

It is built and maintained by Evez666 (@evezart); the current version is v1.0.0.

💬 Comments