github-copilot-custom-agents

Create and verify GitHub Copilot custom agents with least-privilege tool restrictions and handoffs.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/schattenspiegel/skill-foundry-skills --skill github-copilot-custom-agents-schattenspiegel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-copilot-custom-agents
Source: https://github.com/schattenspiegel/skill-foundry-skills/tree/main/skills/github-copilot-custom-agents
Command: npx skills add https://github.com/schattenspiegel/skill-foundry-skills --skill github-copilot-custom-agents-schattenspiegel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Defining GitHub Copilot custom agents in VS Code involves many interacting fields—tools, models, subagents, handoffs, and invocation flags—and misconfiguration leads to agents with excessive permissions, broken handoffs, or host-incompatible frontmatter. ## Core Features & Use Cases - Agent Authoring Workflow: Guides definition of role, non-goals, allowed mutations, evidence, and exit conditions before writing .agent.md files in .github/agents/. - Least-Privilege Tooling: Enforces read-only tools for planning/audit roles and requires justification for edit or terminal access. - Handoff & Invocation Control: Configures user-invocable, disable-model-invocation, and reviewable handoffs with send: false by default. - Use Case: Create a read-only planner agent that produces repository-grounded implementation plans without edits, then hands off to an implementation agent only after user confirmation. ## Quick Start Create a read-only planning custom agent for this repository with a user-confirmed handoff to an implementation agent.

Frequently Asked Questions about github-copilot-custom-agents

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

FAQPage Schema
How do I create a GitHub Copilot custom agent in VS Code?▼

Create a .agent.md file in .github/agents/ with frontmatter defining name, description, tools, and invocation flags. Define the role, non-goals, allowed mutations, and exit condition first, then grant least-privilege tools and verify the agent appears in the intended host.

How do I restrict tools for a Copilot custom agent?▼

List only the required tools in the agent's tools field, giving planning or audit roles read-only search tools. Editing or terminal tools require a stated job, and tool restriction reduces capability but is not a security boundary for model output.

What fields does a VS Code .agent.md file support?▼

Current fields include name, description, argument-hint, tools, agents, model, user-invocable, disable-model-invocation, target, and handoffs. The mcp-servers field applies to the GitHub Copilot target rather than normal VS Code configuration, so inspect the active schema before emitting fields.

When should I not create a custom agent?▼

Do not create an agent for a single slash command, automatic coding rules, Agent Skills, or merely changing the selected chat model. A custom agent is justified only when its instructions and capability boundary recur across tasks.

Why does my custom agent handoff auto-submit or fail?▼

Handoffs auto-submit when send is not set to false, and fail when the target agent does not resolve in the active host. Set send: false by default, verify every handoff target, and test picker visibility and model invocation separately.