关于 skill-creator
用于创建 gbrain 技能的技能,面向扩展技能库的 Agent。它指导检查能力缺口和触发条件重叠,创建符合格式的 SKILL.md,并更新清单与解析器后运行一致性测试。
主要功能
- 01识别现有技能未覆盖的需求
- 02检查技能触发条件是否重叠
- 03按约定创建 SKILL.md
- 04更新技能清单和解析器
- 05运行技能一致性测试
适用场景
- 01为缺失的用户意图创建技能
- 02确认新技能不会重复现有能力
- 03将新技能加入路由和清单
- 04验证技能文件是否通过测试
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ garrytan/ gbrain --skill skill-creator安装后在 Claude Code 中输入/skill-creator确认已加载。
详细介绍
技能创建器
契约
此技能保证:
- 新技能遵循一致性标准(frontmatter + 必需章节)
- MECE 检查:与现有技能的触发条件不重叠
- 已更新 Manifest.json
- 已更新 RESOLVER.md,并添加路由条目
- 技能通过一致性测试(
bun test test/skills-conformance.test.ts)
阶段
- 识别缺口。 缺少什么能力?哪些用户意图尚无对应技能?
- MECE 检查。 查看
skills/manifest.json和skills/RESOLVER.md。是否已有技能覆盖了此需求?如果有,请扩展现有技能,而不是创建新技能。 - 创建 SKILL.md。 使用此模板:
---
name: {skill-name}
version: 1.0.0
description: |
{One paragraph describing what the skill does and when to use it.}
triggers:
- "{trigger phrase 1}"
- "{trigger phrase 2}"
tools:
- {tool1}
- {tool2}
mutating: {true|false}
---
# {Skill Title}
## Contract
{What this skill guarantees — 3-5 bullet points}
## Phases
{Numbered workflow steps}
## Output Format
{What good output looks like}
## When it fails
Follow the [agent operator protocol](../conventions/agent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:
{2-5 concrete failures this skill hits — error codes, refusals, notices — and what to do and tell the user}
## Anti-Patterns
{What NOT to do — 3-5 items}
## Tools Used
{GBrain operations used, with descriptions}
- 添加到 manifest。 更新
skills/manifest.json,填入名称、路径和描述。 - 添加到 resolver。 在适当的类别中更新
skills/RESOLVER.md,添加路由条目。 - 验证。 运行
bun test test/skills-conformance.test.ts,确认新技能通过测试。
输出格式
新的 skills/{name}/SKILL.md 文件 + 已更新的 manifest + 已更新的 resolver。
失败时的处理
对于任何 gbrain 错误 code、退出代码、[AGENT] 块或通知块,请遵循Agent 操作员协议。此技能的具体处理方式:
bun test test/skills-conformance.test.ts失败:新的 SKILL.md 缺少必需章节(Contract、Anti-Patterns、Output Format、When it fails)或 frontmatter;请补上并重新运行。gbrain check-resolvable报告该技能无法触达:在合适的类别中添加 RESOLVER 行,然后重新运行。
反模式
- 创建与现有技能重叠的技能(违反 MECE)
- 跳过针对现有技能的 MECE 检查
- 创建的技能在 frontmatter 中没有触发条件
- 未更新 manifest.json 和 RESOLVER.md
- 创建的技能没有 Anti-Patterns 章节
评论
支持 Markdown