mcpField
S
skill-stocktake

skill-stocktake

github.com/zereightAgent 工作流2.1k11 次安装今天更新
代码仓库

关于 skill-stocktake

Skill Stocktake 用于审查 `.github/skills/` 中的技能及其模板,面向维护技能集合的团队。它检查目录、元数据、一致性、质量和目录覆盖情况,并生成报告。

主要功能

  1. 01盘点技能目录
  2. 02验证 SKILL.md 前置元数据
  3. 03比较技能与模板
  4. 04检查质量标准和交叉引用
  5. 05分析目录覆盖情况

适用场景

  1. 01添加技能前检查是否重复
  2. 02批量修改后核对模板
  3. 03找出过时或不完整的技能

安装

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

$npx skills add https://github.com/zereight/gitlab-mcp --skill skill-stocktake

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

详细介绍

Skill 清点

审查 .github/skills/ 和 vscode-omg/resources/templates/skills/ 目录,生成质量与覆盖率报告。

适用场景

  • 添加新技能前(避免重复)
  • 大批量更改后(确认模板保持同步)
  • 定期清理过时或不完整的技能

审计流程

步骤 1:清点
# List all skill directories
ls -1d .github/skills/*/

# Count total
ls -1d .github/skills/*/ | wc -l

# Check each has a SKILL.md
for dir in .github/skills/*/; do
  [ -f "${dir}SKILL.md" ] || echo "MISSING SKILL.md: $dir"
done
步骤 2:Frontmatter 验证(v1.0.5+)

每个 SKILL.md 都必须包含有效的 frontmatter:

---
name: skill-name           # required, kebab-case, matches directory name
description: >             # required, multi-line description with trigger keywords
  ...
argument-hint: "..."       # optional, describes argument
---

需要检查的 v1.0.5 破坏性更改:

  • ❌ hint: 字段 → ✅ argument-hint:
  • ❌ allowed-tools: 字段 → ✅ 移除(不受支持)
  • Skill 名称 autopilot → 必须改为 omg-autopilot(名称冲突)

使用以下命令验证:

# Find skills using old 'hint:' field
grep -rn "^hint:" .github/skills/

# Find skills using unsupported 'allowed-tools:'
grep -rn "^allowed-tools:" .github/skills/

# Check for old 'autopilot' directory
ls .github/skills/ | grep "^autopilot$"
步骤 3:模板同步检查
# Skills in .github but not in templates
diff <(ls .github/skills/) <(ls vscode-omg/resources/templates/skills/)

# Skills in templates but not in .github (orphan templates)
diff <(ls vscode-omg/resources/templates/skills/) <(ls .github/skills/)
步骤 4:质量检查

检查每项技能:

  • name: 与目录名称完全一致
  • description: 包含触发关键词(“激活条件:X、Y、Z”)
  • 有清晰的“适用场景”或“步骤”部分
  • 有“输出格式”或“另请参阅”部分
  • 没有指向已重命名技能的失效交叉引用(/autopilot → /omg-autopilot)
  • 文件不是空壳(少于 20 行通常表示内容不完整)
步骤 5:覆盖率分析

根据 copilot-instructions.md 中的技能目录进行检查:

# Extract skill names from instructions
grep -o '/[a-z-]*' .github/copilot-instructions.md | sort | uniq

# Compare to actual skill directories
ls -1d .github/skills/*/ | xargs -I{} basename {}

找出缺口:说明中提及但磁盘上缺失的技能,或反之。


输出格式

## Skill Stocktake Report

**Date:** [timestamp]
**Total Skills:** X

### Inventory
| Skill | Has SKILL.md | Lines | Frontmatter OK | In Instructions |
|-------|-------------|-------|----------------|-----------------|
| omg-autopilot | ✅ | 120 | ✅ | ✅ |
| [skill] | ❌ missing | — | — | ✅ |

### Issues Found
| Type | Skill | Issue | Severity |
|------|-------|-------|----------|
| Frontmatter | old-skill | Uses `hint:` not `argument-hint:` | MEDIUM |
| Sync | new-skill | In .github but missing from templates | LOW |
| Coverage | planning | Mentioned in instructions but no directory | HIGH |
| Stale | autopilot | Old name — should be omg-autopilot | HIGH |

### Summary
- Skills passing all checks: X/Y
- Issues requiring action: Z
  - HIGH: A
  - MEDIUM: B
  - LOW: C

### Recommended Actions
1. [Action with file path]
2. [Action with file path]

另请参阅

  • @omg-coordinator — 编排多技能工作流
  • /verify — 验证特定任务是否完成
  • /status — 显示当前活跃工作流的状态
  • /remember — 将质量洞察存入记忆

评论

支持 Markdown