SKILLEMALL.ai

BC token-guard-pro

Token 守护者是面向 AI Agent 的 token 成本优化系统,针对"压缩过度损失质量、语义缓存命中率低、缺乏模型路由、预算不可见不可控"四大高频痛点而设计。它用三层缓存(精确匹配/语义匹配/模式匹配)+ 自适应压缩 + 模型路由 + 预算守护,在不牺牲响应质量的前提下降低 50-80% 的 token 成本。 核心能力:智能上下文压缩(按重要度分级压缩,代码块与关键决策永不压缩)、三层语义缓存(L1 精确匹配 100% 节省/L2 语义相似 80% 节省/L3 模式匹配 50% 节省)、自适应优化(按 token 压力分阶段调整)、模型路由(按任务复杂度路由到合适模型)、预算守护(设置预算上限,超限告警与降级)、成本可视化(实时报告与趋势分析)、Prefix Cache 支持(重复前缀输入成本降至 1/10)。 适用场景:长会话 token 治理、高频问答场景缓存、多模型混合调用成本优化、企业级 token 预算管控、客服 Agent 成本降低、研究探索类任务的最大化节省。 差异化:相比仅做"上下文压缩"的浅层优化器,本技能新增 (1) 三层语义缓存,L2 语义匹配(cosine 相似度 >= 0.85)显著提升缓存命中率,告别"完全相同才命中"的低效;(2) 模型路由,按任务复杂度自动路由到合适模型(简单任务用小模型,复杂任务用大模型),成本再降 30%;(3) 预算守护,设置日/周/月预算上限,超限自动告警与降级,杜绝预算失控;(4) Prefix Cache 支持,重复前缀输入成本降至 1/10,首 token 延迟降低 50-85%;(5) 成本可视化仪表盘,实时展示节省率、缓存命中率、模型分布、成本趋势。 触发关键词:token优化、成本降低、语义缓存、上下文压缩、模型路由、预算控制、token saver、cost optimization、semantic cache、model routing

ClawHub Agent Skills author: 天轰穿 v1.0.0 MIT-0 2 files body ≈ 1 847 tokens Open the sourceclawhub.ai analyzed 2 d ago

Token 守护者是面向 AI Agent 的 token 成本优化系统,针对"压缩过度损失质量、语义缓存命中率低、缺乏模型路由、预算不可见不可控"四大高频痛点而设计。它用三层缓存(精确匹配/语义匹配/模式匹配)+ 自适应压缩 + 模型路由 + 预算守护,在不牺牲响应质量的前提下降低 50-80% 的 token…

As a process C 53/100 · Has gaps — weak spots: result and completion, when it triggers, inputs and preconditions

IntegrationAI and agentsCustomer supporttype and topics are labelled automatically from the skill text
JSON
Technical rating
B
89/100
safety, quality, tests
Safety 60%
100
Quality 40%
72
Run on models
none yet
Process rating
C
53/100
Has gaps
Result and completion w 14
0
Inputs and preconditions w 11
0
Failures and branches w 10
0
the three weakest of ten parameters · all ten

How to improve

  1. Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
For the model run — optional
  • Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
  • A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.

Guard findings · 0

✓ No critical or high findings

Files scanned: 0. Evidence is masked. Grey chips explain why severity was lowered.

Against the Agent Skills spec

  • warning description-no-when description does not say WHEN to use the skill (no "use when")
  • note frontmatter-key unknown frontmatter key "slug"
  • note frontmatter-key unknown frontmatter key "displayName"
  • note frontmatter-key unknown frontmatter key "summary"
  • note frontmatter-key unknown frontmatter key "tools"

Process rating: all ten parameters 53/100

  • 0Result and completion. Does not say what the result is
  • 0Inputs and preconditions. Does not say what the process needs to start
  • 0Failures and branches. Linear process with no failure handling
  • 0Progress reporting. Says nothing while it works
  • 20When it triggers. No condition that starts the skill
  • 100Tools and files. Tools declared in frontmatter
  • 100Steps. 25 steps
  • 100Consistency. Name and required fields are in place
  • 100Execution cost. Instruction body is 1847 tokens
  • 100Running it twice. No mutating operations
  • low 13 top-level sections: this looks like several domains in one skill

Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.

Quality signals

  • +4Description does not say when NOT to use the skill (false activations)
  • +3Description length 828: 120–800 characters recommended
  • +3Output format is not stated: the model decides each time
  • +2Single-language instructions
  • +5Description quotes 2 example trigger phrases
  • +4Structure: 29 headings
  • +3Step-by-step instructions: 25 items
  • +4Has examples (10 code blocks)
  • +1License stated

Quality base 70; lint remarks subtract, signals add up to 100. Result: 72.

External checks

ClawHub: clean
This is a disclosed token-cost optimization skill with no executable artifacts, but users should be careful with cache, routing, and budget-changing commands.
LLM: benign (high) · VirusTotal: · 17 Jul 2026