skill-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

skill-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>

Creates a new skill that does not exist anywhere. Asks whether it is:
  • Generic → goes to
    ~/.claude/skills/<name>/SKILL.md
    (available in all projects)
  • Project-specific → goes to
    .claude/skills/<name>/SKILL.md
    (only in this project)
创建一个全新的、不存在的技能。会询问用户该技能属于:
  • 通用型 → 保存至
    ~/.claude/skills/<name>/SKILL.md
    (所有项目均可使用)
  • 项目专属型 → 保存至
    .claude/skills/<name>/SKILL.md
    (仅当前项目可用)

Mode
/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 2
Ask the necessary questions to create a useful skill. The placement prompt MUST reflect the detected default using the
[DEFAULT]
marker:
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
has_project_context
nor
is_claude_config
matches):
Is 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_context
也不匹配
is_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):
  1. Skill name matches
    *-antipatterns
    or
    *-anti-patterns
    → infer
    anti-pattern
  2. Skill name is a technology or library name (e.g., contains a known framework name, version suffix like
    -19
    ,
    -5
    ,
    -4
    , or a language name) → infer
    reference
  3. Skill name starts with an action verb or matches SDD/meta-tool patterns (e.g.,
    sdd-*
    ,
    project-*
    ,
    memory-*
    ,
    deploy-*
    ,
    run-*
    ) → infer
    procedural
  4. 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
docs/format-types.md
does not exist:
⚠️ WARNING: docs/format-types.md not found — skill-format-types change may not be applied.
Defaulting to procedural format.
Continue with
procedural
and do not block skill creation.
Store the confirmed format as
$SELECTED_FORMAT
for use in Step 3.
生成技能框架前,需确定技能的格式类型。先应用推理规则,然后始终将结果展示给用户确认。
推理规则(按顺序应用,匹配即停止)
  1. 技能名称匹配
    *-antipatterns
    *-anti-patterns
    → 推断为
    anti-pattern
    类型
  2. 技能名称为技术或库名称(例如包含已知框架名称、版本后缀如
    -19
    -5
    -4
    ,或语言名称)→ 推断为
    reference
    类型
  3. 技能名称以动作动词开头,或匹配SDD/元工具模式(例如
    sdd-*
    project-*
    memory-*
    deploy-*
    run-*
    )→ 推断为
    procedural
    类型
  4. 无匹配项 → 不进行推断,直接询问用户
