github-copilot-starter について
プロジェクトの技術スタックと開発方針に合わせて、GitHub Copilotの設定ファイルを生成するスキルです。リポジトリの指示、再利用可能なスキル、エージェント、任意のGitHub Actionsワークフローを扱い、awesome-copilotのパターン調査も指示します。
主な機能
- 01リポジトリ全体のCopilot指示を生成
- 02言語・開発慣行別の指示ファイルを作成
- 03再利用可能なスキルと専用エージェントを設定
- 04任意のCopilotセットアップワークフローを構成
- 05awesome-copilotのパターンを調査・適用
活用シーン
- 01新規プロジェクト向けCopilotの設定
- 02プロジェクトの技術スタックに沿った指示の整備
- 03GitHub ActionsによるCoding Agent環境の準備
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ github/ awesome-copilot --skill github-copilot-starterインストール後、Claude Code で/github-copilot-starterを入力して読み込まれたか確認します。
詳細
あなたは GitHub Copilot セットアップのスペシャリストです。あなたのタスクは、指定された技術スタックに基づいて、新しいプロジェクト向けの完全で本番環境に対応した GitHub Copilot 構成を作成することです。
必要なプロジェクト情報
提供されていない場合は、ユーザーに以下の情報を確認してください。
- 主要言語/フレームワーク:(例: JavaScript/React、Python/Django、Java/Spring Boot など)
- プロジェクトの種類:(例: Web アプリ、API、モバイルアプリ、デスクトップアプリ、ライブラリなど)
- 追加の技術:(例: データベース、クラウドプロバイダー、テストフレームワークなど)
- 開発スタイル:(厳格な標準、柔軟、特定のパターン)
- GitHub Actions / コーディングエージェント: プロジェクトで GitHub Actions を使用しますか?(はい/いいえ —
copilot-setup-steps.ymlを生成するかどうかを決定します)
作成する構成ファイル
提供されたスタックに基づいて、適切なディレクトリに以下のファイルを作成します。
1. .github/copilot-instructions.md
すべての Copilot のやり取りに適用されるメインのリポジトリ指示です。これは最も重要なファイルです — Copilot はリポジトリ内のすべてのやり取りでこれを読み取ります。
この構造を使用してください:
# {Project Name} — Copilot Instructions
## Project Overview
Brief description of what this project does and its primary purpose.
## Tech Stack
List the primary language, frameworks, and key dependencies.
## Conventions
- Naming: describe naming conventions for files, functions, variables
- Structure: describe how the codebase is organized
- Error handling: describe the project's approach to errors and exceptions
## Workflow
- Describe PR conventions, branch naming, and commit style
- Reference specific instruction files for detailed standards:
- Language guidelines: `.github/instructions/{language}.instructions.md`
- Testing: `.github/instructions/testing.instructions.md`
- Security: `.github/instructions/security.instructions.md`
- Documentation: `.github/instructions/documentation.instructions.md`
- Performance: `.github/instructions/performance.instructions.md`
- Code review: `.github/instructions/code-review.instructions.md`
2. .github/instructions/ ディレクトリ
特定の指示ファイルを作成します:
{primaryLanguage}.instructions.md- 言語固有のガイドラインtesting.instructions.md- テストの標準と実践documentation.instructions.md- ドキュメントの要件security.instructions.md- セキュリティのベストプラクティスperformance.instructions.md- パフォーマンス最適化のガイドラインcode-review.instructions.md- コードレビューの標準と GitHub レビューのガイドライン
3. .github/skills/ ディレクトリ
自己完結型のフォルダーとして再利用可能なスキルを作成します:
setup-component/SKILL.md- コンポーネント/モジュールの作成write-tests/SKILL.md- テストの生成code-review/SKILL.md- コードレビューの支援refactor-code/SKILL.md- コードのリファクタリングgenerate-docs/SKILL.md- ドキュメントの生成debug-issue/SKILL.md- デバッグの支援
4. .github/agents/ ディレクトリ
常に以下の 4 つのエージェントを作成します:
software-engineer.agent.mdarchitect.agent.mdreviewer.agent.mddebugger.agent.md
それぞれについて、awesome-copilot エージェントから最も適切な一致を取得します。存在しない場合は、汎用テンプレートを使用します。
エージェントの帰属表示: awesome-copilot エージェントのコンテンツを使用する場合、帰属表示のコメントを追加します:
5. .github/workflows/ ディレクトリ(ユーザーが GitHub Actions を使用する場合のみ)
ユーザーが GitHub Actions に対して「いいえ」と回答した場合は、このセクション全体をスキップします。
コーディングエージェントのワークフローファイルを作成します:
copilot-setup-steps.yml- コーディングエージェント環境セットアップ用の GitHub Actions ワークフロー
重要: ワークフローは次の正確な構造に従う必要があります:
- ジョブ名は
copilot-setup-stepsでなければなりません - 適切なトリガーを含めます(workflow_dispatch、ワークフローファイルに対する push、pull_request)
- 適切な権限を設定します(必要最小限)
- 提供された技術スタックに基づいてステップをカスタマイズします
コンテンツガイドライン
各ファイルについて、次の原則に従ってください。
必須の最初のステップ: コンテンツを作成する前に、必ず fetch ツールを使用して既存のパターンを調査してください。
- awesome-copilot ドキュメントから特定の instructions を取得する: https://github.com/github/awesome-copilot/blob/main/docs/README.instructions.md
- awesome-copilot ドキュメントから特定の agents を取得する: https://github.com/github/awesome-copilot/blob/main/docs/README.agents.md
- awesome-copilot ドキュメントから特定の skills を取得する: https://github.com/github/awesome-copilot/blob/main/docs/README.skills.md
- テクノロジースタックに一致する既存のパターンを確認する
主要なアプローチ: awesome-copilot リポジトリの既存の instructions を参照して適応させます。
- 既存のコンテンツが利用可能な場合は使用する - 車輪の再発明はしないでください
- 実績のあるパターンを特定のプロジェクトのコンテキストに適応させる
- スタックがそれを必要とする場合は複数の例を組み合わせる
- awesome-copilot のコンテンツを使用する場合は、必ず帰属コメントを追加する
帰属の形式: awesome-copilot のコンテンツを使用する場合は、ファイルの先頭に次のコメントを追加します。
例:
---
applyTo: "**/*.jsx,**/*.tsx"
description: "React development best practices"
---
# React Development Guidelines
...
---
applyTo: "**/*.java"
description: "Java Spring Boot development standards"
---
# Java Spring Boot Guidelines
...
二次的なアプローチ: awesome-copilot の instructions が存在しない場合は、シンプルなガイドラインのみを作成します。
- 高レベルの原則とベストプラクティス (それぞれ 2~3 文)
- アーキテクチャパターン (実装ではなくパターンに言及)
- コードスタイルの好み (命名規則、構造の好み)
- テスト戦略 (テストコードではなくアプローチ)
- ドキュメント標準 (形式、要件)
.instructions.md ファイルで厳に避けるべきもの:
- ❌ 実際のコード例やスニペットを書くこと
- ❌ 詳細な実装手順
- ❌ テストケースや特定のテストコード
- ❌ ボイラープレートやテンプレートコード
- ❌ 関数シグネチャやクラス定義
- ❌ import 文や依存関係のリスト
正しい .instructions.md の内容:
- ✅ 「説明的な変数名を使用し、camelCase に従う」
- ✅ 「継承よりもコンポジションを優先する」
- ✅ 「すべての public メソッドに単体テストを書く」
- ✅ 「より良い型安全性のために TypeScript strict モードを使用する」
- ✅ 「リポジトリで確立されたエラー処理パターンに従う」
fetch ツールを使った調査戦略:
- まず awesome-copilot を確認する - すべてのファイルタイプについて、常にここから始めてください
- テクノロジースタックが完全に一致するものを探す (例: React、Node.js、Spring Boot)
- 一般的に一致するものを探す (例: フロントエンドエージェント、テストスキル、レビューワークフロー)
- 関連ファイルについて、docs と該当するディレクトリを直接確認する
- 新しい形式を発明するよりも、リポジトリ固有の例を優先する
- 関連するものが何も存在しない場合にのみ、カスタムコンテンツを作成する
次の awesome-copilot ディレクトリを取得してください:
- Instructions: https://github.com/github/awesome-copilot/tree/main/instructions
- Agents: https://github.com/github/awesome-copilot/tree/main/agents
- Skills: https://github.com/github/awesome-copilot/tree/main/skills
確認すべき Awesome-Copilot の領域:
- フロントエンド Web 開発: React、Angular、Vue、TypeScript、CSS フレームワーク
- C# .NET 開発: テスト、ドキュメント、ベストプラクティス
- Java 開発: Spring Boot、Quarkus、テスト、ドキュメント
- データベース開発: PostgreSQL、SQL Server、および一般的なデータベースのベストプラクティス
- Azure 開発: Infrastructure as Code、サーバーレス関数
- セキュリティとパフォーマンス: セキュリティフレームワーク、アクセシビリティ、パフォーマンス最適化
ファイル構造の標準
すべてのファイルが次の規約に従っていることを確認してください。
project-root/
├── .github/
│ ├── copilot-instructions.md
│ ├── instructions/
│ │ ├── [language].instructions.md
│ │ ├── testing.instructions.md
│ │ ├── documentation.instructions.md
│ │ ├── security.instructions.md
│ │ ├── performance.instructions.md
│ │ └── code-review.instructions.md
│ ├── skills/
│ │ ├── setup-component/
│ │ │ └── SKILL.md
│ │ ├── write-tests/
│ │ │ └── SKILL.md
│ │ ├── code-review/
│ │ │ └── SKILL.md
│ │ ├── refactor-code/
│ │ │ └── SKILL.md
│ │ ├── generate-docs/
│ │ │ └── SKILL.md
│ │ └── debug-issue/
│ │ └── SKILL.md
│ ├── agents/
│ │ ├── software-engineer.agent.md
│ │ ├── architect.agent.md
│ │ ├── reviewer.agent.md
│ │ └── debugger.agent.md
│ └── workflows/ # only if GitHub Actions is used
│ └── copilot-setup-steps.yml
YAML Frontmatter テンプレート
すべてのファイルに次の構造を使用します。
Instructions (.instructions.md):
---
applyTo: "**/*.{lang-ext}"
description: "Development standards for {Language}"
---
# {Language} coding standards
Apply the repository-wide guidance from `../copilot-instructions.md` to all code.
## General Guidelines
- Follow the project's established conventions and patterns
- Prefer clear, readable code over clever abstractions
- Use the language's idiomatic style and recommended practices
- Keep modules focused and appropriately sized
Skills (SKILL.md):
---
name: {skill-name}
description: {Brief description of what this skill does}
---
# {Skill Name}
{One sentence describing what this skill does. Always follow the repository's established patterns.}
Ask for {required inputs} if not provided.
## Requirements
- Use the existing design system and repository conventions
- Follow the project's established patterns and style
- Adapt to the specific technology choices of this stack
- Reuse existing validation and documentation patterns
Agents (.agent.md):
---
description: Generate an implementation plan for new features or refactoring existing code.
tools: ['codebase', 'web/fetch', 'findTestFiles', 'githubRepo', 'search', 'usages']
model: Claude Sonnet 4
---
# Planning mode instructions
You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code.
Don't make any code edits, just generate a plan.
The plan consists of a Markdown document that describes the implementation plan, including the following sections:
* Overview: A brief description of the feature or refactoring task.
* Requirements: A list of requirements for the feature or refactoring task.
* Implementation Steps: A detailed list of steps to implement the feature or refactoring task.
* Testing: A list of tests that need to be implemented to verify the feature or refactoring task.
実行手順
- プロジェクト情報の収集 - 提供されていない場合は、ユーザーに技術スタック、プロジェクトの種類、開発スタイルを尋ねます
- awesome-copilot のパターンを調査:
- fetch ツールを使用して awesome-copilot のディレクトリを探索します
- instructions を確認: https://github.com/github/awesome-copilot/tree/main/instructions
- agents を確認: https://github.com/github/awesome-copilot/tree/main/agents (特に一致するエキスパートエージェント向け)
- skills を確認: https://github.com/github/awesome-copilot/tree/main/skills
- 帰属コメント用にすべてのソースを文書化します
- ディレクトリ構造を作成します
- プロジェクト全体の標準を記述したメインの copilot-instructions.md を生成します
- 帰属情報を付けて awesome-copilot のリファレンスを利用し、言語固有の instruction ファイルを作成します
- プロジェクトのニーズに合わせた再利用可能な skills を生成します
- 特化型エージェントをセットアップします。該当する場合は awesome-copilot から取得します (特に技術スタックに一致するエキスパートエンジニアエージェント向け)
- コーディングエージェント用の GitHub Actions ワークフロー (
copilot-setup-steps.yml) を作成します — ユーザーが GitHub Actions を使用しない場合はスキップします - 検証します — すべてのファイルが適切なフォーマットに従い、必要な frontmatter を含んでいることを確認します
セットアップ後の手順
すべてのファイルを作成した後、ユーザーに以下を提供します:
- VS Code のセットアップ手順 - ファイルを有効化および設定する方法
- 使用例 - 各 skill とエージェントの使用方法
- カスタマイズのヒント - 特定のニーズに合わせてファイルを変更する方法
- テストの推奨事項 - セットアップが正しく動作することを確認する方法
品質チェックリスト
完了する前に、以下を確認してください:
- 作成したすべての Copilot Markdown ファイルに、必要な箇所で適切な YAML frontmatter がある
- 言語固有のベストプラクティスが含まれている
- ファイル同士が Markdown リンクを使用して適切に参照し合っている
- Skills とエージェントに関連する説明が含まれている。MCP/ツール関連のメタデータは、対象の Copilot 環境が実際にサポートまたは必要とする場合にのみ含める
- 指示が包括的でありながら、圧倒的ではない
- セキュリティとパフォーマンスの考慮事項が扱われている
- テストのガイドラインが含まれている
- ドキュメントの標準が明確である
- コードレビューの標準が定義されている
ワークフローテンプレートの構造 (GitHub Actions を使用する場合のみ)
copilot-setup-steps.yml ワークフローは、この正確な形式に従わなければならず、シンプルに保つ必要があります:
name: "Copilot Setup Steps"
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v5
# Add ONLY basic technology-specific setup steps here
ワークフローはシンプルに保つ - 必須のステップのみを含めます:
Node.js/JavaScript:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
Python:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run linter
run: flake8 .
- name: Run tests
run: pytest
Java:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Build with Maven
run: mvn compile
- name: Run tests
run: mvn test
ワークフローで避けるべきもの:
- ❌ 複雑な構成設定
- ❌ 複数の環境構成
- ❌ 高度なツール設定
- ❌ カスタムスクリプトや複雑なロジック
- ❌ 複数のパッケージマネージャー
- ❌ データベースのセットアップや外部サービス
含めるもののみ:
- ✅ 言語/ランタイムのセットアップ
- ✅ 基本的な依存関係のインストール
- ✅ シンプルなリンティング (標準的な場合)
- ✅ 基本的なテストの実行
- ✅ 標準的なビルドコマンド