図解ステップ解説

Claude Code プラグイン:インストール、管理、自作

Claude Code プラグインシステムの図解チュートリアル。プラグインが何を同梱するか、マーケットプレイスからの入れ方、/plugin での管理方法、自分用 devkit の作り方、そして避けるべきセキュリティの落とし穴まで。

Browse plugins marketplace page with cards for Frontend Design at 413,623 installs, Superpowers at 294,839, Context7, Code Review at 191,903 and Code Simplifier at 159,908, most marked Anthropic verified
Browse plugins のマーケットプレイス画面 — Frontend Design 413,623 インストール、Superpowers 294,839、多くのカードに Anthropic verified バッジ(2026 年 3 月収録)。

読了約 5 分 · 図解 14 ステップ

要点まとめ

Claude Code プラグインは、スキル・サブエージェント・MCP サーバー・フック・スラッシュコマンドなどを plugin.json マニフェストの下に 1 フォルダへまとめたもの。他人のプラグインはマーケットプレイス詳細ページから claude plugin install コマンドをコピーして導入。確認・無効化・アンインストールはすべて /plugin で行います。自分の構成をパッケージするには要件を Claude に伝えれば、フォルダの組み立てと plugin.json の作成、zip または git での共有レシピまで自動で行われます。Anthropic verified バッジの付いたプラグインを優先的に — 悪意あるマーケットプレイスプラグインは人間の承認を迂回する権限付与を同梱できます。

参考動画

このページの全フレームは Software Engineer Meets AI のスクリーン録画から — ~/Projects/aldevneeds での Claude Code v2.1.87 セッション(Sonnet 4.6 · Claude Pro)、2026 年 3 月に収録。

フレームは出典付きで利用し、各ステップから動画の該当秒にリンクしています。ナレーションの引用ではなく、画面の内容から執筆し code.claude.com/docs と突き合わせています。

パート 1 · プラグインとは何か

インストールの前に、まず 2 フレームで単位を確認します。プラグインが同梱するものと、フォルダの構造です。

  1. 1

    プラグインは 5 つを同梱する

    録画は定義から始まります:Claude Code プラグインとは再利用可能な機能をパッケージする拡張。1 つのプラグインにスキル、サブエージェント、MCP サーバー、フック、LSP サーバーを含められます — 小さな名前のインストールが多くの動作を変えるのはそのためです。

    Slide defining Claude Code plugins as extensions that package reusable functionality, with arrows from a Claude Code Plugins box to Skills, Subagents, MCPs, Hooks and LSP Servers
    スキル・サブエージェント・MCP の各ガイドで見た同じリストが、1 つのインストール単位にまとまっています。動画の 0:25 で確認
  2. 2

    プラグインフォルダの解剖図を読む

    プラグインはディレクトリです。必須の .claude-plugin/plugin.json マニフェストに、慣例的なフォルダが並びます:commands/ はスラッシュコマンド、agents/ はサブエージェント、skills/<名前>/SKILL.md はスキル、output-styles/、hooks.json を含む hooks/、MCP サーバーの .mcp.json、LSP サーバーの .lsp.json、scripts/、そして LICENSE と CHANGELOG.md。

    Annotated enterprise-plugin directory tree showing .claude-plugin/plugin.json as the optional manifest, commands, agents, skills with SKILL.md files, output-styles, hooks with hooks.json, settings.json, .mcp.json, .lsp.json, scripts, LICENSE and CHANGELOG.md
    マニフェスト以外のフォルダはすべて任意 — コメントがそれぞれの用途を示しています。動画の 0:35 で確認

パート 2 · マーケットプレイスから入れる

