validate-counts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Validate Counts

验证数量一致性

Checks that hook, skill, and agent counts are consistent across all authoritative sources in OrchestKit. Outputs a comparison table and flags drift with precise file references.
检查OrchestKit中所有权威来源的hook、skill和agent数量是否一致。输出对比表格,并通过精确的文件引用标记差异。

Quick Start

快速开始

bash
undefined
bash
undefined

Full validation: counts src/ vs CLAUDE.md and manifests (run from repo root)

完整验证:对比src/与CLAUDE.md和清单文件的数量(从仓库根目录运行)

bash src/skills/validate-counts/scripts/validate-counts.sh
bash src/skills/validate-counts/scripts/validate-counts.sh

Just get raw counts from src/

仅获取src/中的原始数量

bash src/skills/validate-counts/scripts/count-all.sh
undefined
bash src/skills/validate-counts/scripts/count-all.sh
undefined

Rules

规则

CategoryRuleImpactKey Pattern
Count Sources
rules/sources-authoritative.md
(load
${CLAUDE_SKILL_DIR}/rules/sources-authoritative.md
)
HIGHFilesystem is authoritative; derived sources must match
Drift Detection
rules/drift-reporting.md
(load
${CLAUDE_SKILL_DIR}/rules/drift-reporting.md
)
HIGHComparison table + flag with file:field references
Total: 2 rules across 2 categories
类别规则影响程度核心原则
计数来源
rules/sources-authoritative.md
(加载
${CLAUDE_SKILL_DIR}/rules/sources-authoritative.md
文件系统为权威来源;衍生来源必须与其匹配
差异检测
rules/drift-reporting.md
(加载
${CLAUDE_SKILL_DIR}/rules/drift-reporting.md
对比表格 + 带文件:字段引用的标记
总计:2个规则,涵盖2个类别

Workflow

工作流程

  1. Run
    scripts/validate-counts.sh
    for full validation (counts + drift comparison), or
    scripts/count-all.sh
    for raw counts only
  2. Read
    CLAUDE.md
    — extract counts from Project Overview and Version section
  3. Read
    manifests/ork.json
    — check skill/agent/hook array lengths
  4. Build the comparison table (see
    rules/drift-reporting.md
    for format)
  5. Flag any mismatches with file + field references; otherwise output "All counts consistent."
  1. 运行
    scripts/validate-counts.sh
    进行完整验证(计数+差异对比),或运行
    scripts/count-all.sh
    仅获取原始计数
  2. 读取
    CLAUDE.md
    — 从项目概览和版本部分提取计数
  3. 读取
    manifests/ork.json
    — 检查skill/agent/hook数组的长度
  4. 生成对比表格(格式参考
    rules/drift-reporting.md
  5. 标记任何不匹配项并附带文件+字段引用;如果全部一致则输出“所有计数均一致。”

References

参考资料

Load on demand with
Read("${CLAUDE_SKILL_DIR}/references/<file>")
:
FileContent
count-locations.md
Where every count lives and why drift happens
通过
Read("${CLAUDE_SKILL_DIR}/references/<file>")
按需加载:
文件内容
count-locations.md
所有计数的存储位置以及产生差异的原因

Related Skills

相关技能

  • release-checklist
    — Uses validate-counts as step 5 of the release gate
  • doctor
    — Broader health check that includes count validation
  • audit-skills
    — Quality audit for skill structure and completeness
  • release-checklist
    — 将validate-counts作为发布检查的第5步
  • doctor
    — 更全面的健康检查,包含计数验证
  • audit-skills
    — 针对skill结构和完整性的质量审计

Common Mistakes

常见错误

  1. Counting from
    plugins/
    instead of
    src/
    — plugins/ may be empty after an interrupted build
  2. Comparing against deleted alias manifests — only
    manifests/ork.json
    exists in v7
  3. Forgetting the hook breakdown: global + agent-scoped + skill-scoped must sum to total
  1. plugins/
    而非
    src/
    计数 — 中断构建后
    plugins/
    可能为空
  2. 与已删除的别名清单对比 — v7版本中仅存在
    manifests/ork.json
  3. 忘记hook的分类统计:全局hook + 代理范围hook + 技能范围hook的总和必须等于总hook数