skill-token-budget-linter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Token Budget Linter

Skill Token预算检查工具

Measure standing-context pressure for skill assets before they ship.
Scope: Static token-budget linting only. Does not change OpenCode DCP, RTK, or harness hook policy.
在skill资产发布前评估固定上下文压力。
适用范围: 仅支持静态token预算检查。不会更改OpenCode DCP、RTK或harness钩子策略。

Dispatch

参数说明

$ARGUMENTSAction
<name>
Lint one skill directory
repo
/
--all
Lint every
skills/*/SKILL.md
--strict
Fail on warning-tier budgets, not just hard limits
EmptyShow budget table and example commands
参数操作
<name>
检查单个skill目录
repo
/
--all
检查所有
skills/*/SKILL.md
文件
--strict
达到警告级预算即判定失败,而非仅严格限制
无参数显示预算表格和示例命令

Budget Table

预算阈值表

SurfaceSoft warnHard fail
description
200 chars1024 chars
body (below frontmatter)400 lines500 lines
single reference file300 lines500 lines
检查范围警告阈值失败阈值
description
200字符1024字符
正文(前置元数据下方)400行500行
单个参考文件300行500行

Workflow

工作流程

bash
uv run python skills/skill-token-budget-linter/scripts/lint_budget.py <name>
uv run python skills/skill-token-budget-linter/scripts/lint_budget.py --all
bash
uv run python skills/skill-token-budget-linter/scripts/lint_budget.py <name>
uv run python skills/skill-token-budget-linter/scripts/lint_budget.py --all

Validation Contract

验证合约

bash
uv run python skills/skill-token-budget-linter/scripts/check.py
bash
uv run python skills/skill-token-budget-linter/scripts/check.py