create-custom-agent
What it does
This skill creates custom agent files for Visual Studio Code, each defining a specialized AI persona with its own tools and instructions. It is for developers who want focused agents for planning, review or other roles.
When to use it
- ✓When you want to create a new VS Code custom agent for a specific role.
- ✓When you want to set up handoffs so one agent passes work to another.
- ✓When you want to limit which tools an agent can use.
Skill link
https://github.com/dotnet/skills/blob/main/.agents/skills/create-custom-agent/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Create a VS Code custom agent for code review that can only read files and hand off to a planner.”
5 new skills a week. 1 minute to read.
How it works
The agent writes an agent file with the right frontmatter, sets its tools and instructions, and adds any handoffs to other agents.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
What is a handoff?
A handoff is a link that sends the work to another agent as the next step.
Can I limit the tools an agent uses?
Yes. Tool sets can be restricted to suit a role such as reviewer or planner.
Is this for instruction files?
No. Instruction and prompt files are created with other tools.
Details
Original description by the author
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
Popularity
- GitHub stars
- 5.8k
- Ranking position
- #14552
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
create-skill
5.8kHelps your agent create a new agent skill with a valid name, a clear trigger description and a SKILL.md file that follows the standard.
csharp-scripts
5.8kHelps your agent run a small C# program as a single file with the .NET command line tool, without creating a full project.
dotnet-pinvoke
5.8kHelps your agent call native C or C++ libraries from .NET correctly, covering signatures, string handling, memory and safe handles.
nuget-trusted-publishing
5.8kHelps your agent set up NuGet trusted publishing from GitHub Actions, so packages publish with short-lived tokens instead of stored API keys.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.