协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
review-skill-format【开发与工程】审查 SKILL.md 文件是否符合 agentskills.io 标准。检查 YAML 前置元数据字段、 必需章节、行数限制、步骤格式和注册表同步情况。适用于新技能在合并前需要格式 验证、现有技能被修改后需要重新验证、对某领域所有技能进行批量审计,或在拉取 请求中审查贡献者提交的技能。
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
对照 agentskills.io 开放标准验证 SKILL.md 文件。此技能检查 YAML 前置元数据完整性、必需章节存在性、步骤格式(预期结果/失败处理块)、行数限制和注册表同步情况。在合并任何新增或修改的技能前使用此技能。
create-skill 元技能创建的技能skills/setup-vault/SKILL.md)lenient 或 strict,默认值:strict)确认 SKILL.md 文件存在于预期路径,并读取其完整内容。
# 验证文件存在
test -f skills/<skill-name>/SKILL.md && echo "EXISTS" || echo "MISSING"
# 计算行数
wc -l < skills/<skill-name>/SKILL.md
预期结果: 文件存在且内容可读。行数已显示。
失败处理: 若文件不存在,检查路径是否有拼写错误。用 ls skills/<skill-name>/ 验证技能目录是否存在。若目录不存在,说明技能尚未创建——先使用 create-skill。
解析 YAML 前置元数据块(--- 分隔符之间)并验证所有必需和推荐字段是否存在。
必需字段:
name — 与目录名匹配(kebab-case)description — 少于 1024 个字符,以动词开头license — 通常为 MITallowed-tools — 逗号分隔或空格分隔的工具列表推荐的元数据字段:
metadata.author — 作者姓名metadata.version — 语义化版本字符串metadata.domain — skills/_registry.yml 中列出的领域之一metadata.complexity — 以下之一:basic、intermediate、advancedmetadata.language — 主要语言或 multimetadata.tags — 逗号分隔,3-6 个标签,包含领域名称# 检查必需的前置元数据字段是否存在
head -30 skills/<skill-name>/SKILL.md | grep -q '^name:' && echo "name: OK" || echo "name: MISSING"
head -30 skills/<skill-name>/SKILL.md | grep -q '^description:' && echo "description: OK" || echo "description: MISSING"
head -30 skills/<skill-name>/SKILL.md | grep -q '^license:' && echo "license: OK" || echo "license: MISSING"
head -30 skills/<skill-name>/SKILL.md | grep -q '^allowed-tools:' && echo "allowed-tools: OK" || echo "allowed-tools: MISSING"
预期结果: 全部四个必需字段存在。全部六个元数据字段存在。name 与目录名匹配。description 少于 1024 个字符。
失败处理: 将每个缺失字段报告为阻塞(BLOCKING)。若 name 与目录名不匹配,报告为阻塞并附预期值。若 description 超过 1024 个字符,报告为建议(SUGGEST)并附当前长度。
If the frontmatter contains a locale field, the file is a translated SKILL.md. Perform these additional checks. If no locale field is present, skip this step.
Translation frontmatter fields — Verify these five fields are present:
locale — target locale code (e.g., de, ja, zh-CN, es)source_locale — origin locale (typically en)source_commit — commit hash of the English source used for translationtranslator — who or what produced the translationtranslation_date — ISO 8601 date of translationProse language scan — Sample 3-5 body paragraphs (outside code blocks, frontmatter, and headings). Verify the prose is written in the target locale, not English.
Code block identity check — Compare code blocks in the translated file against the English source. Code blocks must be identical (code is never translated).
# Check translation frontmatter fields
for field in "locale:" "source_locale:" "source_commit:" "translator:" "translation_date:"; do
grep -q "^${field}\|^ ${field}" i18n/<locale>/skills/<skill-name>/SKILL.md \
&& echo "$field OK" || echo "$field MISSING"
done
Expected: All five translation fields present. Body paragraphs are in the target locale. Code blocks match the English source exactly.
On failure: Report missing translation fields as BLOCKING. If body paragraphs are in English despite a non-English locale, report as BLOCKING.
验证技能正文(前置元数据之后)中是否存在全部六个必需章节。
必需章节:
## When to Use## Inputs## Procedure(含 ### Step N: 子章节)## Validation(也可以是 ## Validation Checklist)## Common Pitfalls## Related Skills# 检查每个必需章节
for section in "## When to Use" "## Inputs" "## Procedure" "## Common Pitfalls" "## Related Skills"; do
grep -q "$section" skills/<skill-name>/SKILL.md && echo "$section: OK" || echo "$section: MISSING"
done
# 验证章节可以使用任一标题
grep -qE "## Validation( Checklist)?" skills/<skill-name>/SKILL.md && echo "Validation: OK" || echo "Validation: MISSING"
预期结果: 全部六个章节存在。步骤章节包含至少一个 ### Step 子标题。
失败处理: 将每个缺失章节报告为阻塞。没有全部六个章节的技能不符合 agentskills.io 标准。提供来自 create-skill 元技能的章节模板。
验证每个步骤是否遵循所需格式:编号步骤标题、上下文、代码块,以及 Expected:/On failure: 块。
对每个 ### Step N: 子章节检查:
**Expected:** 块**On failure:** 块预期结果: 每个步骤都有 Expected: 和 On failure: 块。步骤包含具体代码或指令,而非模糊描述。
失败处理: 将每个缺少 Expected/On failure 的步骤报告为阻塞。若步骤只包含模糊指令("适当地配置系统"),报告为建议,并附添加具体命令的说明。
检查 SKILL.md 是否在 500 行限制内。
lines=$(wc -l < skills/<skill-name>/SKILL.md)
[ "$lines" -le 500 ] && echo "OK ($lines lines)" || echo "OVER LIMIT ($lines lines > 500)"
预期结果: 行数为 500 行或更少。
失败处理: 若超过 500 行,报告为阻塞。建议使用 refactor-skill-structure 技能将超过 15 行的代码块提取到 references/EXAMPLES.md。典型减少幅度:通过提取扩展示例减少 20-40%。
验证技能已在正确领域下列入 skills/_registry.yml,元数据匹配。
检查:
id 存在于正确的领域章节下path 匹配 <skill-name>/SKILL.mdcomplexity 与前置元数据匹配description 存在(可以缩写)total_skills 计数与实际技能数量匹配# 检查技能是否在注册表中
grep -q "id: <skill-name>" skills/_registry.yml && echo "Registry: FOUND" || echo "Registry: NOT FOUND"
# 检查路径
grep -A1 "id: <skill-name>" skills/_registry.yml | grep -q "path: <skill-name>/SKILL.md" && echo "Path: OK" || echo "Path: MISMATCH"
预期结果: 技能已在注册表中列出,位于正确领域下,路径和元数据匹配。总计数准确。
失败处理: 若在注册表中未找到,报告为阻塞。提供注册表条目模板:
- id: skill-name
path: skill-name/SKILL.md
complexity: intermediate
language: multi
description: One-line description
name、description、license、allowed-tools)author、version、domain、complexity、language、tags)name 字段与目录名匹配description 少于 1024 个字符_registry.yml 中列出,附正确的领域、路径和元数据total_skills 计数准确description: > 多行块与 description: "inline" 看起来不同。搜索字段时检查两种模式。## Validation Checklist 而非 ## Validation。两者均可接受;检查任一标题。total_skills 数字也必须递增。这是 PR 中常见的遗漏。name 字段必须是与目录名匹配的 kebab-case。# 标题 标题是人类可读的,可以不同(如 name: review-skill-format,标题: # Review Skill Format)。create-skill — 规范格式规范;用作有效 SKILL.md 应如何的权威参考update-skill-content — 格式验证通过后,用此改进内容质量refactor-skill-structure — 当技能未通过行数检查时,用此提取和重组review-pull-request — 在审查添加或修改技能的 PR 时,将 PR 审查与格式验证结合locale, source_locale, source_commit, translator, translation_date)