agentleFS
CowboyLogicCowboyLogic/ai-dev/skills/agent-creator-copilot/SKILL.md

agent-creator-copilot

Skill4 starsChanged 11 days agoMITView on GitHub

Guide for creating custom agents for GitHub Copilot (cloud agent on GitHub.com, Copilot CLI, VS Code, and other IDEs). Use this when building custom agent profiles (.agent.md files), configuring tools, models, handoffs, subagents, hooks, or MCP server integrations for Copilot.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Manually: create .github/agents/<name>.agent.md.

    line 197
  2. Distinctive:

    Follow the template above.

    line 211
  3. Distinctive:

    Run representative prompts covering normal use and edge cases

    line 216
  4. Distinctive:

    Verify scope boundaries and tool restrictions are respected

    line 217
  5. Distinctive:

    Least privilege for tools: Read-only agents cannot accidentally modify files or run commands.

    line 225
  6. Very specific:

    Secrets in MCP config: Use ${{ secrets.NAME }} / ${{ vars.NAME }} (configured as Agents secrets/variables).

    line 227

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Copilot Agent Creator

Custom agents for GitHub Copilot are defined in .agent.md Markdown files called agent profiles. They encode a role, behavioral instructions, tool access, and optionally a model, without requiring extension development. The same profile can be used by Copilot cloud agent on GitHub.com, GitHub Copilot CLI, VS Code, JetBrains IDEs, Eclipse, and Xcode, but some properties only work on some surfaces.

[!IMPORTANT] This skill was last verified in November 2026 against GitHub Copilot CLI v1.0.105. Always verify against the official docs before relying on a property. The canonical references are:


When to Use This Skill

  • Creating a new custom agent profile for Copilot cloud agent, Copilot CLI, or VS Code
  • Configuring tools, model, handoffs, subagents, hooks, or MCP servers in a profile
  • Choosing the right scope (repository, user, organization, enterprise)
  • Designing multi-agent workflows
  • Writing effective agent prompts

Quick Decision Guide

NeedApproach
Persistent persona with tool restrictionsCustom agent profile (this skill)
One-off reusable task instructionsPrompt file (.prompt.md)
Portable domain knowledge with scriptsAgent skill (SKILL.md)
Deterministic command at a lifecycle eventHook
Deep VS Code IDE integration, custom UIVS Code extension
Custom tools exposed via protocolMCP server

Agent Profile Format

---
name: readme-creator
description: Agent specializing in creating and improving README files
tools: ["read", "search", "edit"]
---

You are a documentation specialist focused on README files. ...

description is the only required property (GitHub.com and Copilot CLI). In VS Code the YAML header is optional. The Markdown body holds the instructions and can be at most 30,000 characters.

[!TIP] For the full property reference and a per-surface compatibility table, load references/frontmatter-reference.md.


Where to Store Agent Profiles

ScopeLocationSurfaces
Repository / workspace.github/agents/<name>.agent.mdAll
Repository (Claude format).claude/agents/<name>.mdVS Code, Copilot CLI
User~/.copilot/agents/VS Code, Copilot CLI
User (Claude format)~/.claude/agents/VS Code
Organizationagents/<name>.md in the org's .github or .github-private repoGitHub.com, IDEs (VS Code discovers them by default; github.copilot.chat.organizationCustomAgents.enabled set to false turns that off)
Enterpriseagents/<name>.md in the .github-private repo of an org designated in enterprise settingsGitHub.com, IDEs
Plugin<plugin>/agents/Copilot CLI

VS Code's file-locations table lists .agent.md or .md files for .github/agents and ~/.copilot/agents; prefer .agent.md. The Local harness stores user-level agents in VS Code profile storage instead, separate from ~/.copilot/agents and ~/.claude/agents; move them to the folder the selected harness reads to reuse them.

The filename (minus .md / .agent.md) is the agent's ID and is used for deduplication. On name conflicts the lowest (most specific) level wins: repository over organization, organization over enterprise.

[!NOTE] In Copilot CLI, a user-level agent (~/.copilot/agents/) overrides a project agent with the same ID. The full priority order is in references/frontmatter-reference.md.


Tools

tools: ["read", "search"]          # specific tools (least privilege)
tools: ["*"]                       # all tools (same as omitting tools)
tools: []                          # no tools
tools: ["read", "my-server/*"]     # alias + all tools from an MCP server

Portable aliases: execute, read, edit, search, agent, web, todo. Unrecognized tool names are ignored, so one profile can list surface-specific tools. Apply least privilege: start read-only and add write/execute tools only when required.

[!TIP] For the alias table, VS Code tool names and the deprecated tool-set files, MCP namespacing, and CLI behavior, load references/tools-reference.md.


Model

model: Claude Sonnet 5                     # VS Code / IDEs: display name
model: ["Claude Opus 5", "GPT-5.5"]        # VS Code: prioritized fallback list
model: gpt-5.6-luna                       # Copilot CLI: model ID
reasoning-effort: high                     # VS Code, Copilot harness: low | medium | high | xhigh | max