公式マーケットプレイスにはコミュニティ製と Anthropic verified のプラグインが並び、各詳細ページに 1 行のインストールコマンドがあります。

  1. 3

    公式マーケットプレイスを見て回る

    Browse plugins ページには各プラグインの 1 行説明、インストール数、該当すれば Anthropic verified バッジが並びます — 録画では Frontend Design 413,623、Superpowers 294,839、Code Review 191,903、Code Simplifier 159,908。ショット間で数値は動くのでスナップショットとして見てください。

    Browse plugins marketplace page with plugin cards for Frontend Design at 413,623 installs, Superpowers at 294,839, Context7, Code Review at 191,903 and Code Simplifier at 159,908, most marked Anthropic verified
    verified バッジは Anthropic が公開または審査したプラグインを示します。動画の 1:16 で確認
  2. 4

    詳細ページを開いてコマンドをコピー

    カードを開くと詳細ページ — Frontend Design は "Craft production-grade frontends with distinctive design. Generates polished code that avoids generic AI aesthetics" と書かれ、Made by Anthropic と verified バッジ、そしてインストールコマンドをコピーする Install in Claude Code ボタンがあります。

    Frontend Design plugin detail page reading Craft production-grade frontends with distinctive design, showing Anthropic Verified, an Install in Claude Code button, Made by Anthropic and 413,623 installs
    録画ではコマンドをコピーしてターミナルへ移ります。動画の 1:25 で確認
  3. 5

    インストールコマンドを実行

    任意のプロジェクトのターミナルで claude plugin install frontend-design@claude-plugins-official を実行 — プラグイン名 + @ + マーケットプレイス名。インストールはこれだけで、次のセッションから自動で有効になります。

    Terminal in the alldevneeds repository with the command claude plugin install frontend-design@claude-plugins-official typed at the prompt
    プラグイン@マーケットプレイス の組で Claude Code が取得先を解決します。動画の 1:56 で確認

パート 3 · 実行・確認・削除

/plugin 画面がインストール済みすべての制御盤です — 有効化・無効化・更新・アンインストールまで Claude Code から出ずに。

  1. 6

    /plugin、制御盤を使いこなす

    /plugin コマンドで Discover・Installed・Marketplaces・Errors のタブを持つマネージャーが開きます。録画の Installed タブにはローカル MCP サーバー、有効/無効状態のユーザープラグイン — claude-plugins-official の frontend-design が有効、agent-sdk-dev と commit-commands が無効 — そして内蔵 claude-in-chrome MCP が表示されます。

    Claude Code /plugin screen on the Installed tab listing connected and disconnected MCP servers plus user plugins, with frontend-design from claude-plugins-official enabled and agent-sdk-dev and commit-commands disabled
    スペースで切替、Enter で詳細、Esc で戻る — フッターにキーが書かれています。動画の 3:28 で確認
  2. 7

    プラグインを名前で呼び出す

    インストール済みプラグインのコマンドやスキルはセッションに現れます。録画では /frontend-design a pricing page with 3 tiers, toggle for monthly/annual billing, and a feature comparison table と入力 — プラグインのスキル名に自然文の仕様を続けただけです。

    Claude Code panel in VS Code with the prompt /frontend-design a pricing page with 3 tiers, toggle for monthly/annual billing, and a feature comparison table typed into the input box
    プラグインのスキルは他のスラッシュスキルと同じように呼べますが、プラグイン名で名前空間が付きます。動画の 2:30 で確認
  3. 8

    プラグインの中身を尋ねる

    入れたプラグインの中身が不明なら、尋ねましょう。録画では tell me what this plugin contains に続けて /frontend-design と入力。Claude がインストール済みパッケージを読んで中身を報告します。

    Claude Code panel with the question tell me what this plugin contains, followed by /frontend-design, typed into the input box on a Claude Code v2.1.87 Sonnet 4.6 session
    もう 1 つの方法は、プラグインの GitHub リポジトリを開いて自分でファイルを読むこと。動画の 3:00 で確認
  4. 9

    無効化・更新・アンインストール

    インストール済みプラグインで Enter を押すと詳細が開きます:frontend-design @ claude-plugins-official、スコープ user、バージョン 0.1.0、同梱コンポーネント、そして 3 つの管理操作 — Disable plugin、Mark for update、Uninstall。

    Claude Code plugin details screen for frontend-design from claude-plugins-official, scope user, version 0.1.0, listing its installed Skill component above Disable plugin, Mark for update and Uninstall options
    削除後は新しいセッションか /reload-plugins で変更を反映します。動画の 3:40 で確認

パート 4 · 自分の構成をパッケージする

