Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

clawtrix-token-saverClawtrix 代币保存器

Agent Skill

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

总安装

2,966

周安装

120

GitHub Stars

公开资料未说明

下载量

931
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:clawtrix-token-saver(Clawtrix 代币保存器)
来源仓库:https://github.com/nicope/clawtrix-token-saver
安装命令:
openclaw skills install clawtrix-token-saver
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install clawtrix-token-saver

简介

clawtrix-token-saver 诊断 Claude API 令牌浪费模式,优化调用成本。

  • 适用于高用量项目降低 LLM 调用开销与预算超支风险。
  • 分析重复请求、长上下文或低效提示词并提出改进建议。
  • 需接入 Claude API 日志源才能生成准确分析报告。
  • 建议配合监控告警机制,及时发现异常消耗趋势。

SKILL.md

name
token-saver
description
>
metadata
openclaw
emoji
💰
requires
env
["ANTHROPIC_API_KEY"]

Token Saver

Your Claude API bill is mostly avoidable waste. Heartbeats running on Sonnet. Extended thinking on calendar checks. MEMORY.md that hasn't been trimmed in weeks. Token Saver finds the waste, quantifies it, and helps you fix it.

Free. No backend. No auth required.


Quick Reference

SituationAction
"How much am I spending?"Run Step 1 — fetch usage stats
Spending spikeRun Step 2 — diagnose waste patterns
"Make it cheaper"Run Step 3 — generate ranked recommendations
Want to apply fixesRun Step 4 — show diff, get confirmation, apply
Weekly cost checkRun Step 5 — generate cost report

Step 1 — Fetch Current Usage

Pull recent usage from the Anthropic API:

# Get usage for the last 7 days
curl -s "https://api.anthropic.com/v1/usage?days=7" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" | jq '.'

If the usage endpoint is unavailable, estimate from conversation history:

  • Count turns in current session
  • Estimate tokens per turn by model (Haiku: ~500, Sonnet: ~1500, Opus: ~3000)
  • Multiply by per-token cost (see pricing table below)

Claude Pricing (March 2026):

ModelInput (per 1M)Output (per 1M)Best for
claude-opus-4-6$15.00$75.00Complex reasoning, multi-file edits
claude-sonnet-4-6$3.00$15.00Daily driver: email, research, code
claude-haiku-4-5$0.80$4.00Heartbeats, simple lookups, sub-agents

Extended thinking tokens are billed at the output rate.


Step 2 — Diagnose Waste Patterns

Check for each of these patterns in order:

Pattern 1: Expensive model on heartbeats

Signal: Agent config sets Sonnet or Opus as default; heartbeat runs 48x/day. Cost: ~$4.30/month extra vs Haiku baseline.

# Check openclaw.json for heartbeat model config
cat openclaw.json 2>/dev/null | jq '.models // .model // "not configured"'

Flag if default model ≠ claude-haiku-4-5 and no heartbeat-specific override exists.

Pattern 2: Extended thinking on simple tasks

Signal: Thinking enabled globally; agent handles calendar, weather, simple lookups. Cost: $3–15/month depending on budget and frequency.

# Check for thinking config
cat openclaw.json 2>/dev/null | jq '.thinking // "not configured"'

Flag if thinking.enabled: true with no task-type restrictions.

Pattern 3: Bloated system prompt

Signal: SOUL.md + AGENTS.md + MEMORY.md + all installed skills > 5,000 tokens combined. Cost: 10–20% on every single API call.

# Estimate token counts (rough: 4 chars ≈ 1 token)
wc -c SOUL.md AGENTS.md MEMORY.md 2>/dev/null
# Estimate: bytes / 4 = approximate tokens

Flag if total > ~20,000 characters (≈5,000 tokens).

Pattern 4: Uncompacted conversation history

Signal: Session has 40+ turns; history tokens compound on every new message. Cost: 5–15% overhead on long sessions.

Count conversation turns in context. Flag if > 40 turns without /compact.

Pattern 5: Redundant skills loaded

