skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseskill-creator
skill-creator
Creates new skills, either generic for the global catalog or specific to the current project.
Triggers: skill:create, create skill, new skill, generate skill
创建新技能,既可以是全局目录通用的技能,也可以是当前项目专属的技能。
触发方式:skill:create, create skill, new skill, generate skill
Two modes of operation
两种运行模式
Mode /skill-create <name>
/skill-create <name>模式 /skill-create <name>
/skill-create <name>Creates a new skill that does not exist anywhere. Asks whether it is:
- Generic → goes to (available in all projects)
~/.claude/skills/<name>/SKILL.md - Project-specific → goes to (only in this project)
.claude/skills/<name>/SKILL.md
创建一个全新的、不存在的技能。会询问用户该技能属于:
- 通用型 → 保存至 (所有项目均可使用)
~/.claude/skills/<name>/SKILL.md - 项目专属型 → 保存至 (仅当前项目可用)
.claude/skills/<name>/SKILL.md
Mode /skill-add <name>
/skill-add <name>模式 /skill-add <name>
/skill-add <name>Adds an existing skill from the global catalog to the current project. Copies or creates a reference.
将全局目录中已有的技能添加到当前项目中,会复制文件或创建引用。
Process: /skill-create
流程:/skill-create
Step 1 — Gather information
步骤1 — 收集信息
Context detection (run before presenting the placement prompt):
is_claude_config = (
file_exists("install.sh")
AND (
project root contains install.sh AND skills/_shared/
OR basename(cwd) == "agent-config"
)
)
has_project_context = (
dir_exists(".claude")
)
if has_project_context AND NOT is_claude_config:
default_placement = "project-local" → option 1
else:
default_placement = "global" → option 2Ask the necessary questions to create a useful skill.
The placement prompt MUST reflect the detected default using the marker:
[DEFAULT]When :
default_placement = "project-local"Is this skill for this specific project or for all your projects?
1. This project only → .claude/skills/ [DEFAULT]
2. Global catalog → ~/.claude/skills/
What does this skill do? (one-sentence description)
When should it activate? (what situations trigger its use?)
Are there specific code patterns, commands, or processes it should know about?When :
default_placement = "global"Is this skill for this specific project or for all your projects?
1. This project only → .claude/skills/
2. Global catalog → ~/.claude/skills/ [DEFAULT]
What does this skill do? (one-sentence description)
When should it activate? (what situations trigger its use?)
Are there specific code patterns, commands, or processes it should know about?When context is ambiguous (neither nor matches):
has_project_contextis_claude_configIs this skill for this specific project or for all your projects?
1. This project only → .claude/skills/
2. Global catalog → ~/.claude/skills/
What does this skill do? (one-sentence description)
When should it activate? (what situations trigger its use?)
Are there specific code patterns, commands, or processes it should know about?The user can accept the default by pressing Enter or selecting the numbered option.
If the user has already provided enough context in the command, skip obvious questions.
上下文检测(在展示存储位置提示前执行):
is_claude_config = (
file_exists("install.sh")
AND (
project root contains install.sh AND skills/_shared/
OR basename(cwd) == "agent-config"
)
)
has_project_context = (
dir_exists(".claude")
)
if has_project_context AND NOT is_claude_config:
default_placement = "project-local" → 选项1
else:
default_placement = "global" → 选项2询问创建实用技能所需的必要信息。存储位置提示必须使用标记体现检测到的默认选项:
[DEFAULT]当 时:
default_placement = "project-local"该技能是用于当前项目还是所有项目?
1. 仅当前项目 → .claude/skills/ [DEFAULT]
2. 全局目录 → ~/.claude/skills/
该技能的功能是什么?(一句话描述)
该技能何时触发?(哪些场景会触发它的使用?)
是否有特定的代码模式、命令或流程需要它了解?当 时:
default_placement = "global"该技能是用于当前项目还是所有项目?
1. 仅当前项目 → .claude/skills/
2. 全局目录 → ~/.claude/skills/ [DEFAULT]
该技能的功能是什么?(一句话描述)
该技能何时触发?(哪些场景会触发它的使用?)
是否有特定的代码模式、命令或流程需要它了解?当上下文不明确(既不匹配也不匹配)时:
has_project_contextis_claude_config该技能是用于当前项目还是所有项目?
1. 仅当前项目 → .claude/skills/
2. 全局目录 → ~/.claude/skills/
该技能的功能是什么?(一句话描述)
该技能何时触发?(哪些场景会触发它的使用?)
是否有特定的代码模式、命令或流程需要它了解?用户可按Enter键接受默认选项,或选择编号选项。如果用户在命令中已提供足够上下文,可跳过明显的问题。
Step 1b — Select format type
步骤1b — 选择格式类型
Before generating the skeleton, determine the skill's format type. Apply inference heuristics first,
then always show the result to the user for confirmation.
Inference heuristics (apply in order; stop at first match):
- Skill name matches or
*-antipatterns→ infer*-anti-patternsanti-pattern - Skill name is a technology or library name (e.g., contains a known framework name, version suffix like ,
-19,-5, or a language name) → infer-4reference - Skill name starts with an action verb or matches SDD/meta-tool patterns (e.g., ,
sdd-*,project-*,memory-*,deploy-*) → inferrun-*procedural - No match → no inference; ask the user directly
Always present the format to the user before proceeding:
Format type for this skill:
Inferred: [procedural | reference | anti-pattern | none — please select]
Available formats (full contract: docs/format-types.md):
1. procedural — orchestrates a sequence of steps (SDD phases, meta-tools, workflows)
2. reference — provides patterns and examples for a technology or library
3. anti-pattern — catalogs things to avoid (use for anti-pattern-focused skills)
Confirm [1/2/3] or press Enter to accept inferred:If does not exist:
docs/format-types.md⚠️ WARNING: docs/format-types.md not found — skill-format-types change may not be applied.
Defaulting to procedural format.Continue with and do not block skill creation.
proceduralStore the confirmed format as for use in Step 3.
$SELECTED_FORMAT生成技能框架前,需确定技能的格式类型。先应用推理规则,然后始终将结果展示给用户确认。
推理规则(按顺序应用,匹配即停止):
- 技能名称匹配或
*-antipatterns→ 推断为*-anti-patterns类型anti-pattern - 技能名称为技术或库名称(例如包含已知框架名称、版本后缀如、
-19、-5,或语言名称)→ 推断为-4类型reference - 技能名称以动作动词开头,或匹配SDD/元工具模式(例如、
sdd-*、project-*、memory-*、deploy-*)→ 推断为run-*类型procedural - 无匹配项 → 不进行推断,直接询问用户
生成框架前必须向用户展示格式选项:
该技能的格式类型:
推断结果:[procedural | reference | anti-pattern | 无,请选择]
可用格式(完整规范:docs/format-types.md):
1. procedural — 编排一系列步骤(SDD阶段、元工具、工作流)
2. reference — 提供技术或库的模式与示例
3. anti-pattern — 记录需要避免的问题(用于聚焦反模式的技能)
请确认[1/2/3],或按Enter键接受推断结果:如果不存在:
docs/format-types.md⚠️ 警告:未找到docs/format-types.md — 技能格式类型的变更可能无法生效。
默认使用procedural格式。继续使用格式,不阻止技能创建。
procedural将确认后的格式存储为,供步骤3使用。
$SELECTED_FORMATStep 2 — If project skill: analyze the code
步骤2 — 如果是项目技能:分析代码
Read the existing project code to:
- Detect real patterns to document
- Find real examples to include in the skill
- Identify existing anti-patterns that must be avoided
读取现有项目代码以:
- 检测需记录的真实模式
- 查找可纳入技能的真实示例
- 识别必须避免的现有反模式
Step 3 — Generate the skill
步骤3 — 生成技能
Generate the skeleton based on from Step 1b. Each skeleton includes
in the YAML frontmatter and meets the section contract for that format.
Full contracts are defined in .
$SELECTED_FORMATformat: $SELECTED_FORMATdocs/format-types.mdIf is :
$SELECTED_FORMATproceduralmarkdown
---
name: [skill-name]
description: >
[one-line description]
format: procedural
---根据步骤1b中的生成技能框架。每个框架的YAML前置部分包含,并符合对应格式的章节规范。完整规范定义于。
$SELECTED_FORMATformat: $SELECTED_FORMATdocs/format-types.md当为时:
$SELECTED_FORMATproceduralmarkdown
---
name: [skill-name]
description: >
[一句话描述]
format: procedural
---[skill-name]
[skill-name]
[One-line description. What it does and what it is for.]
Triggers: [word1, word2, situation1, situation2]
[一句话描述:该技能的功能与用途。]
触发方式:[关键词1, 关键词2, 场景1, 场景2]
Process
流程
Step 1 — [step name]
步骤1 — [步骤名称]
[Explain what this step does.]
[说明该步骤的作用。]
Step 2 — [step name]
步骤2 — [步骤名称]
[Explain what this step does.]
[说明该步骤的作用。]
Rules
规则
- [constraint or invariant for this skill]
- [another constraint]
**If `$SELECTED_FORMAT` is `reference`:**
```markdown
---
name: [skill-name]
description: >
[technology] patterns for [use case].
format: reference
---- [该技能的约束或不变量]
- [另一项约束]
**当`$SELECTED_FORMAT`为`reference`时**:
```markdown
---
name: [skill-name]
description: >
[技术] 模式用于[使用场景]。
format: reference
---[skill-name]
[skill-name]
[technology] patterns for [use case].
Triggers: [technology name], [use-case keyword]
[技术] 模式用于[使用场景]。
触发方式:[技术名称], [场景关键词]
Patterns
模式
[Pattern 1]: [Descriptive name]
[模式1]:[描述性名称]
[Explanation of the pattern]
[real example code][模式说明]
[真实示例代码][Pattern 2]: [Descriptive name]
[模式2]:[描述性名称]
[Explanation]
[example code][说明]
[示例代码]Complete Examples
完整示例
[Scenario 1]
[场景1]
[Complete, executable code]
[完整可执行代码]
[Scenario 2]
[场景2]
[Complete, executable code]
[完整可执行代码]
Quick Reference
快速参考
| Task | Pattern / Command |
|---|---|
| [common task] | [solution] |
| 任务 | 模式 / 命令 |
|---|---|
| [常见任务] | [解决方案] |
Rules
规则
- [constraint or anti-pattern to avoid]
**If `$SELECTED_FORMAT` is `anti-pattern`:**
```markdown
---
name: [skill-name]
description: >
[technology] anti-patterns: [brief description].
format: anti-pattern
---- [需避免的约束或反模式]
**当`$SELECTED_FORMAT`为`anti-pattern`时**:
```markdown
---
name: [skill-name]
description: >
[技术] 反模式:[简要描述]。
format: anti-pattern
---[skill-name]
[skill-name]
[technology] anti-patterns: [brief description].
Triggers: [technology name] antipatterns, code review, refactoring
[技术] 反模式:[简要描述]。
触发方式:[技术名称] antipatterns, 代码审查, 重构
Anti-patterns
反模式
❌ [Anti-pattern 1]: [Descriptive name]
❌ [反模式1]:[描述性名称]
Why it is problematic: [explanation]
// ❌ Bad
[bad code]// ✅ Good
[corrected code]问题原因:[说明]
// ❌ 错误示例
[错误代码]// ✅ 正确示例
[修正后的代码]❌ [Anti-pattern 2]: [Descriptive name]
❌ [反模式2]:[描述性名称]
Why it is problematic: [explanation]
问题原因:[说明]
Rules
规则
- [scope or usage constraint for this skill]
undefined- [该技能的范围或使用约束]
undefinedStep 4 — Preview and confirm
步骤4 — 预览与确认
Show the content to be created and confirm with the user before writing.
展示即将创建的内容,在写入前获得用户确认。
Step 5 — Create and register
步骤5 — 创建与注册
- Create the file at the corresponding path
- If it is a project skill, suggest adding it to the project in the skills section
CLAUDE.md - If it is a generic skill, add it to the registry in
~/.claude/CLAUDE.md
- 在对应路径创建文件
- 如果是项目技能,建议将其添加到项目的技能章节中
CLAUDE.md - 如果是通用技能,将其添加到的注册表中
~/.claude/CLAUDE.md
Global Catalog Skills
全局目录技能
Current catalog available in :
~/.claude/skills/当前目录位于:
~/.claude/skills/SDD Phase Skills
SDD阶段技能
| Skill | Purpose |
|---|---|
| SDD exploration phase |
| SDD proposal phase |
| SDD specifications phase |
| SDD technical design phase |
| SDD task plan phase |
| SDD implementation phase |
| SDD verification phase |
| SDD archive phase |
| SDD initialization in a project |
| SDD active changes status |
| 技能 | 用途 |
|---|---|
| SDD探索阶段 |
| SDD提案阶段 |
| SDD规格说明阶段 |
| SDD技术设计阶段 |
| SDD任务计划阶段 |
| SDD实施阶段 |
| SDD验证阶段 |
| SDD归档阶段 |
| 在项目中初始化SDD |
| SDD变更状态查询 |
Infrastructure / Meta-tools
基础设施 / 元工具
| Skill | Purpose |
|---|---|
| Deploy SDD + memory structure in a new project |
| Configuration audit |
| Apply audit corrections |
| Diagnose and recommend onboarding sequence |
| Manage ai-context/ (init/update/maintain) |
| Analyze bounded contexts and write ai-context/features/ docs |
| Author and consume feature-level domain knowledge files |
| Export Claude config to Copilot, Gemini, Cursor formats |
| Skill creation |
| Conventional commit message generation |
| 技能 | 用途 |
|---|---|
| 在新项目中部署SDD + 内存结构 |
| 配置审计 |
| 应用审计修正 |
| 诊断并推荐入职流程 |
| 管理ai-context/(初始化/更新/维护) |
| 分析有界上下文并编写ai-context/features/文档 |
| 编写和使用特性级领域知识文件 |
| 将Claude配置导出为Copilot、Gemini、Cursor格式 |
| 技能创建 |
| 生成符合规范的提交信息 |
Workflow
工作流
| Skill | Purpose |
|---|---|
| PR creation workflow |
| GitHub issue creation workflow |
| GitHub Project board + Issues backlog management |
| Parallel adversarial review protocol |
| 技能 | 用途 |
|---|---|
| PR创建工作流 |
| GitHub Issue创建工作流 |
| GitHub项目看板 + Issue待办事项管理 |
| 并行对抗式评审协议 |
Technology
技术类
| Skill | Purpose |
|---|---|
| Go testing patterns including Bubbletea TUI testing |
| Next.js 15 App Router, Server Actions, data fetching |
| React 19 with React Compiler, Server Components, use() hook |
| React Native with Expo, navigation, NativeWind |
| Language-agnostic SOLID principles and DDD tactical patterns |
| Tailwind CSS 4, cn() utility, dynamic styles |
| TypeScript strict mode, utility types, advanced patterns |
| State management with Zustand 5, slices, persistence |
| 技能 | 用途 |
|---|---|
| Go测试模式,包括Bubbletea TUI测试 |
| Next.js 15 App Router、Server Actions、数据获取 |
| React 19(含React Compiler、Server Components、use()钩子) |
| React Native(含Expo、导航、NativeWind) |
| 语言无关的SOLID原则与DDD战术模式 |
| Tailwind CSS 4、cn()工具、动态样式 |
| TypeScript严格模式、工具类型、高级模式 |
| 使用Zustand 5进行状态管理、切片、持久化 |
Rules
规则
- Always use real project code as examples when it is a project skill
- Never invent patterns — extract them from existing code
- Minimum 3 code examples per skill (reference and anti-pattern formats)
- Preview and confirm before writing
- Register the new skill in the corresponding CLAUDE.md
- The format-selection step (Step 1b) MUST always run before skeleton generation — a skeleton is never written without a confirmed format type
- The field MUST be present in the YAML frontmatter of every SKILL.md generated by this skill
format: - If does not exist, default all new skills to
docs/format-types.mdand emit WARNING: "docs/format-types.md not found — skill-format-types change may not be applied"procedural - Inference is a convenience — the user MUST always confirm or override the inferred type before the skeleton is written
- 当创建项目技能时,始终使用真实项目代码作为示例
- 绝不凭空发明模式 — 从现有代码中提取
- 每个技能至少包含3个代码示例(reference和anti-pattern格式)
- 写入前必须预览并获得确认
- 在对应的CLAUDE.md中注册新技能
- 格式选择步骤(步骤1b)必须在生成框架前执行 — 未确认格式类型则不得生成框架
- 每个由该工具生成的SKILL.md的YAML前置部分必须包含字段
format: - 如果不存在,所有新技能默认使用
docs/format-types.md格式,并发出警告:"docs/format-types.md not found — skill-format-types change may not be applied"procedural - 推理仅为便利功能 — 用户必须在生成框架前确认或覆盖推断的类型