Model names differ by surface (display names in VS Code, lowercase IDs in the CLI) and the model roster changes often. Check the supported models page, including its retirement table, before pinning a model.


Handoffs (VS Code / IDEs)

Ignored on GitHub.com's cloud agent. In VS Code they apply to the Local harness only. After a response, handoff buttons let the user switch to another agent with a pre-filled prompt.

handoffs:
  - label: Start Implementation
    agent: implementation
    prompt: Implement the plan outlined above.
    send: false

Subagents (VS Code and Copilot CLI)

In VS Code, a coordinating agent lists allowed subagents in agents and must include the agent tool:

tools: ["agent", "read", "search"]
agents: ["Researcher", "Implementer"]   # ["*"] or omit = all, [] = none
  • user-invocable: false hides an agent from the picker (subagent/programmatic use only).
  • disable-model-invocation: true stops other agents (VS Code) or the cloud agent (GitHub.com) from auto-selecting it. In VS Code, explicitly listing the agent in a coordinator's agents overrides this.
  • In Copilot CLI, the main agent can run any custom agent as a subagent by inference. Add include-custom-instructions: true if the subagent should read AGENTS.md / copilot-instructions.md / CLAUDE.md.

Writing the Prompt Body

# Agent Name

You are a [role] focused on [domain]. Your scope is limited to [specific boundaries].

## Responsibilities

- [What it does]
- [What it hands off, not handles]

## Constraints

- Do not modify [out-of-scope files/systems]
- When [situation], [action]

Key principles: state scope explicitly, use imperative language, define handoff conditions, stay well under 30,000 characters.

[!TIP] For detailed principles, anti-patterns, and guidance on what NOT to include, load references/prompt-writing-guide.md.


Creating an Agent Profile: Step-by-Step

Step 1: Plan

  1. Define the role and domain (one sentence)
  2. List responsibilities and what it does NOT do
  3. Choose the surfaces (target) and scope (repository, user, org)
  4. Identify required tools, starting read-only

Step 2: Create the File

VS Code:

  1. Select the agent harness you intend to use with the Session Target control, then open the Agent Customizations editor: Open Customizations in the Chat view title bar (or the Customizations panel in the Agents window), then Agents
  2. Select New Agent (plus icon) next to the Workspace or User group, or run Chat: New Custom Agent from the Command Palette
  3. To generate one with AI, describe the agent in the editor's Overview section, or, in a Local harness session, type /create-agent <description> in chat

GitHub.com (cloud agent):

  1. Go to github.com/copilot/agents, select the repository (and optionally branch) in the prompt box
  2. Click the Copilot icon → Create an agent to open a my-agent.agent.md template in .github/agents
  3. For org/enterprise agents, remove the .github/ part of the path so the file lives in the root agents/ directory
  4. Rename, configure, commit, and merge into the default branch

Copilot CLI:

  1. In interactive mode, enter /agent, then press N to create a new agent
  2. Choose Project (.github/agents/) or User (~/.copilot/agents/)
  3. Let Copilot generate the profile or fill it in manually, choose tools, then restart the CLI

Manually: create .github/agents/<name>.agent.md. Filename characters: ., -, _, a-z, A-Z, 0-9. Prefer lowercase with hyphens.

Step 3: Write Frontmatter

---
name: api-reviewer
description: Reviews REST API designs for correctness and security. Does not implement code.
tools: ["read", "search"]
---

Step 4: Write the Prompt Body

Follow the template above. Be specific about scope and handoff conditions.

Step 5: Test

  1. Select the agent: VS Code agents dropdown, GitHub.com agents panel or issue assignment, or copilot --agent <name> / /agent in the CLI
  2. Run representative prompts covering normal use and edge cases
  3. Verify scope boundaries and tool restrictions are respected
  4. Confirm handoffs and subagent delegation work where used
  5. In VS Code, check load errors in the chat customization diagnostics (right-click the Chat view → Diagnostics)

Security Considerations

  • Least privilege for tools. Read-only agents cannot accidentally modify files or run commands.
  • Review shared agents. Audit tool lists and prompts before committing to a repository.
  • Secrets in MCP config. Use ${{ secrets.NAME }} / ${{ vars.NAME }} (configured as Agents secrets/variables). Never hardcode credentials.
  • Organization and enterprise agents. They are available to every repo in scope. Review them carefully.
  • Added directories (CLI). Agents under a directory added with --add-dir load as trusted configuration.

Reference Files

FileWhen to Load
references/frontmatter-reference.mdFull property tables, surface compatibility, model naming, handoffs, hooks, MCP config, CLI-only fields, Claude format
references/tools-reference.mdTool aliases, VS Code tool names, deprecated tool sets, MCP namespacing, out-of-the-box MCP servers
references/prompt-writing-guide.mdDetailed prompt principles, anti-patterns, output format guidance
references/workspace-agent-example.agent.mdVS Code workspace agent with handoffs and model fallback
references/user-profile-agent-example.agent.mdMinimal personal agent
references/cloud-agent-with-mcp-example.agent.mdGitHub.com cloud agent with MCP config and metadata

Official Documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.