Signal: Multiple skills installed that overlap in function (e.g., 3 research tools). Cost: Each skill adds ~100–500 characters to system prompt on every turn.

# List installed skills
openclaw skills list 2>/dev/null

Flag if > 8 skills installed or if obvious overlap exists.


Step 3 — Generate Ranked Recommendations

After diagnosis, output a prioritized fix list. Format:

─────────────────────────────────────
TOKEN SAVER REPORT — [DATE]
─────────────────────────────────────

WASTE DETECTED:

  🔴 HIGH IMPACT — Heartbeats running on Sonnet
     Estimated waste: ~$4.00/month
     Fix: Set heartbeat model to claude-haiku-4-5 in openclaw.json

  🟡 MEDIUM IMPACT — Extended thinking enabled globally
     Estimated waste: ~$8.00/month
     Fix: Restrict thinking to tasks with complexity: high flag

  🟡 MEDIUM IMPACT — System prompt at ~6,200 tokens
     Estimated waste: ~12% on all calls
     Fix: Trim MEMORY.md — remove entries older than 14 days

  🟢 LOW IMPACT — 11 skills installed, possible overlap
     Estimated waste: ~$1.50/month
     Fix: Audit and disable rarely-used skills in openclaw.json

─────────────────────────────────────
Total estimated monthly savings if all fixes applied: ~$13.50
─────────────────────────────────────

Step 4 — Apply Fixes (With Confirmation)

NEVER edit files without showing the diff and getting explicit confirmation.

Fix A: Model routing in openclaw.json

Show proposed change:

// BEFORE:
{ "model": "claude-sonnet-4-6" }

// AFTER:
{
  "model": "claude-sonnet-4-6",
  "models": {
    "heartbeat": "claude-haiku-4-5",
    "subagent": "claude-haiku-4-5",
    "reasoning": "claude-sonnet-4-6"
  }
}

Ask: "Apply this change to openclaw.json? (yes/no)"

Only apply if confirmed.

Fix B: Trim MEMORY.md

Identify entries older than 14 days. Show lines to remove. Ask for confirmation before deleting.

Fix C: Disable extended thinking for simple tasks

Check openclaw.json thinking config. Show proposed config change. Confirm before applying.


Step 5 — Generate Cost Report

Run the cost report script if available:

python3 skills/token-saver/scripts/token_report.py 2>/dev/null

If script unavailable, generate inline estimate:

─────────────────────────────────────
COST ESTIMATE — Week of [DATE]
─────────────────────────────────────

Model breakdown (estimated):
  claude-sonnet-4-6   ~$18.40  (main agent turns)
  claude-haiku-4-5    ~$0.80   (heartbeats — if configured)
  Extended thinking   ~$6.20   (thinking turns)

Top cost drivers:
  1. Heartbeats        ~48/day × 7 days = 336 calls
  2. Research tasks    ~12 calls with extended thinking
  3. System prompt     ~4,800 tokens × all calls

Projected monthly: ~$109
─────────────────────────────────────

Model Routing Reference

Recommended openclaw.json configuration for cost efficiency:

{
  "models": {
    "default": "claude-sonnet-4-6",
    "heartbeat": "claude-haiku-4-5-20251001",
    "subagent": "claude-haiku-4-5-20251001",
    "reasoning": "claude-sonnet-4-6"
  },
  "thinking": {
    "enabled": true,
    "budgetTokens": 4000,
    "taskFilter": ["complexity:high", "type:debug", "type:architecture"]
  }
}

Typical savings vs all-Sonnet baseline: 50–70% reduction with no quality loss on daily tasks.


Privacy

Token Saver reads local files only (openclaw.json, MEMORY.md, SOUL.md). It calls the Anthropic usage API with your own API key. No data leaves your environment except to Anthropic's own endpoint.


Version

v0.1.0 — 2026-03-31 — Initial release. Waste detection, ranked recommendations, safe apply with confirmation, cost reports.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

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

平台分布

OpenClaw

88.15%
按下载量换算821

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills