mcpField
V
validate-counts

validate-counts

github.com/yonatangross测试与质量299119 次安装今天更新
代码仓库

关于 validate-counts

validate-counts 用于核对 OrchestKit 各权威来源中的 hook、技能和 Agent 数量。它将文件系统计数与文档及清单比较,并标出差异所在的文件和字段。

主要功能

  1. 01统计 hook、技能和 Agent
  2. 02比较权威来源中的数量
  3. 03标出差异对应的文件和字段
  4. 04执行完整验证或仅统计

适用场景

  1. 01发布前检查数量是否一致
  2. 02定位清单与文档之间的偏差

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/yonatangross/orchestkit --skill validate-counts

安装后在 Claude Code 中输入/validate-counts确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

test-cases.json
references/
count-locations.md
rules/
_sections.md
_template.md
drift-reporting.md
sources-authoritative.md
scripts/
count-all.sh
validate-counts.sh

详细介绍

验证计数

检查 OrchestKit 的所有权威来源中,钩子、技能和 Agent 的数量是否一致。输出对比表,并通过精确的文件引用标记差异。

快速开始

# Full validation: counts src/ vs CLAUDE.md and manifests (run from repo root)
bash src/skills/validate-counts/scripts/validate-counts.sh

# Just get raw counts from src/
bash src/skills/validate-counts/scripts/count-all.sh

规则

类别规则影响关键模式
计数来源rules/sources-authoritative.md(加载 ${CLAUDE_SKILL_DIR}/rules/sources-authoritative.md)HIGH文件系统是权威来源;派生来源必须与之匹配
差异检测rules/drift-reporting.md(加载 ${CLAUDE_SKILL_DIR}/rules/drift-reporting.md)HIGH对比表 + 使用 file:field 引用标记

共计:2 个类别下的 2 条规则

工作流

  1. 运行 scripts/validate-counts.sh 进行完整验证(计数 + 差异对比),或运行 scripts/count-all.sh 仅获取原始计数
  2. 阅读 CLAUDE.md——从 Project Overview 和 Version 部分提取计数
  3. 阅读 manifests/ork.json——检查 skill/agent/hook 数组长度
  4. 构建对比表(格式参见 rules/drift-reporting.md)
  5. 使用文件 + 字段引用标记所有不匹配项;否则输出“All counts consistent.”

参考资料

按需使用 Read("${CLAUDE_SKILL_DIR}/references/<file>") 加载:

文件内容
count-locations.md每个计数所在的位置,以及差异产生的原因

相关技能

  • release-checklist — 将 validate-counts 作为发布门禁的第 5 步
  • doctor — 更全面的健康检查,包含计数验证
  • audit-skills — 对技能结构和完整性进行质量审计

常见错误

  1. 从 plugins/ 而不是 src/ 计数——中断构建后,plugins/ 可能为空
  2. 与已删除的别名清单进行对比——v7 中仅存在 manifests/ork.json
  3. 忘记钩子的细分:全局 + Agent 范围 + 技能范围的数量必须等于总数

评论

支持 Markdown