claude-skill-spec-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Spec Audit
Skill规范审核
Check installed skills against the agentskills.io specification and local conventions for metadata completeness.
检查已安装的Skill是否符合agentskills.io规范以及元数据完整性的本地约定。
Arguments
参数
- Skill names: tokens after the command -> filter to those skills only
- --fix: automatically add missing fields (prompts for values)
- Default: scan all non-symlinked skills in
~/.claude/skills/
- Skill名称:命令后的令牌 -> 仅筛选这些Skill
- --fix:自动添加缺失字段(提示输入值)
- 默认行为:扫描中所有非符号链接的Skill
~/.claude/skills/
Spec Requirements (agentskills.io)
规范要求(agentskills.io)
| Field | Required | Notes |
|---|---|---|
| Yes | 1-64 chars, lowercase, hyphens only, must match directory name |
| Yes | 1-1024 chars, non-empty |
| No | Max 500 chars, environment requirements |
| No | Arbitrary key-value map |
| No | Space-delimited tool list (experimental) |
| 字段 | 是否必填 | 说明 |
|---|---|---|
| 是 | 1-64字符,小写,仅含连字符,必须与目录名匹配 |
| 是 | 1-1024字符,非空 |
| 否 | 最多500字符,环境要求 |
| 否 | 任意键值对映射 |
| 否 | 空格分隔的工具列表(实验性) |
Naming Conventions
命名约定
Skill names follow the pattern:
[scope]-[platform/org]-[group]-[name]Skill名称遵循以下格式:
[scope]-[platform/org]-[group]-[name]Rules
规则
- Lowercase, kebab-case, no consecutive hyphens, 2-4 words, max 40 chars
- Role-noun suffixes allowed (,
-writer,-scheduler)-namer - Standardized action synonyms: (compliance),
audit(broad analysis),scan(lookup),search(classify+act)triage
- 小写、短横线命名法,无连续连字符,2-4个词,最多40字符
- 允许使用角色名词后缀(、
-writer、-scheduler)-namer - 标准化动作同义词:(合规性检查)、
audit(广泛分析)、scan(查找)、search(分类+执行)triage
Scope prefix (required)
范围前缀(必填)
Derived from :
metadata.scope| Scope | Prefix | Example |
|---|---|---|
| | |
| | |
| (none) | |
由派生:
metadata.scope| 范围 | 前缀 | 示例 |
|---|---|---|
| | |
| | |
| 无 | |
Platform prefix (when single-platform dependent)
平台前缀(依赖单一平台时使用)
| Platform | Prefix | When to use |
|---|---|---|
| GitHub | | Skill requires |
| Git | | Skill requires git but not GitHub |
| Slack | | Skill requires Slack MCP server |
| Google Workspace | | Skill requires |
Multi-platform or general skills stay unprefixed. If a skill touches 2+ platforms, no platform prefix — the scope prefix alone is enough.
| 平台 | 前缀 | 使用场景 |
|---|---|---|
| GitHub | | Skill需要 |
| Git | | Skill需要git但不需要GitHub |
| Slack | | Skill需要Slack MCP服务器 |
| Google Workspace | | Skill需要 |
多平台或通用Skill无需添加平台前缀。如果Skill涉及2个及以上平台,仅保留范围前缀即可。
Group prefix (when 2+ skills share a domain)
分组前缀(同一领域有2个及以上Skill时使用)
| Group | Skills in group |
|---|---|
| standup, report, reflection |
| dry-run, prereq-audit, spec-audit |
| writer, post-mining |
| release, release-prep |
| release-digest, incident-investigation, sync-skills-to-plugins |
When creating a new skill, check for existing siblings. If a second skill appears in the same domain, retroactively add a shared prefix to both.
| 分组 | 组内Skill |
|---|---|
| standup、report、reflection |
| dry-run、prereq-audit、spec-audit |
| writer、post-mining |
| release、release-prep |
| release-digest、incident-investigation、sync-skills-to-plugins |
创建新Skill时,检查是否存在同领域的现有Skill。如果同一领域出现第二个Skill,需为两个Skill追溯添加共享前缀。
Local Conventions (beyond spec)
本地约定(超出规范要求)
These are project-specific conventions enforced on top of the spec:
| Field | Expected | Values |
|---|---|---|
| If skill accepts args | Short usage hint string |
| Always | Must be present (non-empty) |
| Always | |
| If skill has side effects | List of operations requiring user confirmation |
这些是项目特定的约定,在规范基础上额外强制执行:
| 字段 | 要求 | 取值范围 |
|---|---|---|
| 若Skill接受参数 | 简短的使用提示字符串 |
| 必须存在 | 非空值 |
| 必须存在 | |
| 若Skill有副作用 | 需要用户确认的操作列表 |
Workflow
工作流
Phase 1: Discover Skills
阶段1:发现Skill
- Glob for
~/.claude/skills/*/SKILL.md - Also check (project-level)
.claude/skills/*/SKILL.md - Skip symlinks — those point to and have their own conventions
.agents/skills/ - If user specified skill names, filter to matching directories
- Read each SKILL.md frontmatter
- 匹配文件
~/.claude/skills/*/SKILL.md - 同时检查(项目级)
.claude/skills/*/SKILL.md - 跳过符号链接 —— 这些链接指向,有其自身约定
.agents/skills/ - 如果用户指定了Skill名称,筛选出匹配的目录
- 读取每个SKILL.md的前置元数据
Phase 2: Validate Each Skill
阶段2:验证每个Skill
For each SKILL.md, check:
Spec compliance:
- exists, matches directory name, is lowercase with hyphens only, no consecutive hyphens, 1-64 chars
name - exists, is non-empty, 1-1024 chars
description - exists (warn if missing — not required by spec but expected locally)
compatibility
Naming conventions:
- Scope prefix matches :
metadata.scopefor personal,p-for organization, none for generico- - Platform prefix present if skill depends on a single platform (,
gh-,git-,slack-)gws- - No platform prefix if skill uses 2+ platforms
- Action synonym is standardized: not
audit/review,checknotscaninspect - No single-word names (must have at least one hyphen)
- Max 40 chars, 2-4 words
- Abbreviations only from allowlist: ,
pr,cli,oss,dep,mcp,ghgws
Local conventions:
- is present and non-empty
metadata.author - is one of:
metadata.scope,generic,personalorganization - exists if the skill body references any of these patterns:
metadata.confirms
- Slack: ,
send_message,post messagepost to Slack - Git: ,
git commit,git push,create commitpush to remote - GitHub: ,
merge,approve,create PR,create issue,create releasegh release - Calendar: ,
create eventinsert event - Files: ,
save to,write tocreate file - Install: ,
brew installinstall
- exists if the skill body references arg parsing,
argument-hint, or accepts parameters## Arguments
对每个SKILL.md,检查以下内容:
规范合规性:
- 存在,与目录名匹配,仅含小写字母和连字符,无连续连字符,长度1-64字符
name - 存在,非空,长度1-1024字符
description - 存在(若缺失则发出警告 —— 规范不强制要求但本地预期存在)
compatibility
命名约定:
- 范围前缀与匹配:
metadata.scope对应personal,p-对应organization,generic无前缀o- - 若Skill依赖单一平台,需添加平台前缀(、
gh-、git-、slack-)gws- - 若Skill使用2个及以上平台,无需添加平台前缀
- 动作同义词符合标准化:使用而非
audit/review,使用check而非scaninspect - 禁止单字名称(必须至少包含一个连字符)
- 最多40字符,2-4个词
- 仅允许使用允许列表中的缩写:、
pr、cli、oss、dep、mcp、ghgws
本地约定:
- 存在且非空
metadata.author - 为以下值之一:
metadata.scope、generic、personalorganization - 若Skill主体引用以下任一模式,必须存在:
metadata.confirms
- Slack: 、
send_message、post messagepost to Slack - Git: 、
git commit、git push、create commitpush to remote - GitHub: 、
merge、approve、create PR、create issue、create releasegh release - 日历: 、
create eventinsert event - 文件: 、
save to、write tocreate file - 安装: 、
brew installinstall
- 若Skill主体引用参数解析、章节或接受参数,
## Arguments必须存在argument-hint
Phase 3: Report
阶段3:生成报告
Print a table:
undefined打印表格:
undefinedSkill Spec Audit
Skill Spec Audit
| Skill | name | naming | desc | compat | author | scope | confirms | arg-hint | Issues |
|---|---|---|---|---|---|---|---|---|---|
| gh-dep-pr-triage | ok | ok | ok | ok | ok | ok | ok | — | 0 |
| p-blog-writer | ok | ok | ok | ok | ok | ok | ok | ok | 0 |
| new-skill | ok | MISS:scope-prefix | ok | MISS | MISS | MISS | WARN | — | 4 |
Legend: ok = present and valid, MISS = missing, WARN = likely needed but missing, — = not applicable
Summary: N skills checked, M fully compliant, X issues found
undefined| Skill | name | naming | desc | compat | author | scope | confirms | arg-hint | Issues |
|---|---|---|---|---|---|---|---|---|---|
| gh-dep-pr-triage | ok | ok | ok | ok | ok | ok | ok | — | 0 |
| p-blog-writer | ok | ok | ok | ok | ok | ok | ok | ok | 0 |
| new-skill | ok | MISS:scope-prefix | ok | MISS | MISS | MISS | WARN | — | 4 |
Legend: ok = present and valid, MISS = missing, WARN = likely needed but missing, — = not applicable
Summary: N skills checked, M fully compliant, X issues found
undefinedPhase 4: Fix (if --fix or user asks)
阶段4:修复(若使用--fix或用户要求)
For each issue, prompt the user for the value or infer it:
| Field | Inference strategy |
|---|---|
| Scan for CLI tools, MCP servers in body -> suggest "Requires X, Y" |
| Infer from existing skills or ask user |
| Ask user: generic, personal, or organization? |
| Extract side-effect patterns from body, present list for confirmation |
| Extract from |
After fixing, use Edit to insert missing fields before the closing .
---Re-run validation and show updated table.
针对每个问题,提示用户输入值或自动推断:
| 字段 | 推断策略 |
|---|---|
| 扫描主体中的CLI工具、MCP服务器 -> 建议"Requires X, Y" |
| 从现有Skill推断或询问用户 |
| 询问用户:generic、personal或organization? |
| 从主体中提取副作用模式,列出供用户确认 |
| 若存在 |
修复完成后,使用编辑功能在闭合的前插入缺失字段。
---重新运行验证并显示更新后的表格。
Determining metadata.scope
metadata.scope确定metadata.scope
metadata.scope| Scope | Criteria |
|---|---|
| Works for anyone, no personal/org-specific data |
| References your specific accounts, channels, search terms, voice |
| References company repos, internal tools, team-specific workflows |
| 范围 | 判断标准 |
|---|---|
| 适用于所有人,无个人/组织特定数据 |
| 引用您的特定账户、频道、搜索词、语音 |
| 引用公司仓库、内部工具、团队特定工作流 |
Determining metadata.confirms
metadata.confirms确定metadata.confirms
metadata.confirmsOnly add if the skill can perform irreversible or externally-visible operations. Read-only skills (scanning, searching, reporting) do NOT need confirms.
confirmsCommon confirms patterns:
| Operation | confirms entry |
|---|---|
| Post Slack message | |
| Merge PR | |
| Approve PR | |
| Create GitHub issue | |
| Create GitHub release | |
| Create calendar event | |
| Git commit | |
| Git push | |
| Write files | |
| Install tools | |
| Create PR | |
| Modify settings | |
仅当Skill可执行不可逆或外部可见操作时才添加。只读Skill(扫描、搜索、报告)不需要。
confirmsconfirms常见模式:
confirms| 操作 | confirms条目 |
|---|---|
| 发送Slack消息 | |
| 合并PR | |
| 批准PR | |
| 创建GitHub issue | |
| 创建GitHub release | |
| 创建日历事件 | |
| Git提交 | |
| Git推送 | |
| 写入文件 | |
| 安装工具 | |
| 创建PR | |
| 修改设置 | |