CD 大模型token成本节约
大模型 Token 成本节约工具。在请求到达大模型之前自动压缩 prompt 和上下文,减少 60-95% 的 token 消耗,直接降低 API 成本。支持 Claude/OpenAI/Gemini 等主流模型,提供代理模式、CLI 包装、Python SDK 和 MCP Server 四种接入方式。内置一键安装脚本、企业内网适配方案和压缩效果对比报告。基于开源项目 headroom(https://github.com/chopratejas/headroom,MIT License)封装,已注明来源与许可证。
大模型 Token 成本节约工具。在请求到达大模型之前自动压缩 prompt 和上下文,减少 60-95% 的 token 消耗,直接降低 API 成本。支持 Claude/OpenAI/Gemini 等主流模型,提供代理模式、CLI 包装、Python SDK 和 MCP Server…
As a process D 41/100 · Unfinished process — weak spots: result and completion, when it triggers, inputs and preconditions
What is at stake
The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- 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 · 3
-
high Dangerous commands
cmd-pipe-to-shellSKILL.md:202Downloads and executes remote code from an unrecognised host (pipe to shell)bash <(curl -sSL https://raw.githubusercontent.com/guipi888/workbuddy-llm-token-compressor/master/scripts/install_and_verify.sh)
-
high Dangerous commands
cmd-pipe-to-shellSKILL.md:274Downloads and executes remote code from an unrecognised host (pipe to shell)curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && rustup default stable
Medium and low: 1
-
low Dangerous commands
cmd-pipe-to-shell-known-hostscripts/install_and_verify.sh:3Pipe-to-shell installer from a well-known host (still executes remote code) (code comment)# 用法:curl -sSL https://raw.githubusercontent.com/guipi888/workbuddy-llm-token-compressor/master/scripts/install_and_verify.sh | bash
comment
Files scanned: 7. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
name-formatname should be kebab-case (lowercase letters, digits, hyphens) - warning
description-no-whendescription does not say WHEN to use the skill (no "use when") - note
frontmatter-keyunknown frontmatter key "slug" - note
frontmatter-keyunknown frontmatter key "displayName" - note
frontmatter-keyunknown frontmatter key "agent_created"
Process rating: all ten parameters 41/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
- 40Consistency. Frontmatter name (大模型token成本节约) differs from the folder (token)
- 60Tools and files. Uses tools (python) that frontmatter does not declare
- 100Steps. 43 steps
- 100Execution cost. Instruction body is 1795 tokens
- 100Running it twice. No mutating operations
- low 18 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
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- -2localhost URLs: will not work for another user
- +2Single-language instructions
- +3Description length 260: enough signal without eating the budget
- +4Structure: 35 headings
- +3Step-by-step instructions: 43 items
- +4Has examples (15 code blocks)
- +4Reference files are cited in the instructions (1 of 2)
- +3All 1 scripts are documented
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 70.