← 返回 Skills 市场
Ai Cost Optimizer
作者
yang1002378395-cmyk
· GitHub ↗
· v1.0.0
· MIT-0
112
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-cost-optimizer-cn
功能描述
AI 模型成本优化器 - 自动计算 API 费用,推荐最优模型,对比 DeepSeek/智谱/通义/GPT 成本。省钱必备工具。
使用说明 (SKILL.md)
AI 成本优化器
智能对比 AI 模型 API 成本,推荐最优模型,帮你省 90%+ API 费用。
功能
- 💰 成本计算 - 实时计算不同模型的 API 费用
- 📊 价格对比 - 一键对比 10+ 主流模型
- 🎯 智能推荐 - 根据场景推荐最优模型
- 📈 费用预估 - 预估使用 10 万 tokens 花多少钱
- 💡 省钱建议 - 告诉你如何优化成本
安装
npx clawhub@latest install ai-cost-optimizer
使用方法
1. 对比模型价格
node ~/.openclaw/skills/ai-cost-optimizer/compare.js
输出示例:
📊 AI 模型价格对比
┌─────────────┬──────────┬──────────┬─────────────┐
│ 模型 │ 输入 │ 输出 │ 每10万tokens │
├─────────────┼──────────┼──────────┼─────────────┤
│ DeepSeek V3 │ ¥0.27/M │ ¥1.08/M │ ¥1.35 │
│ 智谱 GLM-4 │ ¥0.10/M │ ¥0.10/M │ ¥0.50 │
│ 通义千问 │ ¥0.30/M │ ¥0.60/M │ ¥1.80 │
│ GPT-4o │ ¥35/M │ ¥105/M │ ¥140 │
│ Claude 3.5 │ ¥17.50/M │ ¥52.50/M │ ¥70 │
└─────────────┴──────────┴──────────┴─────────────┘
💡 推荐选择:
日常使用 → DeepSeek V3(省 99% 费用)
中文内容 → 智谱 GLM-4(省 99.5% 费用)
复杂推理 → Claude 3.5(省 50% 费用)
2. 计算使用费用
# 计算特定模型的费用
node ~/.openclaw/skills/ai-cost-optimizer/calculate.js deepseek 500000
# 输出:使用 50 万 tokens 花费 ¥6.75
# 交互式计算
node ~/.openclaw/skills/ai-cost-optimizer/calculate.js
3. 智能推荐
node ~/.openclaw/skills/ai-cost-optimizer/recommend.js
会询问你的使用场景,然后推荐最优模型:
❓ 主要用途?
1. 日常对话/写作
2. 编程/代码生成
3. 中文内容创作
4. 复杂推理/分析
5. 多模态(图文)
❓ 每天大约调用次数?
1. \x3C 100 次
2. 100-1000 次
3. 1000-10000 次
4. > 10000 次
💡 推荐:DeepSeek V3
- 性价比最高
- 预估每月费用:¥27(1000次/天)
- 同等使用 GPT-4o:¥2800(省 99%)
4. 生成成本报告
node ~/.openclaw/skills/ai-cost-optimizer/report.js --model deepseek --tokens 1000000
生成详细成本分析报告:
- 各模型费用对比
- 省钱潜力分析
- 使用建议
支持的模型
| 模型 | 输入价格 | 输出价格 | 推荐场景 |
|---|---|---|---|
| DeepSeek V3 | ¥0.27/M | ¥1.08/M | 日常对话、编程、写作 |
| DeepSeek Coder | ¥0.27/M | ¥1.08/M | 代码生成、代码审查 |
| 智谱 GLM-4 | ¥0.10/M | ¥0.10/M | 中文内容创作 |
| 智谱 GLM-3-Turbo | ¥0.05/M | ¥0.05/M | 高频调用 |
| 通义千问 Plus | ¥0.30/M | ¥0.60/M | 多模态任务 |
| 通义千问 Turbo | ¥0.10/M | ¥0.10/M | 快速响应 |
| GPT-4o | ¥35/M | ¥105/M | 复杂推理(企业级) |
| GPT-4o-mini | ¥3.50/M | ¥10.50/M | 中等任务 |
| Claude 3.5 Sonnet | ¥17.50/M | ¥52.50/M | 长文本、代码 |
| Claude 3.5 Haiku | ¥0.18/M | ¥0.54/M | 快速对话 |
省钱案例
案例 1:个人开发者
- 使用场景:每天 AI 写代码 + 写博客
- 原方案:GPT-4o,每月 100 万 tokens → ¥1400
- 优化后:DeepSeek V3,每月 100 万 tokens → ¥13.5
- 节省:¥1386.5/月(99%)
案例 2:初创公司
- 使用场景:客服 Bot,每月 5000 万 tokens
- 原方案:GPT-4o-mini → ¥17500/月
- 优化后:DeepSeek V3 → ¥675/月
- 节省:¥16825/月(96%)
案例 3:中文内容团队
- 使用场景:写文章、营销文案,每月 3000 万 tokens
- 原方案:GPT-4o → ¥42000/月
- 优化后:智谱 GLM-4 + DeepSeek 组合 → ¥450/月
- 节省:¥41550/月(99%)
混合策略(最优解)
根据不同任务使用不同模型:
| 任务类型 | 推荐模型 | 原因 |
|---|---|---|
| 简单对话 | DeepSeek V3 | 便宜 |
| 代码生成 | DeepSeek Coder | 代码能力强 |
| 中文写作 | 智谱 GLM-4 | 中文能力强 |
| 复杂推理 | Claude 3.5 | 推理强 |
| 多模态 | 通义千问 Plus | 图文处理 |
预期节省:50-99%(根据任务分布)
价格数据来源
- DeepSeek: https://platform.deepseek.com
- 智谱 AI: https://open.bigmodel.cn
- 通义千问: https://dashscope.aliyun.com
- OpenAI: https://openai.com/pricing
- Anthropic: https://www.anthropic.com/pricing
注意:价格可能变动,以官方为准。
常见问题
Q: DeepSeek 和 GPT-4 差多少?
A: 日常任务(写作、编程、问答)几乎没差。复杂推理(数学证明、多步逻辑)GPT-4 略好,但贵 100 倍。
Q: 可以混用多个模型吗?
A: 可以!推荐策略:
- 80% 用 DeepSeek/智谱(便宜)
- 20% 用 GPT/Claude(复杂任务)
- 预期节省 70-80%
Q: 如何切换模型?
A: 编辑 ~/.openclaw/config.json:
{
"model": {
"provider": "deepseek",
"model": "deepseek-chat"
}
}
Q: 这些价格准确吗?
A: 官方价格,2026-03 更新。价格可能变动,请以官方为准。
配置 OpenClaw 使用不同模型
方式 1:配置文件
编辑 ~/.openclaw/config.json:
{
"model": {
"provider": "deepseek",
"model": "deepseek-chat"
}
}
方式 2:环境变量
export DEFAULT_MODEL_PROVIDER=deepseek
export DEFAULT_MODEL_ID=deepseek-chat
方式 3:使用 openclaw-cn-installer
npx clawhub@latest install openclaw-cn-installer
node ~/.openclaw/skills/openclaw-cn-installer/setup-ai.js deepseek
相关资源
💬 Pro 版本(¥199)
免费版(当前)
- 模型价格对比
- 基础费用计算
- 场景推荐
Pro 版(¥199)
- ✅ 批量分析(100+ 模型)
- ✅ 历史趋势图表
- ✅ 自动化成本报告
- ✅ API 集成(自动统计)
- ✅ 团队协作功能
- ✅ 1年更新支持
联系方式
- QQ: 1002378395(中国用户)
- Telegram:
待注册(海外用户)
添加 QQ 1002378395,发送"AI成本优化"获取 Pro 版信息
License
MIT(免费版) Pro 版:付费后可用
安全使用建议
This package's scripts (calculate.js, compare.js, recommend.js) are local calculators and are coherent with the stated cost-comparison purpose. However: (1) SKILL.md advertises extra features (report generation, API integration, Pro automated stats) that are not present in the shipped files — report.js is referenced but missing. (2) The doc suggests running external installers via npx (clawhub / openclaw-cn-installer) and editing ~/.openclaw/config.json; those actions fetch and run third-party code and change global config, so review that installer's source before running. If you expect the Pro/API features, ask the author for the missing files (report.js, API integration) or a trustworthy distribution. Do not run npx installs or edit global config unless you trust the external package and understand the changes. If you want higher assurance, request the maintainer's repo URL or a signed release before installing.
功能分析
Type: OpenClaw Skill
Name: ai-cost-optimizer-cn
Version: 1.0.0
The skill is a collection of utility scripts (calculate.js, compare.js, recommend.js) designed to calculate and compare API costs for various AI models. The code is transparent, uses only built-in Node.js modules (readline), and contains no network calls, file system exfiltration, or obfuscated logic. While the documentation (SKILL.md) promotes a 'Pro' version via a QQ contact, there is no evidence of malicious intent, prompt injection, or unauthorized execution.
能力评估
Purpose & Capability
SKILL.md advertises features beyond what's included (batch analysis, API integration, automated reports, Pro capabilities), and even shows usage of report.js, but no report.js is present. The shipped code implements local calculators and recommendations only; claims about automated API integration and '自动统计' are not implemented in the provided files.
Instruction Scope
Runtime instructions mainly run local node scripts (calculate.js, compare.js, recommend.js) which only do local arithmetic and interactive prompts — they do not read secrets or call remote endpoints. However SKILL.md instructs users to edit ~/.openclaw/config.json and suggests running an external installer (npx clawhub@latest install openclaw-cn-installer / setup-ai.js), which would affect agent configuration outside this skill and could execute remote code if run. Also SKILL.md references report.js (missing), so the documentation and instructions are out-of-sync with delivered code.
Install Mechanism
There is no install spec in the registry and the provided scripts are local Node files (no downloads). That is low-risk. The documentation suggests using npx to install other tooling (openclaw-cn-installer / clawhub), which would run code fetched from npm and is an external action the user should review before running.
Credentials
The skill does not request environment variables, credentials, or config paths programmatically. SKILL.md shows optional environment variables and a configuration file (~/.openclaw/config.json) that users can edit to change default model settings; these are reasonable for changing model selection but are not required by the code.
Persistence & Privilege
The skill does not request always:true, does not autonomously modify other skills, and the code does not persist credentials. However the documentation encourages editing the global OpenClaw config (~/.openclaw/config.json) and using an external installer to set models, which — if followed — would change agent-wide behavior. That is an out-of-band action the user should review carefully.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-cost-optimizer-cn - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-cost-optimizer-cn触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
ai-cost-optimizer-cn v1.0.0
- 初始版本发布,支持一站式 AI API 成本分析与优化。
- 一键对比 DeepSeek、智谱、通义、GPT 等主流模型价格,显示详细费用计算和省钱建议。
- 提供模型费用计算器、智能场景推荐、详细成本分析报告等多项功能。
- 支持多种安装与配置方式,适配个人和团队用户。
- 免费版开放主要功能,Pro 版解锁批量分析、历史趋势和团队协作等高级特性。
元数据
常见问题
Ai Cost Optimizer 是什么?
AI 模型成本优化器 - 自动计算 API 费用,推荐最优模型,对比 DeepSeek/智谱/通义/GPT 成本。省钱必备工具。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 112 次。
如何安装 Ai Cost Optimizer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-cost-optimizer-cn」即可一键安装,无需额外配置。
Ai Cost Optimizer 是免费的吗?
是的,Ai Cost Optimizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Ai Cost Optimizer 支持哪些平台?
Ai Cost Optimizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Ai Cost Optimizer?
由 yang1002378395-cmyk(@yang1002378395-cmyk)开发并维护,当前版本 v1.0.0。
推荐 Skills