custom-agents

Configure GitHub Copilot custom agent files under .github/agents with Markdown frontmatter.

4.9k|489|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/github/gh-aw --skill custom-agents-github
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-agents
Source: https://github.com/github/gh-aw/tree/main/skills/custom-agents
Command: npx skills add https://github.com/github/gh-aw --skill custom-agents-github

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GitHub Copilot custom agents enable repository-specific instructions and automation, letting AI assistants behave consistently across your project by using dedicated agent files and workflow integrations.

Core Features & Use Cases

  • Documentation and standardization of custom agent formats placed under .github/agents
  • Support for repository-wide, path-specific, and workflow-integrated agents via imports
  • Best practices for safe, focused agent behavior in automated workflows
  • Real-world use cases: automating README improvements, code reviews, and task-specific agents

Quick Start

  • Create a new agent file: add a Markdown file under .github/agents/ (e.g., issue-triager.md)
  • Include a YAML frontmatter with at least name and description, then write your agent instructions in the body
  • Reference the agent in a workflow using the imports field, ensuring only one agent file is imported per workflow
  • Commit and test the workflow to verify the agent behavior

Frequently Asked Questions about custom-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom agents for GitHub Copilot in my repository?

GitHub Copilot custom agents are repository-specific instruction files that ensure AI assistants behave consistently across your project. They use dedicated Markdown files with YAML frontmatter placed under the .github/agents directory to standardize automation and guidance.

How do I reference a custom agent file in a GitHub workflow?

To set up a custom agent, create a Markdown file in the .github/agents/ directory with YAML frontmatter defining the name and description. Write your instructions in the body, then reference the agent in a workflow using the imports field.

Can I use path-specific custom agents for different directories in my repo?

Yes, GitHub Copilot custom agents support repository-wide, path-specific, and workflow-integrated configurations via imports. This allows you to define tailored AI behaviors for specific directories within your GitHub project structure.

Do I need external tools to configure GitHub Copilot custom agents?

No, configuring GitHub Copilot custom agents requires no external tools. You only need a standard GitHub repository structure and Markdown frontmatter conventions to define and deploy agent profiles.

What are the limitations when using custom agents in automated workflows?

The main limitation is that only one agent file can be imported per workflow. This constraint ensures safe, focused agent behavior and prevents conflicting instructions during automated task execution in GitHub Copilot workflows.