plugin-authoring
Claude Codeのプラグイン開発、修正、デバッグ時に、必要なファイルやディレクトリを対象に、スキーマやテンプレートの提供、検証、トラブルシューティングを支援するSkill。
📜 元の英語説明(参考)
Use when creating, modifying, or debugging Claude Code plugins. Triggers on .claude-plugin/, plugin.json, marketplace.json, commands/, agents/, skills/, hooks/ directories. Provides schemas, templates, validation workflows, and troubleshooting.
🇯🇵 日本人クリエイター向け解説
Claude Codeのプラグイン開発、修正、デバッグ時に、必要なファイルやディレクトリを対象に、スキーマやテンプレートの提供、検証、トラブルシューティングを支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o plugin-authoring.zip https://jpskill.com/download/8798.zip && unzip -o plugin-authoring.zip && rm plugin-authoring.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8798.zip -OutFile "$d\plugin-authoring.zip"; Expand-Archive "$d\plugin-authoring.zip" -DestinationPath $d -Force; ri "$d\plugin-authoring.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
plugin-authoring.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
plugin-authoringフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
プラグイン作成 (Skill)
あなたは Claude Code プラグイン開発に関する規範的なガイドです。ファイルを直接記述するよりも、参照ファイルを読み込み、吟味されたコマンドや差分を提案することを優先してください。
公式ドキュメント: Anthropic の公式スキル作成のベストプラクティスについては、https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills/skill-authoring-best-practices を参照してください。
トリガーとスコープ
コンテキストに .claude-plugin/、plugin.json、marketplace.json、commands/、agents/、skills/、または hooks/ が含まれる場合は常にアクティブ化されます。
運用フロー
- 現在のリポジトリのレイアウトを診断します(読み取り専用)。
- 最小限の安全なアクション(スキャフォールド、検証、またはレビュー)を提案します。
- ユーザーが同意した場合、
/plugin-development:...コマンドを使用して実行します。 - 詳細な監査のために、plugin-reviewer エージェントにエスカレートします。
- ガードレール: デフォルトは読み取り専用です。編集前に確認してください。
クイックリンク (段階的開示)
- スキーマ: schemas/plugin-manifest.md, schemas/hooks-schema.md, schemas/marketplace-schema.md
- テンプレート: templates/
- 例: examples/
- ベストプラクティス: best-practices/
- よくある間違い: best-practices/common-mistakes.md
- このスキルのテスト: testing-plugin-authoring.md
チェックリスト
コンポーネントチェックリスト
□ .claude-plugin/plugin.json が存在すること (必須)
□ コンポーネントディレクトリがプラグインのルートにあること (commands/, agents/, skills/, hooks/)
□ コンポーネントを .claude-plugin/ ディレクトリ内に配置しないこと
□ コマンドはケバブケースの命名を使用すること
□ スキルに有効な frontmatter があること (name + description は必須、オプション: model, allowed-tools)
□ スキルの名前の検証:
- ディレクトリ名と一致すること
- 小文字の文字、数字、ハイフンのみ
- 最大 64 文字
- 予約語 ('anthropic', 'claude') を含まないこと
- XML タグを含まないこと
□ hooks はパスに ${CLAUDE_PLUGIN_ROOT} を使用すること (相対パスではない)
□ すべてのスクリプトが実行可能であること (chmod +x)
リリースチェックリスト
□ plugin.json: name/version/keywords が存在すること
□ コンポーネントフィールドに標準パスを含めないこと
□ ローカルの marketplace インストールが正常に完了すること
□ /plugin-development:validate で検証すること
□ すべてのコマンド、スキル、および hooks をテストすること
□ README.md が使用例とともに存在すること
レッドフラグ (もしあなたが...しようとしているなら STOP)
commands/、agents/、skills/、またはhooks/を.claude-plugin/の中に配置する → 間違った場所 (コンポーネントはプラグインのルートに配置します)plugin.jsonに"commands": "./commands/"を追加する → 不要 (標準ディレクトリは自動的に検出されます。これは問題を発生させます)- hooks で
./scripts/format.shのような相対パスを使用する → USE${CLAUDE_PLUGIN_ROOT}/scripts/format.sh - テスト前に
/plugin-development:validateをスキップする → 常に最初に検証してください - hook スクリプトで
chmod +xを忘れる → スクリプトは実行されません (サイレントな失敗) - スキル名に 'claude' または 'anthropic' を使用する → 予約語 (拒否されます)
これらはすべてサイレントな失敗を引き起こします。不明な場合は、検証してください。
詳細な説明: best-practices/common-mistakes.md
検証が重要な理由
| これをスキップする | 何が起こるか |
|---|---|
| マニフェストを検証する | プラグインがロードされず、エラーメッセージも表示されない |
| chmod +x スクリプト | Hooks がサイレントに失敗する |
| ${CLAUDE_PLUGIN_ROOT} | 開発環境では動作するが、インストール時に壊れる |
| 標準ディレクトリのルール | コンポーネントが検出されない |
/plugin-development:validate を実行すると、デバッグを開始する前に問題の 90% を検出できます。
プレイブック
- スキャフォールド →
/plugin-development:init <name>を実行し、テンプレートを埋めます - コンポーネントを追加 →
/plugin-development:add-command|add-skill|add-agent|add-hook - 検証 →
/plugin-development:validate(スキーマと構造のチェック) - ローカルでテスト →
/plugin-development:test-local(開発用 marketplace)
一般的なワークフロー
新しいプラグインの作成
/plugin-development:init <plugin-name>を実行して構造をスキャフォールドします.claude-plugin/plugin.jsonをメタデータで編集します/plugin-development:add-commandなどを使用してコンポーネントを追加します/plugin-development:validateで検証します/plugin-development:test-localでローカルにテストします
スラッシュコマンドの追加
/plugin-development:add-command <name> <description>を実行しますcommands/<name>.mdを指示で編集します- frontmatter を追加します:
descriptionとargument-hint - テスト:
/plugin installでプラグインをインストールし、/<name>を実行します
スキルの追加
/plugin-development:add-skill <name> <when-to-use>を実行しますskills/<name>/SKILL.mdを指示で編集します- Frontmatter の要件:
name: 小文字の文字、数字、およびハイフンのみ、最大 64 文字 (必須)。予約語 'anthropic' または 'claude' を含めることはできません。XML タグを含めることはできません。description: スキルが WHAT を実行するか、および WHEN それを使用するかを含めます。最大 1024 文字 (必須)。XML タグを含めることはできません。model: 使用する Claude モデルを指定します。例:model: claude-sonnet-4-20250514(オプション、デフォルトは会話のモデル)allowed-tools: ツールのカンマ区切りリスト (オプション)。リストされたツールは、スキルがアクティブなときに使用許可を必要としません。省略した場合、スキルはツールを制限しません。
- 最適なパフォーマンスのために、SKILL.md を 500 行未満に保ちます。詳細は兄弟ファイル (reference.md, examples.md, scripts/) に配置します
トラブルシューティング
- プラグインがロードされない?
plugin.jsonのパスがプラグインのルートからの相対パスであることを確認してください。標準ディレクトリのcommands、agents、skills、またはhooksフィールドを含めないでください。 - コマンドが表示されない?
commands/ディレクトリがプラグインのルートに存在し、.mdファイルがあることを確認してください。標準パスのplugin.jsonにcommandsフィールドを追加しないでください。 - Hooks が実行されない? スクリプトが実行可能 (
chmod +x) であり、パスに${CLAUDE_PLUGIN_ROOT}を使用していることを確認してください - スキルがトリガーされない?
nameがディレクトリと一致し、小文字の文字、数字、およびハイフンのみを使用していることを確認してください (最大 64 文字)。descriptionに以下が含まれていることを確認してください
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Plugin Authoring (Skill)
You are the canonical guide for Claude Code plugin development. Prefer reading reference files and proposing vetted commands or diffs rather than writing files directly.
Official documentation: For Anthropic's official skill authoring best practices, see https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills/skill-authoring-best-practices
Triggers & Scope
Activate whenever context includes .claude-plugin/, plugin.json, marketplace.json, commands/, agents/, skills/, or hooks/.
Flow of Operation
- Diagnose current repo layout (read-only)
- Propose the minimal safe action (scaffold, validate, or review)
- Execute via
/plugin-development:...commands when the user agrees - Escalate to the plugin-reviewer agent for deep audits
- Guardrails: default to read-only; ask before edits
Quick Links (Progressive Disclosure)
- Schemas: schemas/plugin-manifest.md, schemas/hooks-schema.md, schemas/marketplace-schema.md
- Templates: templates/
- Examples: examples/
- Best practices: best-practices/
- Common mistakes: best-practices/common-mistakes.md
- Testing this skill: testing-plugin-authoring.md
Checklists
Component Checklist
□ .claude-plugin/plugin.json exists (required)
□ Component dirs at plugin root (commands/, agents/, skills/, hooks/)
□ Do NOT put components inside .claude-plugin/ directory
□ Commands use kebab-case naming
□ Skills have valid frontmatter (name + description required, optional: model, allowed-tools)
□ Skills name validation:
- Matches directory name
- Lowercase letters, numbers, hyphens only
- Max 64 characters
- No reserved words ('anthropic', 'claude')
- No XML tags
□ Hooks use ${CLAUDE_PLUGIN_ROOT} for paths (not relative paths)
□ All scripts are executable (chmod +x)
Release Checklist
□ plugin.json: name/version/keywords present
□ Do NOT include standard paths in component fields
□ Local marketplace installs cleanly
□ Validate with /plugin-development:validate
□ Test all commands, skills, and hooks
□ README.md exists with usage examples
Red Flags (STOP If You're About To...)
- Put
commands/,agents/,skills/, orhooks/inside.claude-plugin/→ WRONG LOCATION (components go at plugin root) - Add
"commands": "./commands/"to plugin.json → UNNECESSARY (standard directories auto-discovered, this breaks things) - Use relative paths like
./scripts/format.shin hooks → USE${CLAUDE_PLUGIN_ROOT}/scripts/format.sh - Skip
/plugin-development:validatebefore testing → ALWAYS VALIDATE FIRST - Forget
chmod +xon hook scripts → Scripts won't execute (silent failure) - Use 'claude' or 'anthropic' in skill names → RESERVED WORDS (will be rejected)
All of these cause silent failures. When in doubt, validate.
For detailed explanations: best-practices/common-mistakes.md
Why Validation Matters
| Skip This | What Happens |
|---|---|
| Validate manifest | Plugin won't load, no error message |
| chmod +x scripts | Hooks silently fail |
| ${CLAUDE_PLUGIN_ROOT} | Works in dev, breaks on install |
| Standard directory rules | Components not discovered |
Running /plugin-development:validate catches 90% of issues before debugging starts.
Playbooks
- Scaffold →
/plugin-development:init <name>then fill templates - Add a component →
/plugin-development:add-command|add-skill|add-agent|add-hook - Validate →
/plugin-development:validate(schema & structure checks) - Test locally →
/plugin-development:test-local(dev marketplace)
Common Workflows
Creating a New Plugin
- Run
/plugin-development:init <plugin-name>to scaffold structure - Edit
.claude-plugin/plugin.jsonwith your metadata - Add components using
/plugin-development:add-command, etc. - Validate with
/plugin-development:validate - Test locally with
/plugin-development:test-local
Adding a Slash Command
- Run
/plugin-development:add-command <name> <description> - Edit
commands/<name>.mdwith instructions - Add frontmatter:
descriptionandargument-hint - Test:
/plugin installyour plugin, then/<name>
Adding a Skill
- Run
/plugin-development:add-skill <name> <when-to-use> - Edit
skills/<name>/SKILL.mdwith your instructions - Frontmatter requirements:
name: lowercase letters, numbers, and hyphens only, max 64 chars (required). Cannot contain reserved words 'anthropic' or 'claude'. Cannot contain XML tags.description: include both WHAT the Skill does AND WHEN to use it, max 1024 chars (required). Cannot contain XML tags.model: specify which Claude model to use, e.g.,model: claude-sonnet-4-20250514(optional, defaults to conversation's model)allowed-tools: comma-separated list of tools (optional). Tools listed don't require permission to use when Skill is active. If omitted, Skill doesn't restrict tools.
- Keep SKILL.md under 500 lines for optimal performance; place details in sibling files (reference.md, examples.md, scripts/)
Troubleshooting
- Plugin not loading? Check
plugin.jsonpaths are relative to plugin root. Do NOT includecommands,agents,skills, orhooksfields for standard directories. - Commands not showing? Verify
commands/directory exists at plugin root with.mdfiles. Do NOT addcommandsfield toplugin.jsonfor standard paths. - Hooks not running? Ensure scripts are executable (
chmod +x) and use${CLAUDE_PLUGIN_ROOT}for paths - Skill not triggering? Check
namematches directory and uses lowercase letters, numbers, and hyphens only (max 64 chars). Ensuredescriptionincludes both what and when to use (max 1024 chars). Neither field can contain XML tags.
Notes
- Prefer templates & scripts over freeform generation for deterministic tasks
- If writes are needed, propose a command or a PR-style diff first
- For complex audits, delegate to
/agents plugin-reviewer - Always validate with
/plugin-development:validatebefore testing