← 返回 Skills 市场
evezart

Llm Cost Optimizer

作者 Evez666 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
72
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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.

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install llm-cost-optimizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /llm-cost-optimizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: cost analysis, model downgrade suggestions, caching detection, prompt compression
元数据
Slug llm-cost-optimizer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 72 次。

如何安装 Llm Cost Optimizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install llm-cost-optimizer」即可一键安装,无需额外配置。

Llm Cost Optimizer 是免费的吗?

是的,Llm Cost Optimizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Llm Cost Optimizer 支持哪些平台?

Llm Cost Optimizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Llm Cost Optimizer?

由 Evez666(@evezart)开发并维护,当前版本 v1.0.0。

💬 留言讨论