◾️はじめに
https://dk521123.hatenablog.com/entry/2026/10/30/131957
の続き。
今回は、その中で「copilot-plugin-skill」について取り上げる。
目次
【1】copilot-plugin-skill
【2】copilot-plugin-skillのセットアップ
Step1: GitHub Copilot CLI のインストール
Step2: copilot-plugin-skill のインストール
【3】copilot-plugin-skillを使ったSkill作成方法
Step1: ターミナルで対象のリポジトリ(プロジェクト)に移動する
Step2: Copilot CLI を起動する
Step3: プロンプトを送信する
【4】作成したSkillを実行するには
方法1:VS Code の GitHub Copilot Chat から呼び出す
方法2:ターミナル(Copilot CLI)から呼び出す
【1】copilot-plugin-skill
GitHub Copilot CLIなどで、
プラグインやMCP(Model Context Protocol)ツールを
伴う拡張機能を開発するための開発キット的なスキル
https://github.com/htekdev/copilot-plugin-skill
【2】copilot-plugin-skillのセットアップ
Step1: GitHub Copilot CLI のインストール
https://docs.github.com/ja/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli
$ brew install --cask copilot-cli
Step2: copilot-plugin-skill のインストール
$ copilot plugin install htekdev/copilot-plugin-skill
Plugin "copilot-plugin-skill" installed successfully. Installed 1 skill.
Warning: Direct plugin installs (repos, URLs, local paths) are deprecated. Only plugin@marketplace installs will be supported in a future release.
【3】copilot-plugin-skillを使ったSkill作成方法
Step1: ターミナルで対象のリポジトリ(プロジェクト)に移動する
mkdir demo_skill
Step2: Copilot CLI を起動する
copilot
Copilot can read files in this folder and, with your permission, edit them
or run code and shell commands. It will remember your permissions for the
rest of this session.
Do you trust the files in this folder?
❯ 1. Yes
2. Yes, and remember this folder for future sessions
3. No (Esc)
Step3: プロンプトを送信する
* 起動した対話画面で、以下のようなプロンプトを投げる
=> インストールした copilot-plugin-skill の知識を使って、
雛形を一気に作ってくれる
例
ユーザーが指定したPythonライブラリを追加し、
既存の requirements.txt / constraints.txt / plugins.zip を連動して
更新・生成する新しいSkillを作成したいです。
このプロジェクト内に必要なファイル構成(SKILL.mdや設定ファイルなど)
の雛形を生成してください。
Check target directory status
for d in demo_skill demo-hello-template demo-hello-world; do printf
'\n[%s]\n' "$d"; git -C "$d" status --short --branch 2>/dev/null ||
true; done
Do you want to run this command?
❯ 1. Yes
2. No, and tell Copilot what to do differently (Esc to stop)
Do you want to create /Users/user/demo_skill/skills/pyt
hon-library-sync/SKILL.md?
❯ 1. Yes
2. Yes, and don't ask again for file operations when in this directory
(~/work/git)
3. No, and tell Copilot what to do differently (Esc to stop)
# 生成した設定ファイル(skill-config.json)の構文(JSONのフォーマット)
# にエラーがないか検証し、
# 今回の一連の処理で、実際にどんなファイル構造が作られたかを
# 一覧表示して画面で確認
# => 1. Yes を選択
Validate config and list generated files
python3 -m json.tool demo_skill/skills/python-library-sync/skill-
config.json >/dev/null && find demo_skill -maxdepth 4 -type f -print
Do you want to run this command?
❯ 1. Yes
2. No, and tell Copilot what to do differently (Esc to stop)
# 検証した結果を踏まえて、SKILL.md の中身(より具体的な手順や制約事項など)を更新
# => 1. Yes を選択
Do you want to update /Users/user/demo_skill/skills/pyt
hon-library-sync/SKILL.md?
❯ 1. Yes
2. Yes, and don't ask again for file operations when in this directory
(~/work/git)
3. No, and tell Copilot what to do differently (Esc to stop)
demo_skill/skills/python-library-sync/ に Skill の雛形を作成しました。
• SKILL.md : ライブラリ名・互換性の確認から、依存ファイルと plugins.zip の更新・検証までの手順を定義
• skill-config.json : 対象ファイルのパス、ZIP の入力元・生成コマンドを設定可能(未指定時は既存プロジェクトから調査)
設定 JSON の形式は検証済みです。ZIP の具体的な構成や生成方法はプロジェクトごとに異なるため、未指定なら既存の手順を調べるようにしています。
【4】作成したSkillを実行するには
方法1:VS Code の GitHub Copilot Chat から呼び出す
[1] VS Code でプロジェクトを開く
作成した Skill が含まれるリポジトリを VS Code で開く
[2] Copilot Chat を開く
サイドバーから GitHub Copilot Chat のパネルを開く
[3] Agent モード(または通常チャット)で指示を出す
# 入力欄に、以下のように自然言語で指示を出す
~~~~
requests ライブラリ(バージョン 2.31.0)を追加して、requirements.txt と constraints.txt を更新し、plugins.zip を再生成して下さい
~~~~
=> 後は勝手にいい感じで実行してくれる
方法2:ターミナル(Copilot CLI)から呼び出す
* copilot-plugin-skill を使って対話した
Copilot CLI からそのまま実行することもできる
[1] ターミナルでプロジェクトのルートディレクトリに移動
cd demo_skill
[2] copilot コマンドで対話モードを起動
copilot
[3] チャット上で指示を出す
~~~
@python-library-sync を使って、新しいライブラリ requests を追加して。
~~~
or
~~~
python-library-sync のスキルに従って、
requirements.txt に pandas を追加し、plugins.zip を再生成して
~~~
# Tips: 直接スキル名をメンションする
指示の冒頭に @python-library-sync のようにスキル名(またはタグ)
を書いて指名すると、確実にそのスキル(手順書)を読み込ませて
実行させやすくなる
関連記事
GitHub Skills 〜 入門編 〜
https://dk521123.hatenablog.com/entry/2026/09/25/122553
GitHub Skills 〜 基本編 〜
https://dk521123.hatenablog.com/entry/2026/11/01/003003
GitHub Skills 〜 スキル作成補助 〜
https://dk521123.hatenablog.com/entry/2026/10/30/131957
Github ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2019/07/18/234652