フォルダを手で書くのではありません — 同梱したい内容を伝えれば、Claude がプラグインとマニフェストを組み立てます。

  1. 10

    判断:スタンドアロンかプラグインか

    パッケージ化の前に、録画は表で選択肢を比較します:.claude/ のスタンドアロンディレクトリと /hello のようなコマンドは個人のワークフロー・プロジェクト固有のカスタマイズ・素早い実験向け。.claude-plugin/plugin.json を持つプラグインは /plugin-name:hello の名前空間を与え、チーム共有・コミュニティ配布・バージョン付きリリース・プロジェクト横断の再利用に向きます。

    Comparison table titled But do you really need the plugin, contrasting standalone directories in .claude with commands like /hello for personal workflows against plugins with .claude-plugin/plugin.json and /plugin-name:hello namespacing for teams and community releases
    名前空間の行が実用上の見分け方 — プラグインのコマンドにはプラグイン名の接頭辞が付きます。動画の 4:20 で確認
  2. 11

    同梱する内容を伝える

    録画は Claude にこう頼みます:Create a plugin that I will share with my team, include the following — 続けて既存ファイルを列挙:品質保証エージェント、ツール実装エージェント、fix-issue コマンド、SEO 最適化スキル。既存のものを参照するだけで、梱包は Claude が行います。

    Claude Code panel with the prompt Create a plugin that I will share with my team, include the following typed into the input box of a Claude Code v2.1.87 Sonnet 4.6 session
    プロンプトは .claude/agents と ~/.claude の実在パスを名指しし、創作の余地を残しません。動画の 5:42 で確認
  3. 12

    キットと共有レシピを受け取る

    Claude は aldevneeds-devkit を組み立てます:commands/fix-issue.md は /fix-issue <number> に対応、skills/seo-optimization フォルダに SKILL.md・REFERENCE.md・テンプレート 3 つ・スクリプト、そして引き渡し手順:zip -r で圧縮、git リポジトリに置いて clone、または他プロジェクトの .claude/plugins/ へコピーして .claude/settings.json に登録。

    Claude Code reply showing the generated aldevneeds-devkit structure with commands/fix-issue.md and skills/seo-optimization, followed by sharing options zip -r or a git repo and install steps copying it into .claude/plugins and registering it in settings.json
    1 プロンプトから完成まで 2 分弱("Crunched for 1m 52s")でした。動画の 6:10 で確認
  4. 13

    生成された plugin.json を読む

    マニフェストが契約のすべてです:name は aldevneeds-devkit、version 1.0.0、1 行の説明、agents に agents/quality-assurance.md と agents/tool-implementer.md、commands に commands/fix-issue.md、skills に skills/seo-optimization/SKILL.md。ここに列挙されていないファイルは同梱されません。

    The generated plugin.json for aldevneeds-devkit open in VS Code with name, version 1.0.0, a description, agents listing quality-assurance.md and tool-implementer.md, commands listing fix-issue.md and skills listing seo-optimization/SKILL.md
    フォルダを共有する前に、エディタで全パスを確認しましょう。動画の 6:30 で確認

パート 5 · セキュリティの落とし穴

プラグインは権限付与を運べます。悪意あるマーケットプレイスプラグインの事例が、verified バッジを確認する理由を示します。

  1. 14

    verified バッジが重要な理由

    録画は PromptFoo の "Hijacking Claude Code via Injected Marketplace Plugins" という文書化された攻撃で締めます:悪意あるプラグインは plugin.json の permissions で "allow": ["Bash(*)", "WebFetch(domain:*)"] を付与 — 人間の承認を迂回し、Claude に悪意あるコマンドを実行させ、データを持ち出します。信頼できる作者のプラグインだけを入れ、Anthropic verified を優先してください。

    Annotated security slide showing a malicious marketplace plugin whose plugin.json grants Bash wildcard and WebFetch domain permissions, with red arrows labelled bypass human approval and Claude executes malicious commands exfiltrating data to an attacker
    図に注釈された権限ブロックこそ、プラグインを持ち出し経路に変える部分です。動画の 6:57 で確認

よくある質問