All 5 AI packs for $39 →
← All posts
How-to · Coding · GitHub Copilot

GitHub Copilot custom agents vs agent skills vs instructions: which file goes where

Published · Facts checked against official vendor pages on November 19, 2026 · Rankings are independent of sponsorships

Customizing GitHub Copilot used to mean one file, .github/copilot-instructions.md. Now there are repository instructions, path-specific instructions, AGENTS.md, custom agents and agent skills, plus prompt files in VS Code, and they overlap enough that it's easy to put a rule in the wrong place. This guide sorts them out using GitHub's and VS Code's own docs, checked on November 19, 2026, with a free example of each in our library.

Tools in this post

The short version

Rules for every request go in .github/copilot-instructions.md, or in an AGENTS.md if you also use Codex, Cursor or other agents.

Rules for some files go in .github/instructions/NAME.instructions.md with an applyTo glob.

A specialist you pick from a menu is a custom agent: .github/agents/NAME.agent.md, with its own prompt and tool list.

A detailed workflow Copilot loads only when it's relevant is an agent skill: .github/skills/NAME/SKILL.md, optionally with scripts.

Prompt files (.github/prompts/NAME.prompt.md) still work in VS Code's Local harness, but VS Code has deprecated that harness for removal in February 2027 and tells you to build new workflows as skills.

Instructions: always on, so keep them short

Repository instructions in .github/copilot-instructions.md are added to every request in the repo. Path-specific files in .github/instructions/ are added when the file Copilot is working on matches their applyTo glob, and when both match, Copilot uses both. On GitHub.com, GitHub's docs say path-specific instructions are read by Copilot cloud agent and Copilot code review, and an excludeAgent key lets you keep a file away from one of them.

AGENTS.md is the cross-tool option. GitHub's docs say you can put AGENTS.md files anywhere in the repository and the nearest one in the directory tree takes precedence. That makes nested files a clean fit for monorepos, where each package needs its own commands; our free AGENTS.md for a Python uv workspace is written for exactly that layout. Codex handles nested files a little differently: it joins every AGENTS.md from the repo root down to the folder it's working in, so the closest file's rules come last and win.

Because instructions ride along on every request, GitHub recommends them for simple rules that apply to almost every task, such as coding standards. Anything long or task-specific belongs in a skill. Our free copilot-instructions.md for Next.js, Tailwind v4 instructions and code review instructions show both kinds of instruction file.

Custom agents: a specialist with its own tools

A custom agent is a Markdown file with YAML frontmatter in .github/agents/, named NAME.agent.md. After you merge it into the default branch, it appears in the agent dropdown on GitHub.com, so you can choose it when you start a cloud agent task or assign an issue to Copilot, and Copilot CLI users can pick it with /agent. When Copilot opens a pull request, the description notes which custom agent did the work. Organization owners can also publish agents for every repo from the organization's .github or .github-private repository.

Only description is required. The parts that make an agent different from instructions are its prompt (up to 30,000 characters) and its tools list. Leave tools out and the agent gets every tool, including MCP tools configured for the repo. List read, search and edit, and it can't run shell commands; an empty list disables tools entirely. Tool aliases are flexible, so Claude Code-style names like Bash, Grep and Glob map to Copilot's execute and search. You can set a model, but GitHub says that property applies in VS Code, JetBrains IDEs, Eclipse and Xcode. Set disable-model-invocation: true if you don't want Copilot choosing the agent on its own.

Our new free docs-writer custom agent is a typical example: it can read, search and edit, may only touch docs, changelogs and docstrings, and has to check every command and flag it documents against the code. Claude Code users will recognize the pattern from subagents like our code reviewer.

Agent skills: loaded only when they match

A skill is a folder with a SKILL.md file and anything else it needs, like a template or a script. Copilot reads the skill's description, decides whether the task needs it, and only then injects the full SKILL.md into context. That is the point: a 60-line workflow costs nothing on requests that don't use it. GitHub's docs say skills work with Copilot cloud agent, Copilot code review, Copilot CLI, the GitHub Copilot app and agent mode in VS Code.

Project skills can live in .github/skills, .claude/skills or .agents/skills, so a skill written for Claude Code in .claude/skills can be picked up by Copilot too. The frontmatter needs a name (lowercase, hyphens) and a description that says when to use it. An optional allowed-tools field pre-approves tools, but GitHub warns against pre-approving shell for any skill you haven't fully reviewed, since that removes the confirmation step before terminal commands. For code review, GitHub suggests a review-focused folder name such as code-review if you want Copilot code review to be sure to use it.

GitHub CLI 2.90.0 and later can also search, preview, install and update skills with gh skill, which is in public preview. Preview before installing: GitHub notes that skills aren't verified and can contain prompt injections or malicious scripts. Our new free PR description skill needs no scripts or pre-approved tools, and our release notes skill and ship-check skill were written for Claude Code but follow the same SKILL.md format.

Prompt files: convert them to skills before February 2027

Prompt files are .prompt.md files in .github/prompts that you run as slash commands in VS Code chat. They still work, but VS Code's docs now say they run only in Local harness sessions, that the Local harness is deprecated and will be removed in February 2027, and that you should convert existing prompt files to skills for the Copilot harness. Writing a .prompt.md file in a Copilot harness session doesn't make it runnable there.

Conversion is mostly mechanical. Move the body into .github/skills/NAME/SKILL.md, add a name and a description that says when to use it, and drop VS Code-only fields like agent and argument-hint. If the prompt relied on a specific custom agent or tool list, put that in a custom agent instead and have the skill describe the workflow.

Which one should you use?

Ask two questions. Does the rule apply to almost every task? Make it an instruction, and keep it short. Is it a whole procedure that only matters sometimes? Make it a skill. Reach for a custom agent when you need a different set of tools or a distinct role that someone will deliberately pick, like a read-only planner or a docs-only writer.

Most teams end up with one short instructions file or AGENTS.md, a few path-specific files, two or three skills and maybe one custom agent. If you use more than one coding agent, keep shared rules in AGENTS.md and see which file each agent reads and how long these files should be. To compare the agents themselves, start with GitHub Copilot, Cursor vs Claude Code vs Copilot and OpenAI Codex. For Claude Code, the paid Claude Code Agent Kit has a full set of subagents and hooks.

FAQ

Do Copilot skills work in .claude/skills?
Yes. GitHub's docs list .github/skills, .claude/skills and .agents/skills as project skill locations, and ~/.copilot/skills or ~/.agents/skills for personal skills.
What happens if a custom agent has no tools list?
It gets every available tool, including MCP server tools configured in the agent profile or repository settings. An empty list, tools: [], disables all tools.
Are VS Code prompt files going away?
VS Code's docs say prompt files run only in the Local harness, which is deprecated and due to be removed in February 2027, and recommend converting them to agent skills.
Which AGENTS.md does Copilot use in a monorepo?
GitHub's docs say the nearest AGENTS.md in the directory tree takes precedence. Codex instead concatenates the files from the repo root down to the current folder.

Free and paid rules for your agents

Related changelog

Sources

Prices change often. Always confirm on the vendor's site before buying. See the full tier lists and the changelog.

+ Your logo here