create-custom-agent
できること
このスキルは、Visual Studio Code用のカスタムエージェントのファイルを作ります。各ファイルは、専用のツールと指示を持つ専門的なAIの人格を定めます。計画やレビューなどの役割のために、焦点を絞ったエージェントがほしい開発者のためのものです。
使う場面
- ✓特定の役割のために、VS Codeの新しいカスタムエージェントを作りたいとき。
- ✓あるエージェントが次のエージェントへ作業を渡すように、引き継ぎを設定したいとき。
- ✓エージェントが使えるツールを制限したいとき。
スキルのリンク
https://github.com/dotnet/skills/blob/main/.agents/skills/create-custom-agent/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ファイルの読み取りだけができ、計画担当へ引き継げる、コードレビュー用のVS Codeのカスタムエージェントを作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、正しいフロントマターを持つエージェントのファイルを書き、そのツールと指示を設定し、ほかのエージェントへの引き継ぎがあれば追加します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Create Custom Agent
This skill helps you create VS Code custom agent files that define specialized AI personas for development tasks. Custom agents configure which tools are available, provide specialized instructions, and can chain together via handoffs.
When to Use
- Creating a new custom agent from scratch
- Scaffolding an
.agent.mdfile with proper frontmatter - Setting up agent-to-agent handoffs for multi-step workflows
- Configuring tool restrictions for specialized roles (planner, reviewer, etc.)
- Creating workspace-shared or user-profile agents
When Not to Use
- Creating instruction files (use
.instructions.mdinstead) - Creating reusable prompts (use
.prompt.mdinstead) - Modifying existing agents (edit the file directly)
Inputs
| Input | Required | Description |
|---|---|---|
| Agent name | Yes | Descriptive name for the agent (e.g., planner, code-reviewer) |
| Description | Yes | Brief description shown as placeholder text in chat |
| Purpose/Persona | Yes | What role the agent plays and how it should behave |
| Tools | Recommended | List of tools or tool sets the agent can use |
| Handoffs | Optional | Next-step agents to transition to after completing work |
Workflow
Step 1: Create the agent file
Create a file with .agent.md extension in the agents/ directory:
agents/<agent-name>.agent.md
Step 2: Add YAML frontmatter
Add the header with required and optional fields:
---
name: <agent-name>
description: <brief description for chat placeholder>
tools:
- <tool-name>
- <tool-set-name>
---
Available frontmatter fields:
| Field | Required | Description |
|---|---|---|
name |
No | Display name (defaults to filename) |
description |
Yes | Placeholder text shown in chat input |
argument-hint |
No | Hint text guiding user interaction |
tools |
No | List of available tools/tool sets |
agents |
No | List of allowed subagents (* for all, [] for none) |
model |
No | AI model name or prioritized array of models |
handoffs |
No | List of next-step agent transitions |
user-invokable |
No | Show in agents dropdown (default: true) |
disable-model-invocation |
No | Prevent subagent invocation (default: false) |
target |
No | Target environment: vscode or github-copilot |
mcp-servers |
No | MCP server configs for GitHub Copilot target |
Step 3: Configure tools
Specify which tools the agent can use:
tools:
- search # Built-in tool
- fetch # Built-in tool
- codebase # Tool set
- myServer/* # All tools from MCP server
Common tool patterns:
- Read-only agents:
['search', 'fetch', 'codebase'] - Full editing agents:
['*']or specific editing tools - Specialized agents: Cherry-pick specific tools
Step 4: Add handoffs (optional)
Configure transitions to other agents:
handoffs:
- label: Start Implementation
agent: implementation
prompt: Implement the plan outlined above.
send: false
model: GPT-5.2 (copilot)
Handoff fields:
label: Button text displayed to useragent: Target agent identifierprompt: Pre-filled prompt for target agentsend: Auto-submit prompt (default: false)model: Optional model override for handoff
Step 5: Write agent instructions (body)
Add the agent's behavior instructions in Markdown:
You are a security-focused code reviewer. Your job is to:
1. Analyze code for security vulnerabilities
2. Check for common security anti-patterns
3. Suggest secure alternatives
## Guidelines
- Focus on OWASP Top 10 vulnerabilities
- Flag hardcoded secrets immediately
- Review authentication and authorization logic
## Reference other files
See [security guidelines](../security.md) for standards.
Tips for instructions:
- Use Markdown links to reference other files
- Reference tools with
#tool:<tool-name>syntax - Be specific about agent behavior and constraints
Step 6: Validate the agent
Verify the agent loads correctly:
- Open Command Palette (Ctrl+Shift+P)
- Run "Chat: New Custom Agent" or check agents dropdown
- Use "Diagnostics" view (right-click in Chat view) to check for errors
Template
---
name: <agent-name>
description: <brief description for chat placeholder>
argument-hint: <optional hint for user input>
tools:
- <tool-1>
- <tool-2>
handoffs:
- l
よくある質問
引き継ぎとは何ですか?
次の段階として、作業を別のエージェントに送るリンクのことです。
エージェントが使うツールを制限できますか?
はい。レビュアーや計画担当などの役割に合わせて、ツールのセットを制限できます。
指示ファイルのためのものですか?
いいえ。指示やプロンプトのファイルは、別のツールで作ります。
詳細
作者による元の説明
Creates VS Code custom agent files (.agent.md) for specialized AI personas with tools, instructions, and handoffs. Use when scaffolding new custom agents, configuring agent workflows, or setting up agent-to-agent handoffs.
repo: dotnet/skills
人気
- GitHubのスター
- 5.8k
- ランキング
- #14552
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
create-skill
5.8k有効な名前、明確な発動の説明、規格に従うSKILL.mdファイルを持つ、新しいエージェントのスキルを作るようエージェントを支援します。
csharp-scripts
5.8k.NETのコマンドラインツールを使って、完全なプロジェクトを作らずに、小さなC#のプログラムを一つのファイルとして実行するようエージェントを支援します。
dotnet-pinvoke
5.8k署名、文字列の扱い、メモリ、安全なハンドルを含めて、ネイティブのC言語またはC++のライブラリを.NETから正しく呼び出すようエージェントを支援します。
nuget-trusted-publishing
5.8kGitHub Actionsから、NuGetの信頼された公開を設定するようエージェントを支援します。APIキーを保存せず、短期間有効なトークンでパッケージを公開できるようにします。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。