{"meta":{"title":"IDE で Copilot cloud agent 用のカスタム エージェントを作成する","intro":"特定の開発タスクに合わせて調整された専門知識を持つ特殊なエージェントを作成できます。","product":"GitHub Copilot","breadcrumbs":[{"href":"/ja/copilot","title":"GitHub Copilot"},{"href":"/ja/copilot/how-tos","title":"方法"},{"href":"/ja/copilot/how-tos/use-copilot-agents","title":"Copilot エージェントを使用する"},{"href":"/ja/copilot/how-tos/use-copilot-agents/cloud-agent","title":"Cloud agent"},{"href":"/ja/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents-in-your-ide","title":"IDE でカスタム エージェントを作成する"}],"documentType":"article"},"body":"# IDE で Copilot cloud agent 用のカスタム エージェントを作成する\n\n特定の開発タスクに合わせて調整された専門知識を持つ特殊なエージェントを作成できます。\n\nCustom agents を使用すると、特定のタスクに合わせて Copilotの専門知識を調整できます。\ncustom agentsの概念の概要については、「[AUTOTITLE」](/ja/copilot/concepts/agents/cloud-agent/about-custom-agents)を参照してください。\n\n> \\[!NOTE]\n> Custom agents は、JetBrains IDE、Eclipse、Xcode 用 パブリック プレビュー にあり、変更される可能性があります。\n\n<div class=\"ghd-tool vscode\">\n\n## custom agent プロファイルの作成\n\n1. GitHub Copilot ChatでVisual Studio Codeを開きます。\n2. チャット ビューの下部にある \\[エージェント] ドロップダウンで、\\[**カスタム エージェントの構成...**] をクリックし、\\[**新しい<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-plus\" aria-label=\"Plus button\" role=\"img\"><path d=\"M7.75 2a.75.75 0 0 1 .75.75V7h4.25a.75.75 0 0 1 0 1.5H8.5v4.25a.75.75 0 0 1-1.5 0V8.5H2.75a.75.75 0 0 1 0-1.5H7V2.75A.75.75 0 0 1 7.75 2Z\"></path></svg>custom agent作成**] をクリックします。\n3. agent profileを作成する場所を選択します。\n   * **ワークスペース**: ワークスペースのcustom agent フォルダーに`.github/agents` プロファイルを作成し、そのワークスペース内でのみ使用します。\n   * **ユーザー プロファイル**: 現在のユーザー プロファイル フォルダーに custom agent プロファイルを作成して、すべてのワークスペースで使用します。\n4. custom agentのファイル名を入力します。 これは、エージェントのドロップダウンに表示される既定の名前です。\n5. 新しく作成したagent profile ファイルの`.agent.md` (説明、ツール、プロンプトなど) を構成します。\n   agent profileに含めることができる内容の詳細については、「[agent profileの構成」を](#configuring-an-agent-profile)参照してください。\n   * エディター内の **\\[ツールの構成]...** ボタンを使用すると、\\[ツールの構成] ダイアログを開き、MCP サーバーの組み込みツールやツールなど、使用可能なツールを表示および選択できます。 \\[ **OK] を** クリックして、選択したツールを agent profileに追加します。\n   * エージェントが使用する AI モデルを設定するには、 `model:` プロパティを追加し、オートコンプリート ドロップダウンから任意のモデルを選択します。\n\nagent profileを更新するには、\\[エージェント] ドロップダウンから \\[**カスタム エージェントの構成**] を選択し、一覧からエージェントをクリックして変更します。\ncustom agentsのVS Codeの詳細については、Custom agents[のVS Codeを](https://code.visualstudio.com/docs/copilot/customization/custom-agents)参照してください。\n\n</div>\n\n<!-- --------------------- -->\n\n<!-- JetBrains -->\n\n<!-- --------------------- -->\n\n<div class=\"ghd-tool jetbrains\">\n\n## custom agent プロファイルの作成\n\n1. JetBrains IDE で GitHub Copilot Chat ウィンドウを開きます。\n2. チャット ビューの下部にある \\[エージェント] ドロップダウンから\\[エージェントの **構成...**] をクリックし、設定ウィンドウの \\[チャット エージェント] で \\[ **ワークスペース**] をクリックします。\n3. custom agentのファイル名を入力します。 これは、エージェントのドロップダウンに表示される既定の名前です。\n4. 新しく作成したagent profileファイル内の`.agent.md`ディレクトリで`.github/agents`を構成し、説明、ツール、プロンプトを含めます。\n   agent profileに含めることができる内容の詳細については、「[agent profileの構成」を](#configuring-an-agent-profile)参照してください。\n   * エディター内の **\\[ツールの構成]...** ボタンを使用してツール ダイアログを開き、MCP サーバーの組み込みツールやツールなど、使用可能なツールを表示および選択できます。 \\[ **適用** ] をクリックして、選択したツールを agent profileに追加します。\n   * エージェントが使用する AI モデルを設定するには、 `model:` プロパティを追加し、オートコンプリート ドロップダウンから任意のモデルを選択します。\n\nagent profileを更新するには、\\[エージェント] ドロップダウンから \\[**カスタム エージェントの構成**] を選択し、変更するエージェントの横にある \\[<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-pencil\" aria-label=\"The pencil icon\" role=\"img\"><path d=\"M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z\"></path></svg>] をクリックします。\n\n</div>\n\n<!-- --------------------- -->\n\n<!-- Eclipse -->\n\n<!-- --------------------- -->\n\n<div class=\"ghd-tool eclipse\">\n\n## custom agent プロファイルの作成\n\n1. Eclipse で GitHub Copilot Chat ウィンドウを開きます。\n2. チャット ビューの下部にある \\[エージェント] ドロップダウンで、\\[エージェントの **構成]、\\[** 追加]、\\[ **...**] の順にクリックします。\n3. custom agentのファイル名を入力します。 これは、エージェントのドロップダウンに表示される既定の名前です。\n4. 新しく作成したagent profileファイル内の`.agent.md`ディレクトリで`.github/agents`を構成し、説明、ツール、プロンプトを含めます。\n   agent profileに含めることができる内容の詳細については、「[agent profileの構成」を](#configuring-an-agent-profile)参照してください。\n   * エディター内の **\\[ツールの構成]...** ボタンを使用すると、\\[ツールの構成] ダイアログを開き、MCP サーバーの組み込みツールやツールなど、使用可能なツールを表示および選択できます。 \\[ **適用** ] をクリックして、選択したツールを agent profileに追加します。\n   * エージェントが使用する AI モデルを設定するには、 `model:` プロパティを追加し、オートコンプリート ドロップダウンから任意のモデルを選択します。\n\nagent profileを更新するには、エージェントのドロップダウンから \\[**エージェントの構成...**] を選択し、変更するエージェントを選択して \\[**編集**] をクリックします。\n\n</div>\n\n<!-- --------------------- -->\n\n<!-- XCode -->\n\n<!-- --------------------- -->\n\n<div class=\"ghd-tool xcode\">\n\n## custom agent プロファイルの作成\n\n1. Xcode で GitHub Copilot Chat ウィンドウを開きます。\n2. チャット ビューの下部にある \\[エージェント] ドロップダウンから、\\[エージェントの**作成] <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-plus\" aria-label=\"Plus button\" role=\"img\"><path d=\"M7.75 2a.75.75 0 0 1 .75.75V7h4.25a.75.75 0 0 1 0 1.5H8.5v4.25a.75.75 0 0 1-1.5 0V8.5H2.75a.75.75 0 0 1 0-1.5H7V2.75A.75.75 0 0 1 7.75 2Z\"></path></svg>** クリックします。\n3. custom agentのファイル名を入力します。 これは、エージェントのドロップダウンに表示される既定の名前です。\n4. 新しく作成したagent profileファイル内の`.agent.md`ディレクトリで`.github/agents`を構成し、説明、ツール、プロンプトを含めます。\n   agent profileに含めることができる内容の詳細については、「[agent profileの構成」を](#configuring-an-agent-profile)参照してください。\n   * ファイル エディター内の \\[**エージェントのカスタマイズ**] ボタンを使用してダイアログを開き、エージェントで使用する AI モデルを選択したり、使用可能なツール (組み込みツールや MCP サーバー ツールを含む) を選択したり、`handoffs`間を切り替えるために custom agents プロパティを構成したりできます。 選択したオプションを\\*\\*\\*\\* に追加するには、\\[agent profile] をクリックします。\n\nagent profileを更新するには、エージェントのドロップダウンから、変更するエージェントの横にある鉛筆アイコンをクリックします。\n\n</div>\n\n## agent profile の設定を行う\n\nagent profileは、custom agentの名前、説明、使用可能なツール、MCP サーバー構成を指定する YAML frontmatter を含む Markdown ファイルです。\nagent profileの構成には、エージェントの ID、機能、ツール アクセス、および動作命令を定義する必要があります。\n\nYAML プロパティ、ツール、MCP サーバーのセットアップ、ツールエイリアス、および custom agents の処理方法の詳細については、 [カスタム エージェントの構成](/ja/copilot/reference/custom-agents-configuration) を参照してください。\n\nagent profileを構成するには:\n\n1. オプションで、`name`用のcustom agentを記述します。 設定を解除すると、名前は既定でファイル名に設定されます ( `.md` または `.agent.md` サフィックスは付けなくなります)。\n2. エージェントの機能と、その特定の機能またはドメインの専門知識を説明する簡単な `description` (必須) を記述します。\n3. `tools` プロパティで、エージェントで使用できるツールを定義します。 これは、リポジトリ設定または agent profile ( `tools: [\"read\", \"edit\", \"search\", \"some-mcp-server/tool-1\"]` など) で構成された MCP サーバーのツールを含む、ツール名またはエイリアスの一覧です。 このプロパティを省略すると、エージェントは使用可能なすべてのツールにアクセスできます。\n   [カスタム エージェントの構成](/ja/copilot/reference/custom-agents-configuration#tools) の「ツール」を参照してください。\n4. 必要に応じて、 `mcp-servers` プロパティで、このエージェントのみが使用できる MCP サーバーを構成して、その機能を拡張できます。\n   [カスタム エージェントの構成](/ja/copilot/reference/custom-agents-configuration#mcp-server-configuration-details) の「MCP サーバー構成の詳細」を参照してください。\n5. agent profile、JetBrains IDE、Eclipse、または Xcode でVS Codeを作成して使用する場合は、`model` プロパティを使用して、エージェントが使用する AI モデルを制御することもできます。\n6. 必要に応じて、特定の環境でのみエージェントを使用する場合は、 `target` プロパティを `vscode` または `github-copilot` に設定します。 このプロパティを省略すると、エージェントは両方の環境で使用できます。\n7. エージェントのプロンプトを書いてください。 YAML frontmatter の下にある Markdown コンテンツで、エージェントの動作、専門知識、および手順を定義します。 プロンプトの最大文字数は 30,000 文字です。\n\n## agent profiles の例\n\n次の例は、agent profile が、テストの記述やプロジェクトの計画に関連する一般的なタスクにおいてどのように見えるかを示しています。 その他のヒントについては、カスタマイズ ライブラリの [Custom agents](/ja/copilot/tutorials/customization-library/custom-agents) の例を参照してください。 さらに具体的な例については、 [awesome-copilot](https://github.com/github/awesome-copilot/tree/main/agents) コミュニティ コレクションを参照してください。\n\n### テストスペシャリスト\n\nこの例では、 `tools` プロパティを省略して、すべてのツールを有効にします。\n\n```text copy\n---\nname: test-specialist\ndescription: Focuses on test coverage, quality, and testing best practices without modifying production code\n---\n\nYou are a testing specialist focused on improving code quality through comprehensive testing. Your responsibilities:\n\n- Analyze existing tests and identify coverage gaps\n- Write unit tests, integration tests, and end-to-end tests following best practices\n- Review test quality and suggest improvements for maintainability\n- Ensure tests are isolated, deterministic, and well-documented\n- Focus only on test files and avoid modifying production code unless specifically requested\n\nAlways include clear test descriptions and use appropriate testing patterns for the language and framework.\n```\n\n### 実装プランナー\n\nこの例では、ツールのサブセットのみを有効にします。\n\n```text copy\n---\nname: implementation-planner\ndescription: Creates detailed implementation plans and technical specifications in markdown format\ntools: [\"read\", \"search\", \"edit\"]\n---\n\nYou are a technical planning specialist focused on creating comprehensive implementation plans. Your responsibilities:\n\n- Analyze requirements and break them down into actionable tasks\n- Create detailed technical specifications and architecture documentation\n- Generate implementation plans with clear steps, dependencies, and timelines\n- Document API designs, data models, and system interactions\n- Create markdown files with structured plans that development teams can follow\n\nAlways structure your plans with clear headings, task breakdowns, and acceptance criteria. Include considerations for testing, deployment, and potential risks. Focus on creating thorough documentation rather than implementing code.\n```\n\n## custom agents の使用\n\ncustom agentを作成したら、Copilot cloud agentが使用可能な場所であればどこでも使用できます。\n\n* Copilot cloud agentのタスクでGitHub.comを求めるメッセージが表示されたら、\\[エージェント] パネルまたは \\[エージェント] タブのドロップダウン メニューを使用して、既定のcustom agentではなくcloud agentを選択します。\n* 問題に Copilot cloud agent を割り当てるときは、ドロップダウン メニューから custom agent を選択して、特殊な構成に関する問題を処理できます。\n* GitHub Copilot CLIを使用する場合は、custom agentスラッシュ コマンドを使用するか、プロンプトでエージェントを参照するか、コマンド ライン引数を使用して、特定の`/agent`を使用するかを選択できます。 詳細については、「[GitHub Copilot CLI の使用](/ja/copilot/how-tos/copilot-cli/use-copilot-cli/overview#use-custom-agents)」を参照してください。\n\nCopilotがプル要求を開くと、pull request の説明で作業を完了するために使用されたcustom agentが表示されます。\n\nCopilot cloud agent の使用について詳しくは、「[GitHub Copilot セッションの開始](/ja/copilot/how-tos/use-copilot-agents/cloud-agent/start-copilot-sessions)」をご覧ください。\n\n### IDE での custom agents の使用\n\nサポートされている IDE でカスタム agent profiles を直接使用することもできます。 チャット ウィンドウのエージェント ドロップダウンを使用して custom agents を切り替えることができます。これにより、計画、コード編集、調査などのさまざまなタスクの特殊な構成にアクセスできます。\n\n一部のプロパティは、 GitHub.com 環境と IDE 環境で機能が異なる場合があります。 サポートされるプロパティの詳細については、 [AUTOTITLE を](/ja/copilot/reference/custom-agents-configuration#yaml-frontmatter-properties)参照してください。\n\ncustom agentsおよびVS Codeに関する詳細については、Custom agentsドキュメント内のVS Codeにある[](https://code.visualstudio.com/docs/copilot/customization/custom-agents)を参照してください。\n\n## 次のステップ\n\n* 最初の custom agentを作成するための実践的なチュートリアルについては、 [最初のカスタム エージェント](/ja/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent) を参照してください。\n* 詳細な構成情報については、 [AUTOTITLE を](/ja/copilot/reference/custom-agents-configuration)参照してください。\n* custom agentsを含むクラウド エージェントを使用してCopilotセッションを開始する方法については、[GitHub Copilot セッションの開始](/ja/copilot/how-tos/use-copilot-agents/cloud-agent/start-copilot-sessions) を参照してください。"}