Scaffold a new skill as skills/<name>/SKILL.md , and automate up to symlink and quality checks.
Usage
/create-skill summarize-pr # スキルを新規作成
/create-skill # 引数省略時はスキル名をインタラクティブに確認
| Argument | Required | Description |
|---|---|---|
skill-name |
Optional | Name of the skill to create (kebab-case). If omitted, confirm interactively before Step 1 |
main (this skill itself) focuses on planning, delegation, integration, and reporting, and delegates the writing and review of SKILL.md to specialized Agents (.claude/rules/delegation.md compliant).
For the skill template, refer to sample/SKILL.sample.md bundled with this skill.
subagent fallback (for skills add installation destinations)
The subagents delegated by this skill (skill-explorer・skill-author・skill-reviewer・frontmatter-linter) is from the Fandhe-AI/agent-cli-skills repository .claude/agents/ Assumes the definition.If the corresponding subagent does not exist in the installation destination repository, do not delegate, and main directly executes the confirmation viewpoints, inputs, and required items described in each Step's delegation prompt。frontmatter-linter As an alternative to , manual confirmation of the verification viewpoints in Step 4 is sufficient. At the installation destination, the skill entity is placed in .agents/skills/ , so read the search target and output destination paths as the installation destination's placement.
flow
Step 1: Check for duplicates among existing skills (delegate to skill-explorer)
Delegate to **skill-explorer (subagent_type: skill-explorer)** to check the following (if it does not exist, follow the "subagent fallback" and main checks directly. The same applies to subsequent Steps).
subagent_type: skill-explorer
prompt: |
目的: 指定された名前のスキルが既に存在しないか確認する
入力:
- 作成予定のスキル名: <skill-name>
- 検索対象: skills/ 配下の全ディレクトリ、.claude/skills/ 配下の symlink
確認観点:
1. skills/<skill-name>/ が既に存在するか
2. 類似名(例: kebab-case 変形や別表記)のスキルが存在するか
3. 既存スキルで同等の機能が提供されていないか
適用ルール: .claude/rules/delegation.md
出力: 重複なし / 重複あり(ファイルパスと既存スキルの概要)
If a duplicate is found, notify the user, confirm whether to create a new one or update the existing skill, and then continue.
Step 2: Design frontmatter and body, and create SKILL.md (delegate to skill-author)
Delegate to **skill-author (subagent_type: skill-author)** to create SKILL.md .
Include the following in the delegation prompt:
subagent_type: skill-author
prompt: |
目的: <skill-name> の SKILL.md を新規作成する
入力:
- スキル名: <skill-name>
- ユーザーから受け取った役割説明・要件(あれば)
- 雛形: 本スキル同梱の sample/SKILL.sample.md
- 既存スキルの参考例: skills/contribute-skill/SKILL.md, skills/update-docs/SKILL.md
出力先: skills/<skill-name>/SKILL.md
適用ルール:
- .claude/rules/skill-authoring.md(frontmatter・本文構成・model 選定・セキュリティ self-check)
- .claude/rules/description-style.md(description の発火トリガー語・YAML 落とし穴)
- .claude/rules/delegation-impl.md(委譲設計が必要な場合)
必須項目:
- frontmatter: name(ディレクトリ名と一致), description(発火トリガー語を含む), model, user-invocable
- 本文: ## 使い方 → ## フロー(Step N)→ ## 検証 → ## 注意事項
- description に # を含む場合はクォートで囲む
- 作業を委譲する設計の場合は subagent_type を明記する
- 同梱スクリプトを配置する場合はディレクトリ名を scripts/(複数形)とする
Step 3: Create a symlink
skill-author After completing , create a symbolic link.
ln -s ../../skills/<skill-name> .claude/skills/<skill-name>
After creating the symlink, check with the following.
ls -la .claude/skills/<skill-name>
Step 4: Quality check (delegate to skill-reviewer and frontmatter-linter)
Delegate in parallel to **skill-reviewer (subagent_type: skill-reviewer)** and **frontmatter-linter (subagent_type: frontmatter-linter)** for verification.
subagent_type: skill-reviewer
prompt: |
目的: 新規作成した SKILL.md の品質をレビューする
入力:
- 対象ファイル: skills/<skill-name>/SKILL.md
観点:
- `skill-authoring.md` 規約への準拠(frontmatter 項目、本文構成)
- セキュリティ self-check(APIキーのハードコード、フック回避コマンドの不在)
- トリガー語・引数ヒントの適切さ
- 同梱スクリプトのディレクトリ名が `scripts/`(複数形)になっているか
適用ルール: .claude/rules/skill-authoring.md, .claude/rules/security.md
subagent_type: frontmatter-linter
prompt: |
目的: 新規作成した SKILL.md の frontmatter・symlink を機械検証する
入力:
- 対象ファイル: skills/<skill-name>/SKILL.md
- symlink: .claude/skills/<skill-name>
観点:
- `name` がディレクトリ名と一致しているか
- `model` が規定値(haiku/sonnet/opus)のいずれかか
- `user-invocable` の有無と symlink の整合性
- `description` 内の `#` がクォートで囲まれているか
適用ルール: .claude/rules/skill-authoring.md
If there are problems in the review results, send back to skill-author for correction.
Step 5: Guide updating CLAUDE.md with update-docs
Once skill addition is complete, guide the following (if the user instructs, you may call the update-docs skill as is).
✅ skills/<skill-name>/SKILL.md を作成しました。
✅ .claude/skills/<skill-name> → ../../skills/<skill-name> の symlink を作成しました。
CLAUDE.md のスキル一覧・構造ツリーを更新するには:
/update-docs
を実行してください。
Step 6: Commit (optional)
If the user instructs to commit, create-commit Create a commit using the skill. If there are no instructions, only report while leaving the changes staged.
Verification
-
ls skills/<skill-name>/SKILL.mdVerify that the file exists with -
ls -la .claude/skills/<skill-name>Verify that the symlink points to the correct link target with -
head -10 skills/<skill-name>/SKILL.mdVerify that the frontmatter is written correctly with - Verify that the validation by skill-reviewer and frontmatter-linter is PASS
- If there are bundled scripts,
scripts/Verify that they are placed in the (plural) directory
Notes
- Relative path of the symlink:
.claude/skills/<name>The relative path from../../skills/<name>shall be (absolute paths not allowed) - Match between the directory name and name: frontmatter の
name:Must exactly match the directory name #description containing: Enclose in quotes to prevent it from being treated as a YAML comment (see convention e83e1bb)- Naming when bundling scripts: When bundling scripts with a skill, unify the directory name to
scripts/(plural) (do not usescript/) - Running update-docs: After adding a skill, always bring
/update-docsでCLAUDE.mdup to date - Chain of delegation:
skill-authormay further delegate to another Agent. For skills that require an approval flow, confirm the requirements in advance
Related
Agents: skill-explorer, skill-author, skill-reviewer, frontmatter-linter
Rules: delegation, skill-authoring, description-style
Skills: create-agent, update-docs, create-commit