skill-token-budget-linter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill 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
参数说明
| $ARGUMENTS | Action |
|---|---|
| Lint one skill directory |
| Lint every |
| Fail on warning-tier budgets, not just hard limits |
| Empty | Show budget table and example commands |
| 参数 | 操作 |
|---|---|
| 检查单个skill目录 |
| 检查所有 |
| 达到警告级预算即判定失败,而非仅严格限制 |
| 无参数 | 显示预算表格和示例命令 |
Budget Table
预算阈值表
| Surface | Soft warn | Hard fail |
|---|---|---|
| 200 chars | 1024 chars |
| body (below frontmatter) | 400 lines | 500 lines |
| single reference file | 300 lines | 500 lines |
| 检查范围 | 警告阈值 | 失败阈值 |
|---|---|---|
| 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 --allbash
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 --allValidation Contract
验证合约
bash
uv run python skills/skill-token-budget-linter/scripts/check.pybash
uv run python skills/skill-token-budget-linter/scripts/check.py