From copilot-consultant
Designs, creates, and reviews custom instructions files like .github/copilot-instructions.md (always-on), .instructions.md (file-based with YAML frontmatter/glob patterns), AGENTS.md, and CLAUDE.md for VS Code/GitHub Copilot.
npx claudepluginhub yuma-722/github-copilot-consultantThis skill uses the workspace's default tool permissions.
このSkillは、プロジェクトや個人に合った **カスタム指示ファイル** を設計し、ワークスペースに配置する。
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
このSkillは、プロジェクトや個人に合った カスタム指示ファイル を設計し、ワークスペースに配置する。
まず目的に応じて適切なファイル種別を選ぶ:
| 目的 | ファイル | 適用範囲 |
|---|---|---|
| プロジェクト全体のコーディング規約 | .github/copilot-instructions.md | 全リクエストに自動適用 |
| 言語・フレームワーク固有のルール | .instructions.md | applyTo パターンに一致するファイル作業時 |
| 複数AIエージェント共通の規約 | AGENTS.md | 全リクエストに自動適用 |
| Claude互換ツールとの共有 | CLAUDE.md | 全リクエストに自動適用 |
| 組織横断の標準 | GitHub Organization指示 | 組織内全リポジトリ |
判断フロー:
copilot-instructions.md または AGENTS.md.instructions.md + applyToAGENTS.md または CLAUDE.md以下を整理する:
.github/copilot-instructions.md
プロジェクト全体に適用される。1ファイルのみ。
.github/instructions/<name>.instructions.md
YAML frontmatter で適用条件を制御する:
---
name: 'Python Standards'
description: 'Python ファイルのコーディング規約'
applyTo: '**/*.py'
---
| フィールド | 必須 | 説明 |
|---|---|---|
name | いいえ | UI表示名。省略時はファイル名 |
description | いいえ | ホバー時の説明。タスクとのセマンティックマッチングにも使われる |
applyTo | いいえ | グロブパターン。省略時は自動適用されない(手動添付は可能) |
AGENTS.md # ワークスペースルート(always-on)
src/frontend/AGENTS.md # サブフォルダ(experimental)
サブフォルダ版は chat.useNestedAgentsMdFiles 設定で有効化する。
CLAUDE.md # ワークスペースルート
.claude/CLAUDE.md # .claude フォルダ
~/.claude/CLAUDE.md # ユーザーホーム(全プロジェクト共通)
CLAUDE.local.md # ローカル専用(VCS対象外)
核心原則: 短く、具体的に、理由付きで
良い例:
# コーディング規約
- `moment.js` ではなく `date-fns` を使用する(moment.js は非推奨でバンドルサイズが大きい)
- エラーハンドリングでは Result 型を使用する(例外スローは避ける)
- コンポーネントはクラスではなく関数コンポーネントで実装する
## 命名規約
- React コンポーネント: PascalCase(例: `UserProfile`)
- ユーティリティ関数: camelCase(例: `formatDate`)
- 定数: UPPER_SNAKE_CASE(例: `MAX_RETRY_COUNT`)
悪い例:
# ルール
コードをきれいに書いてください。
変数名は分かりやすくしてください。
よく使うグロブパターン:
| パターン | 対象 |
|---|---|
**/*.py | 全 Python ファイル |
**/*.{ts,tsx} | 全 TypeScript / TSX ファイル |
**/*.test.* | 全テストファイル |
src/frontend/** | フロントエンドディレクトリ配下 |
** | 全ファイル(description による条件付き適用時に使う) |
applyTo を省略すると自動適用されない。description のセマンティックマッチングか手動添付のみで使われる。
モノレポや大規模プロジェクトでの推奨構成:
.github/
├── copilot-instructions.md # 全体共通(言語問わず)
└── instructions/
├── python-standards.instructions.md # applyTo: '**/*.py'
├── typescript-react.instructions.md # applyTo: 'src/frontend/**/*.{ts,tsx}'
├── api-conventions.instructions.md # applyTo: 'src/api/**'
├── testing.instructions.md # applyTo: '**/*.test.*'
└── docs-writing.instructions.md # applyTo: 'docs/**/*.md'
注意: 複数ファイルが同時に適用される場合、VS Code はすべてをチャットコンテキストに結合する(順序保証なし)。矛盾するルールを書かないように注意する。
競合時の優先順位(高い順):
copilot-instructions.md / AGENTS.md)/instructions をチャット入力欄に入力して Configure Instructions and Rules メニューを開く.github/copilot-instructions.md および/または .github/instructions/*.instructions.mdAGENTS.md / CLAUDE.md.instructions.md の applyTo がないファイルは自動適用されないchat.includeApplyingInstructions(パターンベース)、chat.includeReferencedInstructions(Markdownリンク参照)、chat.useAgentsMdFile(AGENTS.md)チャットで /init を実行すると、ワークスペースを解析して copilot-instructions.md を自動生成できる。生成後に内容を精査・調整する。
.github/instructions/
├── frontend.instructions.md # applyTo: 'src/frontend/**'
└── backend.instructions.md # applyTo: 'src/backend/**'
---
name: 'Testing Guidelines'
description: 'テストファイルの記述ルール'
applyTo: '**/*.{test,spec}.{ts,tsx,js,jsx}'
---
# テストルール
- AAA パターン(Arrange-Act-Assert)で構成する
- テスト名は「何をテストし、何を期待するか」を日本語で記述する
- モックは最小限にし、可能なら実際の依存を使う