
Create Custom Agent
FreeEasily scaffold specialized AI agent files for VS Code.
Free · Opens the source repo
What Create Custom Agent does
The Create Custom Agent skill is designed for developers looking to define and configure specialized AI personas within Visual Studio Code. By generating .agent.md files, this skill allows you to specify the tools available to an agent, outline their purpose, and set up workflows that can involve handoffs between multiple agents. This structured approach enables the creation of tailored AI assistants that can handle specific tasks or roles in your development process.
When using this skill, you start by creating an agent file in the designated agents/ directory. The skill guides you through the necessary YAML frontmatter, which includes required fields like the agent's name, description, and purpose. Additionally, you can specify which tools the agent can access and configure handoffs to other agents, facilitating complex workflows that require collaboration between multiple AI personas.
The skill is particularly useful when you need to scaffold a new agent from scratch or when you want to set up a series of agents that work together in a multi-step process. Whether you are creating a planner, reviewer, or any other specialized role, this skill provides the framework to ensure that each agent operates with the correct tools and instructions, enhancing productivity and efficiency in your development tasks.
However, it’s important to note that this skill is not intended for creating instruction files or reusable prompts. If you need to modify existing agents, you should edit the .agent.md files directly rather than using this skill. This focused functionality ensures that developers can create and configure agents effectively without the clutter of unrelated features.
When to use it
Use this skill when you need to create a new custom agent or configure agent workflows involving multiple steps.
When not to use it
Avoid this skill for creating instruction files or modifying existing agents directly.
What you can build with it
Creating a New Planner Agent
Use this skill to scaffold a planner agent that can generate implementation plans with specific tools.
Setting Up a Code Review Agent
Quickly create a code review agent that focuses on security and performance issues, leveraging the right tools.
Configuring Agent Handoffs
Set up a series of agents that can transition smoothly between tasks, enhancing multi-step workflows.
How to install Create Custom Agent
View source1. Install with the skills CLI
npx skills add dotnet/skills/create-custom-agent --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by dotnetCreate 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:
- label: <button-text>
agent: <target-agent>
prompt: <pre-filled-prompt>
send: false
---
# <Agent Title>
<One paragraph describing the agent's persona and purpose.>
## Role
<Describe the agent's specialized role and expertise.>
## Guidelines
- <Guideline 1>
- <Guideline 2>
- <Guideline 3>
## Workflow
1. <Step 1>
2. <Step 2>
3. <Step 3>
## Constraints
- <Constraint 1>
- <Constraint 2>
Example Agents
Planning Agent
---
name: planner
description: Generate an implementation plan
tools:
- search
- fetch
- codebase
handoffs:
- label: Start Implementation
agent: implementation
prompt: Implement the plan above.
---
# Planning Agent
You are a solution architect. Generate detailed implementation plans.
## Guidelines
- Analyze requirements thoroughly before planning
- Break work into discrete, testable steps
- Identify dependencies and risks
- Do NOT make code changes
Code Review Agent
---
name: code-reviewer
description: Review code for quality and security issues
tools:
- search
- codebase
---
# Code Review Agent
You are a senior engineer performing code review.
## Focus Areas
- Security vulnerabilities
- Performance concerns
- Code maintainability
- Test coverage gaps
## Output Format
Provide findings as:
1. **Critical**: Must fix before merge
2. **Warning**: Should address
3. **Suggestion**: Nice to have
Validation Checklist
- File has
.agent.mdextension - File is in
agents/directory - YAML frontmatter is valid (proper indentation, no syntax errors)
- Description is non-empty and descriptive
- Tools list contains only available tools
- Handoff agent names match existing agents
- Instructions are clear and actionable
- Agent appears in agents dropdown
Common Pitfalls
| Pitfall | Solution |
|---|---|
| Agent not appearing in dropdown | Check file is in agents/ directory with .agent.md extension |
| YAML syntax errors | Validate frontmatter indentation and quoting |
| Tools not working | Verify tool names exist; unavailable tools are ignored |
| Handoffs not showing | Target agent must exist; check agent identifier |
| Instructions too vague | Be specific about role, constraints, and workflow |
| Agent invoked as subagent unexpectedly | Set disable-model-invocation: true |
| Want agent only as subagent | Set user-invokable: false |
References
Frequently asked questions about Create Custom Agent
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