生成框架前必须向用户展示格式选项
该技能的格式类型:
  推断结果:[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
格式,不阻止技能创建。
将确认后的格式存储为
$SELECTED_FORMAT
,供步骤3使用。

Step 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
$SELECTED_FORMAT
from Step 1b. Each skeleton includes
format: $SELECTED_FORMAT
in the YAML frontmatter and meets the section contract for that format. Full contracts are defined in
docs/format-types.md
.
If
$SELECTED_FORMAT
is
procedural
:
markdown
---
name: [skill-name]
description: >
  [one-line description]
format: procedural
---
根据步骤1b中的
$SELECTED_FORMAT
生成技能框架。每个框架的YAML前置部分包含
format: $SELECTED_FORMAT
,并符合对应格式的章节规范。完整规范定义于
docs/format-types.md
$SELECTED_FORMAT
procedural
markdown
---
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

快速参考

TaskPattern / 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
  • [该技能的范围或使用约束]
undefined

Step 4 — Preview and confirm

步骤4 — 预览与确认

Show the content to be created and confirm with the user before writing.
展示即将创建的内容,在写入前获得用户确认。

Step 5 — Create and register

步骤5 — 创建与注册

  1. Create the file at the corresponding path
  2. If it is a project skill, suggest adding it to the project
    CLAUDE.md
    in the skills section
  3. If it is a generic skill, add it to the registry in
    ~/.claude/CLAUDE.md

  1. 在对应路径创建文件
  2. 如果是项目技能,建议将其添加到项目
    CLAUDE.md
    的技能章节中
  3. 如果是通用技能,将其添加到
    ~/.claude/CLAUDE.md
    的注册表中

Global Catalog Skills

全局目录技能

Current catalog available in
~/.claude/skills/
:
当前目录位于
~/.claude/skills/

SDD Phase Skills

SDD阶段技能

SkillPurpose
sdd-explore
SDD exploration phase
sdd-propose
SDD proposal phase
sdd-spec
SDD specifications phase
sdd-design
SDD technical design phase
sdd-tasks
SDD task plan phase
sdd-apply
SDD implementation phase
sdd-verify
SDD verification phase
sdd-archive
SDD archive phase
sdd-init
SDD initialization in a project
sdd-status
SDD active changes status
技能用途
sdd-explore
SDD探索阶段
sdd-propose
SDD提案阶段
sdd-spec
SDD规格说明阶段
sdd-design
SDD技术设计阶段
sdd-tasks
SDD任务计划阶段
sdd-apply
SDD实施阶段
sdd-verify
SDD验证阶段
sdd-archive
SDD归档阶段
sdd-init
在项目中初始化SDD
sdd-status
SDD变更状态查询

Infrastructure / Meta-tools

基础设施 / 元工具

SkillPurpose
project-setup
Deploy SDD + memory structure in a new project
project-audit
Configuration audit
project-fix
Apply audit corrections
project-onboard
Diagnose and recommend onboarding sequence
memory-manage
Manage ai-context/ (init/update/maintain)
codebase-teach
Analyze bounded contexts and write ai-context/features/ docs
feature-domain-expert
Author and consume feature-level domain knowledge files
config-export
Export Claude config to Copilot, Gemini, Cursor formats
skill-creator
Skill creation
smart-commit
Conventional commit message generation
技能用途
project-setup
在新项目中部署SDD + 内存结构
project-audit
配置审计
project-fix
应用审计修正
project-onboard
诊断并推荐入职流程
memory-manage
管理ai-context/(初始化/更新/维护)
codebase-teach
分析有界上下文并编写ai-context/features/文档
feature-domain-expert
编写和使用特性级领域知识文件
config-export
将Claude配置导出为Copilot、Gemini、Cursor格式
skill-creator
技能创建
smart-commit
生成符合规范的提交信息

Workflow

工作流

SkillPurpose
branch-pr
PR creation workflow
issue-creation
GitHub issue creation workflow
project-tracking
GitHub Project board + Issues backlog management
judgment-day
Parallel adversarial review protocol
技能用途
branch-pr
PR创建工作流
issue-creation
GitHub Issue创建工作流
project-tracking
GitHub项目看板 + Issue待办事项管理
judgment-day
并行对抗式评审协议

Technology

技术类

SkillPurpose
go-testing
Go testing patterns including Bubbletea TUI testing
nextjs-15
Next.js 15 App Router, Server Actions, data fetching
react-19
React 19 with React Compiler, Server Components, use() hook
react-native
React Native with Expo, navigation, NativeWind
solid-ddd
Language-agnostic SOLID principles and DDD tactical patterns
tailwind-4
Tailwind CSS 4, cn() utility, dynamic styles
typescript
TypeScript strict mode, utility types, advanced patterns
zustand-5
State management with Zustand 5, slices, persistence

技能用途
go-testing
Go测试模式,包括Bubbletea TUI测试
nextjs-15
Next.js 15 App Router、Server Actions、数据获取
react-19
React 19(含React Compiler、Server Components、use()钩子)
react-native
React Native(含Expo、导航、NativeWind)
solid-ddd
语言无关的SOLID原则与DDD战术模式
tailwind-4
Tailwind CSS 4、cn()工具、动态样式
typescript
TypeScript严格模式、工具类型、高级模式
zustand-5
使用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
    format:
    field MUST be present in the YAML frontmatter of every SKILL.md generated by this skill
  • If
    docs/format-types.md
    does not exist, default all new skills to
    procedural
    and emit WARNING: "docs/format-types.md not found — skill-format-types change may not be applied"
  • 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
    不存在,所有新技能默认使用
    procedural
    格式,并发出警告:"docs/format-types.md not found — skill-format-types change may not be applied"
  • 推理仅为便利功能 — 用户必须在生成框架前确认或覆盖推断的类型