ccjingeth

OpenClaw Token Optimizer

AI 智慧體v1.0.0
作者:ccjingeth更新於 2026-05-17openclaw-token-save@clawhub_ccjingeth/openclaw-token-save
提示詞最佳化上下文管理記憶增強#Cron#Json#Prompt

據 AlphaMoat 統計,截至 2026-10,OpenClaw Token Optimizer 累計下載 5,477 次、獲 3 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 5,280 位,在「AI 智慧體」分類(1,632 個)中排名第 737 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
5477
星標
3
全站下載量排名
#5,280
全站前 49% · 「AI 智慧體」前 46%
平台累計下載星標評論
ClawHub ↗53183-
SkillHub ↗54773—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

文件建議檢查注入的工作區檔案、對話歷史、快取、裁剪與記憶搜尋等成本來源,再核實模型和提供商是否支援相關設定。輸出應作為配置建議和分階段計劃;節省估計不是實測結果,應用前需驗證版本相容性。

資料釋出於 2026-10-27

可以用來做什麼

  • 梳理上下文注入和呼叫成本來源
  • 規劃檔案裁剪、快取或記憶檢索調整
  • 制定可驗證的分階段配置計劃

什麼時候用

  • 需要審計 OpenClaw 的 token 使用或成本時
  • 應用配置更改前能夠核實提供商、模型和版本支援時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

基於當前配置提出 token 最佳化方案,區分估算項和需要實測驗證的效果。

月度資料趨勢

累計下載5477
2227397357182026-03 · 累計下載 24682026-05 · 累計下載 45882026-06 · 累計下載 47582026-07 · 累計下載 49822026-08 · 累計下載 50962026-09 · 累計下載 52582026-10 · 累計下載 547726-0326-0926-10
星標3
2342026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 32026-08 · 星標 32026-09 · 星標 32026-10 · 星標 326-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-105477—3
2026-095258—3
2026-085096+2.3%3
2026-074982+4.7%3
2026-064758+3.7%3
2026-054588—3
2026-032468—3

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.3 KB · ClawHub v1.0.0
---
name: openclaw-token-optimizer
description: Optimize OpenClaw token usage and cost by auditing context injection, trimming workspace files (AGENTS.md/SOUL.md/MEMORY.md and daily memory), enabling prompt caching, heartbeat, context pruning, compaction, memory search or qmd, subagents, model tiering, and cron frequency. Use when a user asks to reduce OpenClaw token spend, speed up sessions, shrink context, or configure openclaw.json and memory search settings.
---

# OpenClaw Token Optimizer

## Overview
Deliver a practical audit and configuration plan that cuts input tokens and unnecessary calls while keeping answer quality. Provide concrete config edits, workspace file trimming guidance, and a prioritized rollout plan.
展開全部(共 54 行)
## Workflow

### 1) Scope and locate configuration
- Identify the OpenClaw config file location (common paths include `~/.openclaw/openclaw.json`, `.openclaw/openclaw.json`, or project root config).
- List injected workspace files in scope (e.g., `AGENTS.md`, `SOUL.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `HEARTBEAT.md`, `MEMORY.md`, and `memory/YYYY-MM-DD.md`).
- Confirm provider and model support for prompt caching and memory search to avoid proposing unsupported keys.

### 2) Baseline token sources
- Break input cost into buckets: system prompt, tool schema, workspace files, memory files, and conversation history.
- Use a rough sizing method if exact token counts are unavailable (e.g., characters/4 as a quick estimate) and call out that the estimate is approximate.

### 3) Input reduction (highest ROI)
- Trim workspace files first. Target budgets:
  - `AGENTS.md`: keep only essential agent rules and policies.
  - `SOUL.md`: reduce to short persona bullets.
  - `MEMORY.md`: keep durable facts only; archive the rest.
  - `memory/YYYY-MM-DD.md`: prune or rotate daily logs.
- Remove unused workspace injections in config (e.g., if `TOOLS.md` or `IDENTITY.md` is unused).
- Prefer memory search over full-file injection for large memories. If using qmd, index only needed paths.

### 4) Cache and context control
- Enable prompt caching for the primary model when supported. Set `cacheRetention` to a long window and keep a consistent system prompt to maximize cache hits.
- Configure heartbeat to keep the cache warm (e.g., ~55 minutes), using a low-cost model and a minimal heartbeat prompt.
- Enable context pruning with a TTL that matches the cache window to prevent unbounded history growth.
- Add compaction with memory flush so long sessions preserve durable decisions while clearing history.

### 5) Call reduction
- Audit cron and scheduled tasks. Consolidate overlapping checks, reduce frequency, and move non-creative tasks to cheaper models.
- Configure delivery to be on-demand or only on change to avoid no-op calls.

### 6) Model strategy
- Default to a cost-effective model for routine work and provide aliases for manual upgrades to premium models.
- Use subagents for parallel, isolated tasks with cheaper models to avoid bloating the main context.

### 7) Deliverables
Provide:
- A short audit summary and estimated savings.
- A concrete config patch or JSON snippet for `openclaw.json`.
- A list of files to trim, with before/after size targets.
- A phased rollout plan (quick wins first, then advanced options).

## References
- Use `references/openclaw-token-optimization.md` for configuration snippets, checklists, and qmd guidance.

「AI 智慧體」分類下的熱門技能

相關榜單

看看同類產品的完整排名:

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。