Alternative Architecture DOJO

オルターブースのクラウドネイティブ特化型ブログです。

Copilotのプロンプト作りをプロンプト集から!GitHub公式awesome-copilotを紹介

こんにちは!オルターブースの木村龍太郎です!

この記事はオルターブース2025年のアドベントカレンダーの14日目の記事です🎄

adventar.org

GitHub Copilot を使い始めたあと、次に壁になりやすいのが、対象ドメイン・言語・フレームワークに合わせた instructions(指示)や prompt(プロンプト)をどう整えるかです。

正攻法でゼロから作ることもできますが、別の進め方として “プロンプトのカタログから入る” という選択肢もあります。 そこで試していただきたいのが GitHub 公式の github/awesome-copilot です。

github.com

github/awesome-copilot はコミュニティが作成したカスタムエージェント、プロンプト、指示のカタログ(コレクション)を提供しており、これらを活用することで、Copilot の出力を迅速に改善できます。

本記事では、GitHub 公式の github/awesome-copilot を起点に、簡単に説明と、導入までを紹介します。

awesome-copilot の構成

awesome-copilot のリポジトリを開くと、以下の3つのフォルダ(カテゴリ)が見つかります。

1. agents(エージェント)

様々な MCP サーバーと連携したり、ツール(Git 操作や Docker コマンド等)を駆使して動くよう指示された専門的な GitHub Copilot エージェントが含まれています。
例えば、

/agents/java-mcp-expert.agent.md:公式 Java SDK を使用して MCP サーバーを構築するのに特化したエージェント
/agents/expert-dotnet-software-engineer.agent.md:.NETソフトウェアエンジニア向けの専門的なエージェント.

といったものがあります。 試しに/agents/expert-dotnet-software-engineer.agent.mdの中身を見ると以下のように概要や使用ツールが定義されています。

---
description: "Provide expert .NET software engineering guidance using modern software design patterns."
name: "Expert .NET software engineer mode instructions"
tools: ["changes", "codebase", "edit/editFiles", "extensions", "fetch", "findTestFiles", "githubRepo", "new", "openSimpleBrowser", "problems", "runCommands", "runNotebooks", "runTasks", "runTests", "search", "searchResults", "terminalLastCommand", "terminalSelection", "testFailure", "usages", "vscodeAPI", "microsoft.docs.mcp"]
---

# Expert .NET software engineer mode instructions

You are in expert software engineer mode. Your task is to provide expert software engineering guidance using modern software design patterns as if you were a leader in the field.

You will provide:

- insights, best practices and recommendations for .NET software engineering as if you were Anders Hejlsberg, the original architect of C# and a key figure in the development of .NET as well as Mads Torgersen, the lead designer of C#.
- general software engineering guidance and best-practices, clean code and modern software design, as if you were Robert C. Martin (Uncle Bob), a renowned software engineer and author of "Clean Code" and "The Clean Coder".
- DevOps and CI/CD best practices, as if you were Jez Humble, co-author of "Continuous Delivery" and "The DevOps Handbook".
- Testing and test automation best practices, as if you were Kent Beck, the creator of Extreme Programming (XP) and a pioneer in Test-Driven Development (TDD).

For .NET-specific guidance, focus on the following areas:

- **Design Patterns**: Use and explain modern design patterns such as Async/Await, Dependency Injection, Repository Pattern, Unit of Work, CQRS, Event Sourcing and of course the Gang of Four patterns.
- **SOLID Principles**: Emphasize the importance of SOLID principles in software design, ensuring that code is maintainable, scalable, and testable.
- **Testing**: Advocate for Test-Driven Development (TDD) and Behavior-Driven Development (BDD) practices, using frameworks like xUnit, NUnit, or MSTest.
- **Performance**: Provide insights on performance optimization techniques, including memory management, asynchronous programming, and efficient data access patterns.
- **Security**: Highlight best practices for securing .NET applications, including authentication, authorization, and data protection.

2. prompts(プロンプト)

コード、ドキュメント作成、特定の問題解決のためのプロンプトがあります。

リンク:https://github.com/github/awesome-copilot/tree/main/prompts

3. instructions(指示)

特定のファイルパターンやプロジェクト全体に適用される包括的なコーディング標準とベストプラクティスがあります。

リンク:https://github.com/github/awesome-copilot/tree/main/instructions

2025 年 12 月時点(筆者調べ)で数えてみたところ、以下のようになりました。 agents フォルダー: 125 個 instructions フォルダー: 147 個 prompts フォルダー: 126 個

導入手順

MCP サーバーや VS Code の MCP 機能を使わず、ファイルとして取り込む方法があります。

MCP サーバーでのセットアップ

  1. https://github.com/github/awesome-copilot/tree/main?tab=readme-ov-file#mcp-server の VS Code Install バッジから MCP サーバーをインストール。
  2. Docker をバックグラウンドで起動
  3. VS Code の Copilot Chat の画面で MCP プロンプトを呼び出します。
    • 例:/mcp.awesome-copilot.get_search_prompt
  4. 導入したいプロンプトを検索
  5. 以下の様なプロンプトがチャットに貼り付けられました。

VS Code でのセットアップ

  1. github/awesome-copilot を開き、探したいカテゴリ(instructions / prompts / agents)を決めます。
  2. 目的に近いファイルを1つ選び、内容を読みます。
  3. ワークスペースに保存先を作ります(例:.github/ 配下など、チームで管理しやすい場所)。
  4. ファイルを保存します。
    • プロンプトを定型化したい場合:*.prompt.md
    • 役割ごとに依頼をまとめたい場合:*.agent.md
    • リポジトリ全体の前提を置きたい場合:copilot-instructions.md(運用に合わせて配置)
  5. GitHub Copilot がそのファイルを元に動く。

これで以下の様に構成されます。

.github
├─instructions
│      dotnet.instructions.md
└─prompts
       expert-dotnet-software-engineer.prompt.md

まとめ

Copilot の instructions / prompts をゼロから整えるのが大変なら、まずは github/awesome-copilot のカタログから近いものを選んで取り込むのが近道です。 MCP サーバーを使えば検索〜貼り付けが速いので、導入の入口として特におすすめです。 また、手順にある様に、テキストをそのままコピペするようなことをしているため
Answer in Japanese といった一文を入れてカスタマイズもできます。 まずは 1 ファイルから始めて、文章を足しながら育てていきましょう!


サービス一覧 www.alterbooth.com www.alterbooth.com www.alterbooth.com