github-copilot
GitHub Copilotは、AIを活用してコードの自動提案や自然言語での解説、リファクタリング、コマンド実行、コード全体を理解した上でのサポートを行い、開発者が意図したコードを迅速に生成し、定型コードを削減、APIやパターンを理解する手助けをするSkill。
📜 元の英語説明(参考)
GitHub Copilot is an AI-powered pair programming tool that integrates directly into your editor and terminal. It provides real-time code suggestions, natural language chat for explaining and refactoring code, slash commands for common operations, and workspace-aware agents that can reason across your entire codebase. Copilot accelerates development by turning intent into working code, reducing boilerplate, and helping developers navigate unfamiliar APIs and patterns.
🇯🇵 日本人クリエイター向け解説
GitHub Copilotは、AIを活用してコードの自動提案や自然言語での解説、リファクタリング、コマンド実行、コード全体を理解した上でのサポートを行い、開発者が意図したコードを迅速に生成し、定型コードを削減、APIやパターンを理解する手助けをするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o github-copilot.zip https://jpskill.com/download/14944.zip && unzip -o github-copilot.zip && rm github-copilot.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14944.zip -OutFile "$d\github-copilot.zip"; Expand-Archive "$d\github-copilot.zip" -DestinationPath $d -Force; ri "$d\github-copilot.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
github-copilot.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
github-copilotフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
GitHub Copilot — AI ペアプログラミング
GitHub Copilot はエディターに常駐し、あなたと一緒にコードを書きます。現在のファイル、開いているタブ、および周囲のコンテキストを読み取り、単一行の完成から関数全体の生成まで、さまざまな補完候補を提案します。補完機能に加えて、Copilot Chat を使用すると、質問をしたり、コードを説明したり、テストを生成したり、リファクタリングしたりできます。これらすべてをエディターから離れることなく実行できます。
このスキルでは、VS Code および CLI での Copilot のセットアップ、インライン候補の効率的な利用、チャットとスラッシュコマンドの活用、およびコードベース全体のタスクのためのワークスペースエージェントの使用について説明します。
VS Code での Copilot のセットアップ
Copilot には、有効な GitHub Copilot サブスクリプション(Individual、Business、または Enterprise)が必要です。アクセス権を取得したら、インストールは数秒で完了します。
VS Code を開き、マーケットプレイスから拡張機能をインストールします。Copilot 拡張機能には、インライン候補とチャットパネルの両方が含まれています。
# コマンドラインから Copilot 拡張機能をインストールする
code --install-extension GitHub.copilot
code --install-extension GitHub.copilot-chat
インストール後、VS Code は GitHub アカウントでサインインするように求めます。認証されると、Copilot は自動的にアクティブになります。ステータスバーの Copilot アイコンを確認することで、実行中であることを確認できます。アイコンはアクティブとして表示され、取り消し線が表示されていないはずです。
Copilot の動作を構成するには、VS Code の設定を開き、関連するオプションを調整します。
// .vscode/settings.json — プロジェクトの Copilot 構成
{
// 特定の言語に対して Copilot を有効にする
"github.copilot.enable": {
"*": true,
"markdown": true,
"plaintext": false,
"yaml": true
},
// インライン候補の動作を制御する
"editor.inlineSuggest.enabled": true,
"github.copilot.advanced": {
"inlineSuggestCount": 3
}
}
インライン候補の操作
インライン候補は、入力時にグレー表示されたゴーストテキストとして表示されます。Copilot は、現在のファイル、関数名、コメント、および周囲のコードに基づいて、書きたいものを予測します。
Copilot を誘導する最も効果的な方法は、明確な関数シグネチャとコメントを使用することです。説明的な関数名と型シグネチャを記述すると、Copilot はあなたの意図を理解し、正確な実装を生成します。
// src/utils/validation.ts — Copilot は説明的なシグネチャから実装を生成します
// 関数シグネチャを入力して一時停止すると、Copilot が本体を提案します
function validateEmailAddress(email: string): boolean {
// Copilot は関数名とパラメータに基づいてこれを完成させます
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(email);
}
// 関数を説明するコメントは、高品質の提案をトリガーします
// 最初の行をヘッダーとして使用して、CSV 文字列をオブジェクトの配列に解析します
function parseCSV(csv: string): Record<string, string>[] {
const lines = csv.trim().split('\n');
const headers = lines[0].split(',').map(h => h.trim());
return lines.slice(1).map(line => {
const values = line.split(',').map(v => v.trim());
return Object.fromEntries(headers.map((h, i) => [h, values[i]]));
});
}
キーボードショートカットは、候補とのやり取りを制御します。
- Tab — 候補全体を受け入れる
- Esc — 候補を却下する
- Alt+] / Option+] — 次の候補に切り替える
- Alt+[ / Option+[ — 前の候補に切り替える
- Ctrl+Enter — Copilot 補完パネルを開いて、複数の代替案を表示する
Copilot Chat
チャットパネルは、Copilot が自動補完を超えて真のペアプログラミングに移行する場所です。コードの説明、バグの発見、リファクタリングの提案、または自然言語の説明に基づいて完全に新しいコードの生成を依頼できます。
Ctrl+Shift+I(macOS では Cmd+Shift+I)でチャットパネルを開きます。エディターでコードを選択し、右クリックして、コンテキストメニューから Copilot アクションを選択することもできます。
効果的なチャットプロンプトは具体的で、コンテキストを提供します。「このコードを修正する」と尋ねる代わりに、何が間違っていて、どのような動作を期待するかを説明します。
# 高品質の応答を生成するチャットプロンプトの例
"入力配列が空の場合、この関数は例外をスローします。代わりに空の配列を返すガード句を追加してください。"
"この Express ルートハンドラーをリファクタリングして、.then() チェーンの代わりに async/await を使用し、try/catch で適切なエラー処理を追加してください。"
"UserService クラスの単体テストを生成します。正常なパス、無効な入力、およびデータベース接続の失敗をカバーします。"
"この正規表現がステップバイステップで何をするかを説明してください: /^(?=.*[A-Z])(?=.*\d).{8,}$/"
スラッシュコマンド
スラッシュコマンドは、一般的な操作のショートカットです。チャットパネルに / と入力すると、完全なリストが表示されます。これらのコマンドは、反復的なタスクを効率化します。
最も役立つスラッシュコマンドは次のとおりです。
- /explain — 選択したコードを平易な言葉で説明する
- /fix — 選択したコードの問題に対する修正を提案する
- /tests — 選択したコードの単体テストを生成する
- /doc — 関数またはクラスのドキュメントコメントを生成する
- /simplify — 選択したコードをリファクタリングして複雑さを軽減する
- /new — 説明から新しいプロジェクトまたはファイルをスキャフォールドする
コードブロックを選択して /tests と入力すると、Copilot は関数シグネチャを分析し、エッジケースを特定し、完全なテストファイルを生成します。その後、チャットでフォローアップして出力を調整できます。
// src/services/orderService.ts — このコードを選択し、チャットで /tests を使用します
export class OrderService {
constructor(private readonly db: Database) {}
async createOrder(userId: string, items: CartItem[]): Promise<Order> {
if (items.length === 0) {
throw new ValidationError('Order must contain at least one item');
}
const total = items.reduce((sum, item) => sum + item.price * item.quantity, 0);
const order = { userId, items, total, status: 'pending', createdAt: new Date() };
return this.db.orders.insert(order);
}
}
ワークスペースエージェント
ワークスペースエージェントは、Copilot の最も強力な機能です。@workspace エージェントは推論できます
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
GitHub Copilot — AI Pair Programming
GitHub Copilot sits in your editor and writes code alongside you. It reads your current file, open tabs, and surrounding context to suggest completions that range from finishing a single line to generating entire functions. Beyond completions, Copilot Chat lets you ask questions, explain code, generate tests, and refactor — all without leaving your editor.
This skill covers setting up Copilot in VS Code and the CLI, working effectively with inline suggestions, leveraging chat and slash commands, and using workspace agents for codebase-wide tasks.
Setting Up Copilot in VS Code
Copilot requires an active GitHub Copilot subscription (Individual, Business, or Enterprise). Once you have access, installation takes seconds.
Open VS Code and install the extension from the marketplace. The Copilot extension includes both inline suggestions and the chat panel.
# Install Copilot extensions from the command line
code --install-extension GitHub.copilot
code --install-extension GitHub.copilot-chat
After installation, VS Code prompts you to sign in with your GitHub account. Once authenticated, Copilot activates automatically. You can verify it's running by checking the Copilot icon in the status bar — it should show as active, not crossed out.
To configure Copilot's behavior, open your VS Code settings and adjust the relevant options.
// .vscode/settings.json — Copilot configuration for a project
{
// Enable Copilot for specific languages
"github.copilot.enable": {
"*": true,
"markdown": true,
"plaintext": false,
"yaml": true
},
// Control inline suggestion behavior
"editor.inlineSuggest.enabled": true,
"github.copilot.advanced": {
"inlineSuggestCount": 3
}
}
Working with Inline Suggestions
Inline suggestions appear as grayed-out ghost text as you type. Copilot predicts what you want to write based on your current file, function names, comments, and surrounding code.
The most effective way to guide Copilot is through clear function signatures and comments. When you write a descriptive function name and type signature, Copilot understands your intent and generates accurate implementations.
// src/utils/validation.ts — Copilot generates implementations from descriptive signatures
// Type a function signature and pause — Copilot suggests the body
function validateEmailAddress(email: string): boolean {
// Copilot completes this based on the function name and parameter
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(email);
}
// A comment describing the function triggers high-quality suggestions
// Parse a CSV string into an array of objects using the first row as headers
function parseCSV(csv: string): Record<string, string>[] {
const lines = csv.trim().split('\n');
const headers = lines[0].split(',').map(h => h.trim());
return lines.slice(1).map(line => {
const values = line.split(',').map(v => v.trim());
return Object.fromEntries(headers.map((h, i) => [h, values[i]]));
});
}
Keyboard shortcuts control how you interact with suggestions:
- Tab — Accept the full suggestion
- Esc — Dismiss the suggestion
- Alt+] / Option+] — Cycle to the next suggestion
- Alt+[ / Option+[ — Cycle to the previous suggestion
- Ctrl+Enter — Open the Copilot completions panel to see multiple alternatives
Copilot Chat
The chat panel is where Copilot moves beyond autocompletion into genuine pair programming. You can ask it to explain code, find bugs, suggest refactors, or generate entirely new code based on natural language descriptions.
Open the chat panel with Ctrl+Shift+I (or Cmd+Shift+I on macOS). You can also select code in the editor, right-click, and choose a Copilot action from the context menu.
Effective chat prompts are specific and provide context. Instead of asking "fix this code," describe what's wrong and what behavior you expect.
# Example chat prompts that produce high-quality responses
"This function throws when the input array is empty. Add a guard clause
that returns an empty array instead of throwing."
"Refactor this Express route handler to use async/await instead of
.then() chains, and add proper error handling with a try/catch."
"Generate unit tests for the UserService class. Cover the happy path,
invalid input, and database connection failures."
"Explain what this regex does step by step: /^(?=.*[A-Z])(?=.*\d).{8,}$/"
Slash Commands
Slash commands are shortcuts for common operations. Type / in the chat panel to see the full list. These commands streamline repetitive tasks.
The most useful slash commands include:
- /explain — Explain the selected code in plain language
- /fix — Suggest a fix for problems in the selected code
- /tests — Generate unit tests for the selected code
- /doc — Generate documentation comments for a function or class
- /simplify — Refactor the selected code to reduce complexity
- /new — Scaffold a new project or file from a description
When you select a block of code and type /tests, Copilot analyzes the function signatures, identifies edge cases, and generates a complete test file. You can then refine the output by following up in chat.
// src/services/orderService.ts — Select this code, then use /tests in chat
export class OrderService {
constructor(private readonly db: Database) {}
async createOrder(userId: string, items: CartItem[]): Promise<Order> {
if (items.length === 0) {
throw new ValidationError('Order must contain at least one item');
}
const total = items.reduce((sum, item) => sum + item.price * item.quantity, 0);
const order = { userId, items, total, status: 'pending', createdAt: new Date() };
return this.db.orders.insert(order);
}
}
Workspace Agents
Workspace agents are Copilot's most powerful feature. The @workspace agent can reason across your entire codebase, not just the current file. It indexes your project and answers questions that require understanding multiple files and their relationships.
# Workspace agent prompts — these search across your entire project
@workspace "Where is the database connection configured?"
@workspace "Which components use the useAuth hook?"
@workspace "How does the payment flow work end to end?"
@workspace "Find all API endpoints that don't have authentication middleware"
Other built-in agents include:
- @terminal — Suggest or explain terminal commands
- @vscode — Help with VS Code settings and features
Copilot in the CLI
GitHub Copilot extends beyond the editor into your terminal. The gh copilot command turns natural language into shell commands.
# Install the Copilot CLI extension
gh extension install github/gh-copilot
# Ask Copilot to explain a command
gh copilot explain "find . -name '*.ts' -not -path './node_modules/*' | xargs grep 'TODO'"
# Ask Copilot to suggest a command
gh copilot suggest "find all Docker containers using more than 1GB memory"
# Copilot presents the command and asks if you want to run it
# ✓ docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}" | awk '$2 > 1024'
The CLI is particularly powerful for operations you do infrequently — complex find commands, awk pipelines, Docker operations, or git history queries. Instead of searching Stack Overflow, describe what you want and Copilot translates it into the right command for your shell.
Tips for Getting Better Suggestions
Copilot's quality depends heavily on the context you provide. A few practices dramatically improve suggestion accuracy.
Write descriptive variable and function names. Copilot reads identifiers as strong signals of intent. A function named calculateMonthlyRevenue gets better suggestions than one named calc.
Keep related code in the same file or have relevant files open in tabs. Copilot uses open tabs as context for its suggestions.
Use TypeScript or JSDoc types. The more type information Copilot has, the more constrained and accurate its suggestions become. A function that accepts userId: string and returns Promise<User | null> gives Copilot much more to work with than untyped JavaScript.
Write a leading comment before complex functions. Even a single line describing the algorithm or business rule helps Copilot generate the right implementation on the first try.