jpskill.com
🛠️ 開発・MCP コミュニティ

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本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
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
🪟 Windows (PowerShell)
$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. 1. 下の青いボタンを押して plugin-authoring.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → plugin-authoring フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

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.jsonmarketplace.jsoncommands/agents/skills/、または hooks/ が含まれる場合は常にアクティブ化されます。

運用フロー

  1. 現在のリポジトリのレイアウトを診断します(読み取り専用)。
  2. 最小限の安全なアクション(スキャフォールド、検証、またはレビュー)を提案します。
  3. ユーザーが同意した場合、/plugin-development:... コマンドを使用して実行します。
  4. 詳細な監査のために、plugin-reviewer エージェントにエスカレートします。
  5. ガードレール: デフォルトは読み取り専用です。編集前に確認してください。

クイックリンク (段階的開示)

チェックリスト

コンポーネントチェックリスト

□ .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)

一般的なワークフロー

新しいプラグインの作成

  1. /plugin-development:init <plugin-name> を実行して構造をスキャフォールドします
  2. .claude-plugin/plugin.json をメタデータで編集します
  3. /plugin-development:add-command などを使用してコンポーネントを追加します
  4. /plugin-development:validate で検証します
  5. /plugin-development:test-local でローカルにテストします

スラッシュコマンドの追加

  1. /plugin-development:add-command <name> <description> を実行します
  2. commands/<name>.md を指示で編集します
  3. frontmatter を追加します: descriptionargument-hint
  4. テスト: /plugin install でプラグインをインストールし、/<name> を実行します

スキルの追加

  1. /plugin-development:add-skill <name> <when-to-use> を実行します
  2. skills/<name>/SKILL.md を指示で編集します
  3. Frontmatter の要件:
    • name: 小文字の文字、数字、およびハイフンのみ、最大 64 文字 (必須)。予約語 'anthropic' または 'claude' を含めることはできません。XML タグを含めることはできません。
    • description: スキルが WHAT を実行するか、および WHEN それを使用するかを含めます。最大 1024 文字 (必須)。XML タグを含めることはできません。
    • model: 使用する Claude モデルを指定します。例: model: claude-sonnet-4-20250514 (オプション、デフォルトは会話のモデル)
    • allowed-tools: ツールのカンマ区切りリスト (オプション)。リストされたツールは、スキルがアクティブなときに使用許可を必要としません。省略した場合、スキルはツールを制限しません。
  4. 最適なパフォーマンスのために、SKILL.md を 500 行未満に保ちます。詳細は兄弟ファイル (reference.md, examples.md, scripts/) に配置します

トラブルシューティング

  • プラグインがロードされない? plugin.json のパスがプラグインのルートからの相対パスであることを確認してください。標準ディレクトリの commandsagentsskills、または hooks フィールドを含めないでください。
  • コマンドが表示されない? commands/ ディレクトリがプラグインのルートに存在し、.md ファイルがあることを確認してください。標準パスの plugin.jsoncommands フィールドを追加しないでください。
  • 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

  1. Diagnose current repo layout (read-only)
  2. Propose the minimal safe action (scaffold, validate, or review)
  3. Execute via /plugin-development:... commands when the user agrees
  4. Escalate to the plugin-reviewer agent for deep audits
  5. Guardrails: default to read-only; ask before edits

Quick Links (Progressive Disclosure)

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/, or hooks/ 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.sh in hooks → USE ${CLAUDE_PLUGIN_ROOT}/scripts/format.sh
  • Skip /plugin-development:validate before testing → ALWAYS VALIDATE FIRST
  • Forget chmod +x on 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

  1. Run /plugin-development:init <plugin-name> to scaffold structure
  2. Edit .claude-plugin/plugin.json with your metadata
  3. Add components using /plugin-development:add-command, etc.
  4. Validate with /plugin-development:validate
  5. Test locally with /plugin-development:test-local

Adding a Slash Command

  1. Run /plugin-development:add-command <name> <description>
  2. Edit commands/<name>.md with instructions
  3. Add frontmatter: description and argument-hint
  4. Test: /plugin install your plugin, then /<name>

Adding a Skill

  1. Run /plugin-development:add-skill <name> <when-to-use>
  2. Edit skills/<name>/SKILL.md with your instructions
  3. 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.
  4. 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.json paths are relative to plugin root. Do NOT include commands, agents, skills, or hooks fields for standard directories.
  • Commands not showing? Verify commands/ directory exists at plugin root with .md files. Do NOT add commands field to plugin.json for standard paths.
  • Hooks not running? Ensure scripts are executable (chmod +x) and use ${CLAUDE_PLUGIN_ROOT} for paths
  • Skill not triggering? Check name matches directory and uses lowercase letters, numbers, and hyphens only (max 64 chars). Ensure description includes 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:validate before testing