validate-counts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseValidate 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
undefinedbash
undefinedFull 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
undefinedbash src/skills/validate-counts/scripts/count-all.sh
undefinedRules
规则
| Category | Rule | Impact | Key Pattern |
|---|---|---|---|
| Count Sources | | HIGH | Filesystem is authoritative; derived sources must match |
| Drift Detection | | HIGH | Comparison table + flag with file:field references |
Total: 2 rules across 2 categories
| 类别 | 规则 | 影响程度 | 核心原则 |
|---|---|---|---|
| 计数来源 | | 高 | 文件系统为权威来源;衍生来源必须与其匹配 |
| 差异检测 | | 高 | 对比表格 + 带文件:字段引用的标记 |
总计:2个规则,涵盖2个类别
Workflow
工作流程
- Run for full validation (counts + drift comparison), or
scripts/validate-counts.shfor raw counts onlyscripts/count-all.sh - Read — extract counts from Project Overview and Version section
CLAUDE.md - Read — check skill/agent/hook array lengths
manifests/ork.json - Build the comparison table (see for format)
rules/drift-reporting.md - Flag any mismatches with file + field references; otherwise output "All counts consistent."
- 运行进行完整验证(计数+差异对比),或运行
scripts/validate-counts.sh仅获取原始计数scripts/count-all.sh - 读取— 从项目概览和版本部分提取计数
CLAUDE.md - 读取— 检查skill/agent/hook数组的长度
manifests/ork.json - 生成对比表格(格式参考)
rules/drift-reporting.md - 标记任何不匹配项并附带文件+字段引用;如果全部一致则输出“所有计数均一致。”
References
参考资料
Load on demand with :
Read("${CLAUDE_SKILL_DIR}/references/<file>")| File | Content |
|---|---|
| Where every count lives and why drift happens |
通过按需加载:
Read("${CLAUDE_SKILL_DIR}/references/<file>")| 文件 | 内容 |
|---|---|
| 所有计数的存储位置以及产生差异的原因 |
Related Skills
相关技能
- — Uses validate-counts as step 5 of the release gate
release-checklist - — Broader health check that includes count validation
doctor - — Quality audit for skill structure and completeness
audit-skills
- — 将validate-counts作为发布检查的第5步
release-checklist - — 更全面的健康检查,包含计数验证
doctor - — 针对skill结构和完整性的质量审计
audit-skills
Common Mistakes
常见错误
- Counting from instead of
plugins/— plugins/ may be empty after an interrupted buildsrc/ - Comparing against deleted alias manifests — only exists in v7
manifests/ork.json - Forgetting the hook breakdown: global + agent-scoped + skill-scoped must sum to total
- 从而非
plugins/计数 — 中断构建后src/可能为空plugins/ - 与已删除的别名清单对比 — v7版本中仅存在
manifests/ork.json - 忘记hook的分类统计:全局hook + 代理范围hook + 技能范围hook的总和必须等于总hook数