Wave Token Saver — Wave 令牌 Saver
v1.0Five-phase 令牌 审计 & optimization 框架 for OpenClaw: Discover → Prioritize (3D matrix) → 优化 (9 category techniques) → 验证 → 监控. Universal; adapt via 应用endix. Trigger: "省点 令牌", "令牌 优化", "令牌 saver", "令牌 审计", "检查 令牌 消耗" Version 历史: v1.0 (2026-05-03) — 初始框架, 6 categories v1.5 (2026-05-04) — +G 提供者 Caching, +H Behavioral Discipline v2.0 (2026-05-12) — +I 上下文 Engineering v2.1 (2026-05-14) — +J Intelligent 模型 Routing (OpenSquilla) + Quick 启动 图形界面de, +Category Decision Tree + 监控 phase 检查points
运行时依赖
版本
🎯 Quick Wins (<5 min)
安装命令
点击复制技能文档
令牌 Saver
Universal 令牌 审计 & optimization 框架 for OpenClaw 代理s. Based on real-world practice (2026-05-04).
Core Principles Tier your 模型 usage — Simple tasks use cheap 模型s; complex reasoning uses expensive ones. Don't mix the two. Prompts say what, not why — Background rationale and philosophy are noise to an 代理. Strip them. Batch > Serial — One call for 10 结果s costs marginally more than three calls for 3+3+4 结果s. Combine. 上下文 = Cost — Every file loaded at 会话 启动, every 工具 模式 registered, every past message injected — all have a 令牌 price. Idle = Zero burn — Nighttime, weekends, and idle periods should 运行 nothing. 配置 active hours. 输出
After each full execution, write a 报告 (令牌-审计-报告-YYYY-MM-DD.md) contAIning: before/after comparison table, estimated weekly savings per change, items deferred and why, recommended next step.
Quick 启动
Not every 审计 needs the full Phase 1-5 treatment. Use these shortcuts based on your goal:
🚀 Express 审计 (15 min)
Trigger: "快速 令牌 审计"
运行 Phase 1A (enumerate cron tasks) + Phase 1D (模型 tier map) Skip directly to Phase 3 category table and pick the lowest-hanging fruit 应用ly Safe techniques only, no user confirmation needed Skip Phase 4 and Phase 5 — just 记录 the changes 🎯 Quick Wins (<5 min)
Trigger: "快速省 令牌" Go strAIght to these high-impact, zero-risk techniques:
A3 (constrAIn 输出 — 添加 conciseness instruction) B1 (right-size each task — cheapest viable 模型) G1 (fixed prefix first — static prefix + dynamic suffix) H1/H2 (default to working path, fAIl once and switch)
应用ly directly without 审计 preamble.
🔄 When to 运行 full 审计 Indicator Action First time using this 技能 Full Phase 1-5 — establish baseline Cron tasks changed 签名ificantly Phase 1-3 — re-discover + re-优化 New 提供者/API 添加ed Phase 1B + 3 — 检查 config + 优化 >30 days since last 审计 Phase 1-2 — measure drift, then re-优化 Just want a quick 检查 Quick Wins or Express 审计 Phase 1: DISCOVER — Map the Full 令牌 Landscape 1A Enumerate All Automated Tasks
Read your cron/scheduled task configuration (e.g. ~/.OpenClaw/cron/jobs.json).
For each task record:
name 模型 (or "default" if un设置) message / prompt length in chars schedule frequency (dAIly / weekly / other) delivery.mode (announce / none) 会话Tar获取 (isolated / mAIn) 1B Analyze 代理 Configuration
Inspect your gateway config (e.g. OpenClaw.json):
代理s.defaults.heartbeat.* — interval, active hours, isolated 会话, light 上下文 flag 代理s.defaults.compaction.mode — message retention aggressiveness 代理s.列出[].工具s.性能分析 — full, coding, or custom 代理s.列出[].模型 — per-代理 模型 override 1C Measure 上下文 Load
列出 every file that is injected at 会话 启动 (typically files in the workspace root directory). Measure each in chars and estimate 令牌 cost (~3 chars per 令牌 for CJK-heavy text, ~4 for English-heavy).
If LCM (Lossless 上下文 Management) is active, note the number and average size of compacted summary blocks injected per turn.
If 工具 模式s are 访问ible, estimate total 模式 chars: (count of registered 工具s × average 模式 size in chars).
1D Map 模型s to Tiers
Categorize all avAIlable 模型s into three tiers based on capability and cost:
🏆 Premium (strong reasoning, high cost): e.g. deepseek-v4-pro, gpt-5.x 🟡 Standard (balanced): e.g. deepseek-v4-flash, minimax-m2.7 🟢 Economy (lightweight): e.g. minimax-m2.7-highspeed, ollama local
Map each task from 1A to its current 模型 tier.
⚠️ 检查point: Before moving to Phase 2, present your Phase 1 findings (task inventory, file sizes, 模型 tier map) to the user. Confirm that the inventory is complete and the measurements are correct. This 预防s optimizing the wrong things.
Phase 2: PRIORITIZE — Build Your Decision Matrix
Score each finding from Phase 1 along three independent dimensions:
Dimension 扩展 Assessment 令牌 Impact 🎯 High / Med / Low 令牌s per occurrence × occurrences per period Risk ⚠️ Safe / Moderate / High Can you undo it? Does it affect core function? Effort 🔧 Easy / Med / Hard Single config change? Multi-file edit? Needs re搜索? How to Score
Compute a relative priority for each finding by inverting Risk and Effort:
Priority = ImpactWeight × (1 / RiskWeight) × (1 / EffortWeight)
Where each dimension maps to a simple numeric weight:
Impact: High=3, Med=2, Low=1 Risk: Safe=1, Moderate=2, High=3 Effort: Easy=1, Med=2, Hard=3
Focus on items scoring ≥ 1.5 first. Skip items < 1.0 unless they are trivially easy (effort=1) and safe (risk=1).
Common High-Impact Patterns
These patterns tend to score high across most 部署ments:
Pattern Typical Impact Typical Risk Typical Effort Overly verbose task prompts High Safe Easy Heavy 模型s on simple tasks High Safe Easy No active hours on heartbeat Med-High Safe Easy Duplicated content across bootstrap files Med-High Safe Easy-Med Full 工具 性能分析 on task-specif