custom-agents
FreeNo executable scriptsNot checkedDefine and validate GitHub custom agent files, prompts, and examples.
by github★ 5,758 GitHub starsAbout this skill
GitHub Custom Agent File Format
Use this reference for the GitHub custom agent file format.
Overview
GitHub Copilot reads custom agent instructions from Markdown files with YAML frontmatter. Use them to define specialized behavior, tool access, and workflows for your repository.
File Locations
Place custom agent files in these locations based on scope:
1. Repository-wide Instructions
- File:
.github/copilot-instructions.md - Scope: Applies to all code generation in the repository
- Use case: General coding standards, security requirements, testing practices
2. Path-specific Instructions
- Directory:
.github/instructions/ - Pattern:
*.instructions.md(e.g.,frontend.instructions.md,backend.instructions.md) - Scope: Can target specific directories or file patterns using
applyToin frontmatter - Use case: Framework-specific guidelines, component-specific rules
3. Custom Agent Profiles
- Directory:
.github/agents/or.github/copilot/instructions/ - Pattern:
AGENTS.md,*.md(e.g.,readme-creator.md,test-writer.md) - Scope: Defines specialized agents with specific capabilities and instructions
- Use case: Task-specific agents (documentation, testing, refactoring)
4. agentic workflow integration
- Location: Imported via
importsfield in workflow frontmatter - Pattern: Any markdown files under
.github/agents/directory - Scope: Custom agent for specific agentic workflow execution
- Use case: Workflow-specific agent configuration
- Important: Only one agent file is allowed per workflow
File Format
Basic Structure
# YAML frontmatter (configuration)
name: agent-name
description: Brief description of agent's purpose
# Markdown body (instructions)
Your natural language instructions for the agent go here.
Complete YAML Frontmatter Schema
# Required fields
name: agent-identifier # Unique identifier for the agent
# Optional descriptive fields
description: > # Multi-line description of agent's purpose
Agent specializing in specific tasks
# Optional instruction fields
prompt: | # Freeform instructions (alternative to markdown body)
Your instructions here
# Optional tool configuration
tools: # List of allowed tools for this agent
- createFile
- editFiles
- codeSearch
- search
# Optional path targeting (for .instructions.md files)
applyTo: # Glob patterns for targeted files/directories
- "src/frontend/**"
- "**/*.tsx"
# Optional MCP server configuration (enterprise/org only)
mcp-server: # External MCP server configuration
url: https://my-mcp-server.com
api-key: ${{ secrets.MCPSERVER_API_KEY }}
# Optional settings
settings: # Custom runtime or connection settings
key: value
Field Descriptions
Core Fields
name (string, required for agent profiles)
- Unique identifier for the custom agent
- Used to reference the agent in workflows or assignments
- Convention: lowercase with hyphens (e.g.,
readme-creator,test-writer)
description (string, optional)
- Human-friendly description of the agent's focus and behavior
- Helps users understand what the agent specializes in
- Can be multi-line using YAML's
>or|syntax
prompt (string, optional)
- Alternative to using the markdown body for instructions
- Contains freeform natural language instructions
- Use YAML's
|(literal) or>(folded) for multi-line content - If both
promptand markdown body exist, they are typically combined
Tool Configuration
tools (array of strings, optional)
- List of tools the agent is allowed to use
- If omitted or set to
["*"], agent has access to all available tools - Tool names are case-insensitive
- Supports both GitHub's standard tool aliases and legacy naming conventions
GitHub Standard Tool Aliases:
GitHub Copilot defines a standardized set of tool aliases for custom agents:
read- Access and read contents of files or codeedit- Make changes in code files, apply edits or refactoringsearch- Search codebase for keywords, references, or patternspr- Create, manage, or update pull requestsissue- Create, manage, or update issues
Legacy Tool Names:
For backward compatibility, these legacy tool names are still supported:
createFile- Create new files (useeditinstead)editFiles- Modify existing files (useeditinstead)deleteFiles- Remove files (useeditinstead)codeSearch- Semantic code search (usesearchinstead)runCommand- Execute shell commandsgetFile- Read file contents (usereadinstead)listFiles- List directory contents (usereadinstead)
MCP Server Tool Prefixes:
When using Model Context Protocol (MCP) servers, you can specify tool
Install custom-agents in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the custom-agents skill do?
Define and validate GitHub custom agent files, prompts, and examples.
How do I install the custom-agents skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the custom-agents skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic