make-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePackage any workflow into a Claude Code skill. The output is a SKILL.md ready to publish with .
/publish-skill将任意工作流打包为Claude Code skill,输出为可通过发布的SKILL.md文件。
/publish-skillPhase 1: Capture the Workflow
阶段1:捕获工作流
Ask for anything missing:
- What does it do? — One sentence. What problem does it solve?
- When should it trigger? — Exact phrases or contexts. Be specific.
- What does it need from the user? — Inputs before it can run.
- What does it output? — File changes, code, chat output, commands?
- What are the steps? — Walk through the process start to finish.
- What are the hard rules? — Things it must always or never do.
If the current conversation already describes a workflow, extract answers from it before asking. Don't ask for what you already have.
询问缺失的所有信息:
- 它的功能是什么? —— 用一句话描述,它解决了什么问题?
- 什么时候应该触发? —— 准确的短语或上下文,表述要具体。
- 需要用户提供什么? —— 运行前需要的输入项。
- 它的输出是什么? —— 文件变更、代码、对话输出、命令?
- 执行步骤有哪些? —— 从头到尾梳理整个流程。
- 硬性规则是什么? —— 必须始终遵守或绝对不能做的事项。
如果当前对话已经描述了工作流,先从中提取对应答案再询问,不要索要你已经获取的信息。
Phase 2: Write the Frontmatter
阶段2:编写前置元数据
yaml
---
name: skill-name # lowercase, hyphenated, no spaces
description: [What it does]. Use when [contexts]. Triggers on requests like "[exact phrase]", "[exact phrase]", "[exact phrase]", or any request for [broader category].
category: [devops|ai|analytics|auth|payments|seo|marketing|planning|meta|workflow]
tags: [tag1, tag2, tag3] # 3-5 lowercase keywords
author: tushaarmehtaa
---The description is the trigger. Claude uses it to decide when to activate the skill. Make it explicit:
- Include WHAT the skill does AND WHEN to use it
- List specific trigger phrases in quotes — exact words a user would type
- End with a broader catch-all pattern
- Over-specify rather than under-specify — Claude tends to undertrigger
yaml
---
name: skill-name # lowercase, hyphenated, no spaces
description: [What it does]. Use when [contexts]. Triggers on requests like "[exact phrase]", "[exact phrase]", "[exact phrase]", or any request for [broader category].
category: [devops|ai|analytics|auth|payments|seo|marketing|planning|meta|workflow]
tags: [tag1, tag2, tag3] # 3-5 lowercase keywords
author: tushaarmehtaa
---description字段是触发依据,Claude会根据它决定何时激活该skill,表述要清晰明确:
- 要包含skill的功能以及适用场景
- 用引号列出具体的触发短语——即用户会输入的准确内容
- 末尾添加更宽泛的兜底匹配规则
- 宁可描述过细也不要描述不足——Claude容易出现触发不足的问题
Phase 3: Write the Body
阶段3:编写正文
The structure that matches the quality bar of the existing skills:
[One-liner opener — what this does, what it outputs. No heading above this.]符合现有skill质量标准的结构如下:
[One-liner opener — what this does, what it outputs. No heading above this.]Phase 1: [First Phase Title]
Phase 1: [First Phase Title]
[Instructions. Dense. Opinionated. No hedging.]
[Instructions. Dense. Opinionated. No hedging.]
Phase 2: [Next Phase Title]
Phase 2: [Next Phase Title]
...
...
Verify
Verify
[ ] [Thing that must be true]
[ ] [Thing that must be true]
[ ] [Edge case handled]
**Rules that don't move:**
- Open with a single sentence — no `# Heading` before it. This is the first thing Claude reads.
- Use `## Phase N: Title` for every major section
- Use `### 1.1` sub-phases only when Phase 1 needs branching (stack detection, mode selection)
- Code blocks must contain real, runnable code — not pseudocode
- **Bold warnings inline** for things that fail silently or break the whole flow
- End with `## Verify` using bare `[ ]` items inside a code block (not markdown `- [ ]` list items)
- Under 500 lines total — push long examples to `references/guide.md`[ ] [Thing that must be true]
[ ] [Thing that must be true]
[ ] [Edge case handled]
**固定规则:**
- 开头用一句话引入——前面不要加`# 标题`,这是Claude读取的第一部分内容
- 所有主章节都使用`## 阶段N: 标题`格式
- 仅当阶段1需要分支(技术栈检测、模式选择)时才使用`### 1.1`子阶段
- 代码块必须包含真实可运行的代码——不要用伪代码
- 对会静默失败或破坏整个流程的内容**添加加粗的行内警告**
- 末尾添加`## 验证`章节,使用代码块包裹的裸`[ ]`项(不要用markdown的`- [ ]`列表项)
- 总内容不超过500行——过长的示例请放到`references/guide.md`中Phase 4: The Verify Section
阶段4:编写验证章节
The verify section is not optional. It's how the user confirms the skill ran correctly.
Format exactly like this — bare brackets in a fenced code block:
markdown
undefined验证章节是必填项,用户通过它确认skill是否正确运行。
严格按照以下格式编写——在围栏代码块中使用裸括号:
markdown
undefinedVerify
Verify
[ ] [Thing that must be true after the skill runs]
[ ] [Output format is correct]
[ ] [Edge case handled]
[ ] [Common mistake avoided]
Each item must be checkable — either it's done or it isn't. No vague items like "quality looks good."[ ] [Thing that must be true after the skill runs]
[ ] [Output format is correct]
[ ] [Edge case handled]
[ ] [Common mistake avoided]
每个检查项都必须是可验证的——非是即否,不要出现类似“质量看起来不错”这样模糊的项。Phase 5: References (if needed)
阶段5:参考文档(按需添加)
Create when:
references/guide.md- Full examples would push SKILL.md over 500 lines
- Multiple variants need their own section
- Edge cases are complex enough to need real examples
The reference file must have real input → output examples. Not outlines of examples.
出现以下情况时请创建:
references/guide.md- 完整示例会导致SKILL.md超过500行
- 多个变体需要单独的说明章节
- 边界情况比较复杂,需要真实示例辅助说明
参考文件必须包含真实的输入→输出示例,不能只有示例大纲。
Phase 6: Test Prompts
阶段6:编写测试提示词
Write 3–5 prompts that should trigger the skill, and 2 that should NOT:
"make a skill for PR reviews" ✅ should trigger
"create a skill to audit my code" ✅ should trigger
"turn this process into a skill" ✅ should trigger
"review my PR" ❌ should not trigger (different skill)
"what skills are available?" ❌ should not triggerUse these to validate the description before publishing. If any trigger should fire but doesn't, add the phrase to the description.
编写3-5个应该触发该skill的提示词,以及2个不应该触发的提示词:
"make a skill for PR reviews" ✅ should trigger
"create a skill to audit my code" ✅ should trigger
"turn this process into a skill" ✅ should trigger
"review my PR" ❌ should not trigger (different skill)
"what skills are available?" ❌ should not trigger发布前使用这些提示词验证description的触发逻辑,如果有应该触发但没有触发的情况,将对应短语添加到description中。
Phase 7: Publish
阶段7:发布
Use to copy the skill into the repo, update the README, build the site, and push.
/publish-skill使用命令将skill复制到代码仓库、更新README、构建站点并推送。
/publish-skillVerify
验证
[ ] YAML frontmatter has all 5 fields (name, description, category, tags, author)
[ ] Description includes specific trigger phrases in quotes
[ ] Body opens with a one-liner — no heading before it
[ ] All sections use ## Phase N: Title format
[ ] Code blocks contain real code, not pseudocode
[ ] Critical constraints are bolded inline
[ ] Verify section uses bare [ ] items in a fenced code block
[ ] SKILL.md is under 500 lines
[ ] Long examples moved to references/guide.md if needed
[ ] 3-5 test prompts written to validate triggersSee references/guide.md for full annotated SKILL.md examples, common structural mistakes, and the complete list of valid categories.
[ ] YAML frontmatter has all 5 fields (name, description, category, tags, author)
[ ] Description includes specific trigger phrases in quotes
[ ] Body opens with a one-liner — no heading before it
[ ] All sections use ## Phase N: Title format
[ ] Code blocks contain real code, not pseudocode
[ ] Critical constraints are bolded inline
[ ] Verify section uses bare [ ] items in a fenced code block
[ ] SKILL.md is under 500 lines
[ ] Long examples moved to references/guide.md if needed
[ ] 3-5 test prompts written to validate triggers查看references/guide.md获取带完整注释的SKILL.md示例、常见结构错误以及有效分类的完整列表。