Token导航 LogoToken导航TokenDH.com
研究检索external-serviceclawhub未标认证来源可访问clear审计通过

dex-cost-guardiandex 成本守护者

Agent Skill

dex-cost-guardian 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,168

周安装

132

GitHub Stars

公开资料未说明

下载量

1,056
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dex-cost-guardian(dex 成本守护者)
来源仓库:https://github.com/tso1079/dex-cost-guardian
安装命令:
openclaw skills install dex-cost-guardian
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install dex-cost-guardian

简介

用于监控和控制 OpenClaw API 使用成本,提供代币消耗统计和预算预警。

  • 适合在多会话环境中管理支出,推荐更经济的模型方案。dex-cost-guardian 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 通过 clawhub 安装,需启用计费接口并配置预算阈值。
  • 数据基于估算,可能存在偏差,建议定期人工核对账单。
  • 超支警报仅作提醒,不自动干预,需用户主动调整策略。

SKILL.md

name
cost-guardian
description
Monitor and control OpenClaw API costs. Tracks token usage across all sessions, estimates spend by model, alerts on budget overruns, and recommends cheaper model routing for routine tasks. Use when: asking about costs, checking spend, setting budgets, or optimizing API usage.
metadata
{ "openclaw": { "emoji": "🛡️", "requires": { "bins": ["python3"] } } }

Cost Guardian — OpenClaw Cost Monitor & Optimizer

Know what your agent costs. Before it becomes a problem.

When to Use

USE this skill when:

  • "How much am I spending?"
  • "What's my API cost?"
  • "Which sessions cost the most?"
  • "Am I over budget?"
  • "How can I reduce costs?"
  • Setting up daily/weekly cost reports
  • Optimizing model usage for crons and automated tasks

DON'T use this skill for:

  • Billing issues with Anthropic/OpenAI (contact providers directly)
  • Managing API keys (use OpenClaw's secrets system)

Quick Start

Get a Cost Report (All Time)

python3 scripts/cost-report.py --all

Last 24 Hours

python3 scripts/cost-report.py --hours 24

With Budget Alert ($5/day)

python3 scripts/cost-report.py --budget 5.00

JSON Output (for dashboards)

python3 scripts/cost-report.py --all --json

What It Reports

  • Estimated cost by model and session
  • Token breakdown — input, output, context (cached)
  • Top spending sessions — find what's burning tokens
  • Model efficiency — how much you'd save switching routine tasks to cheaper models
  • Budget alerts — 🟡 at 80% and 🔴 when over budget
  • Cron cost tracking — automated jobs often account for 30-50% of spend

Setting Up Automated Reports

Daily Cost Report via Cron

Tell your agent:

"Set up a daily cost report that runs at 8 AM and alerts me if I'm over $5/day"

The agent should create a cron job that:

  1. Runs python3 <skill-dir>/scripts/cost-report.py --hours 24 --budget 5.00
  2. Delivers the report via your preferred channel

Model Optimization

The report flags when expensive models (Opus) are being used for routine tasks that Sonnet handles fine:

  • Email checking crons → Sonnet
  • Heartbeat checks → Sonnet
  • Site health monitoring → Sonnet or Haiku
  • Complex reasoning, strategy, writing → Keep on Opus

Supported Models & Pricing

ModelInput $/1MOutput $/1MCache $/1M
Claude Opus 4$15.00$75.00$1.875
Claude Sonnet 4$3.00$15.00$0.30
Claude Haiku 3.5$0.80$4.00$0.08
GPT-4o$2.50$10.00$1.25
GPT-4.1$2.00$8.00$0.50
GPT-4.1-mini$0.40$1.60$0.10
GPT-4.1-nano$0.10$0.40$0.025
OpenRouter/auto~$3.00~$15.00~$0.30

Pricing is estimated and may vary. Update scripts/cost-report.py MODEL_PRICING dict for current rates.

Roadmap

  • [ ] Auto model-switching recommendations per session type
  • [ ] Historical trend tracking (daily/weekly/monthly)
  • [ ] Cost anomaly detection (sudden spikes)
  • [ ] Per-project cost allocation
  • [ ] Web dashboard with charts

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.52%
按下载量换算1,040

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills