Use repository instructions for durable rules, a skill for a repeatable workflow, and a custom agent for a named specialist. These features complement one another. They are not three names for the same thing.
If you are starting with GitHub Copilot CLI, resist the urge to create a specialist for every preference. Start with the smallest customization that solves a real problem. Add another layer when the work needs it.
Version scope: Documentation reviewed on November 18, 2026, using Copilot CLI 1.0.114 build help and GitHub's current CLI documentation. The stable release and the installed build matter: shared Copilot configuration references can describe behavior from other hosts. The examples below are illustrative configurations, not claims that they were loaded and exercised end to end.
Choose the Right Customization
GitHub's customization comparison distinguishes guidance, tools, roles, and distribution:
| Need | Start with | Main tradeoff |
|---|---|---|
| Apply broadly relevant repository conventions | Custom instructions | Consistent context, but too much text distracts from the task |
| Follow a detailed process for a particular task | Skill | Relevant workflow context, but activation still matters |
| Select or delegate to a specialist | Custom agent | Clearer role and tool configuration, with another profile to maintain |
| Connect to an external system | MCP server | New capabilities, credentials, and permissions to govern |
| Run a check at a lifecycle event | Hook | Executable logic rather than model guidance, with execution and failure costs |
| Distribute a reusable customization bundle | Plugin | Shared packaging and updates, with a larger trust surface |
Instructions and skills guide behavior. Tools provide capabilities. A custom agent packages a role and its configuration. None of those descriptions alone establishes an operating-system security boundary.
That separation is useful in agent systems built with Microsoft Agent Framework too. Do not bury durable policy inside a workflow that may never be selected.
Put Durable Rules in Custom Instructions
For repository-wide Copilot guidance, use .github\copilot-instructions.md. AGENTS.md is another supported source. With the default Copilot home, personal guidance can live in $HOME\.copilot\copilot-instructions.md.
The CLI instruction guide also documents CLAUDE.md, GEMINI.md, modular instruction files, and additional locations. You do not need to use every supported file format.
A small instruction file might contain:
## Repository rules
- Inspect existing conventions before changing code.
- Add focused coverage for non-trivial behavior changes.
- Keep public API changes explicit.
- Report which validation was performed and what remains unverified.
These are proposed team rules, not special Copilot keywords.
When multiple applicable instruction files exist, the CLI combines them. It does not define a general precedence order that makes contradictory guidance a good idea. Keep one clear source for each rule where possible.
Path-scoped .github\instructions\**\*.instructions.md files can use applyTo to target matching files. They are not all unconditional, always-loaded context. Use /instructions to inspect the discovered files in an interactive session.
You can generate starter repository guidance with:
copilot init
Review the generated file before keeping it. Generation is a starting point, not proof that the instructions describe your project accurately.
Keep stable conventions here. A detailed migration checklist that matters for one task belongs somewhere more selective.
Put Repeatable Workflows in Skills
A skill is a directory containing a file named exactly SKILL.md, optionally alongside scripts, templates, and examples.
GitHub's skill guide documents these project locations: .github\skills, .agents\skills, and .claude\skills. Personal locations include $HOME\.copilot\skills and $HOME\.agents\skills. Plugins and configured additional directories can supply skills too.
For a first skill, choose a narrow workflow. For example, put the following file at .github\skills\article-check\SKILL.md:
---
name: article-check
description: Review an article for technical claims requiring evidence. Use when asked to check a repository article before publication.
---
Read the requested article without changing it.
1. List material technical claims and the versions they concern.
2. Identify official sources needed to evaluate those claims.
3. Separate verified claims from unsupported or conflicting claims.
4. Return findings with article locations and the evidence still needed.
Do not invent citations or report a command as tested unless it was executed.
The required frontmatter fields are name and description. Use a lowercase, hyphenated skill name and directory name. The description should explain both the job and when the skill is relevant.
This example defines a review procedure. It does not fetch evidence by magic or make the model's conclusions correct. The available tools and permissions still determine what work can actually be done.
Make Activation Visible
Copilot can select a skill based on the request and its description. You can also request one explicitly in an interactive CLI session:
Use the /article-check skill to review C:\work\example-repo\articles\example.md.
Replace the example path with an actual readable article. This is a prompt inside Copilot, not a command to paste directly into PowerShell.
After adding a skill during a session, use /skills reload. /skills list shows available skills. Outside an interactive session, use:
copilot skill list
The bundled 1.0.114 /skills help and the web guide do not present exactly the same inspection subcommands. Use your installed command help for any additional inspection operation rather than copying /skills info as a universal command.
Keep Supporting Resources Focused
A skill can refer to adjacent resources, for example:
.github\skills\article-check\SKILL.md
.github\skills\article-check\claim-checklist.md
Those files being available does not mean every supporting document is permanently inserted into every prompt. The selected skill's instructions load when it is used; additional resources support that workflow.
GitHub also documents an optional allowed-tools field for pre-approving tools. Do not add broad shell approval merely to avoid prompts. Review the skill, its scripts, and its source first. A skill from someone else is executable-workflow input when it tells an agent to run code, not just a harmless text download.
Put a Specialist Role in a Custom Agent
A custom agent has a Markdown profile, conventionally using the .agent.md extension. Repository profiles can live in .github\agents; personal profiles can live in $HOME\.copilot\agents.
The CLI-specific agent guide describes creating one with /agent or writing the file manually. Restart the CLI after creating a profile so it loads the new agent.
Here is an illustrative .github\agents\documentation-reviewer.agent.md:
---
name: documentation-reviewer
description: Review repository documentation for unclear instructions and evidence gaps without changing files.
tools: ["read", "search"]
include-custom-instructions: true
---
Review only the requested documentation.
Return specific findings with file locations and supporting evidence.
Do not modify files or run commands.
State uncertainty when a claim cannot be verified with the available tools.
read and search are documented tool aliases for reading and repository search. The tools field declares the intended tool configuration; the prose tells the specialist how to behave.
Do not describe that snippet alone as a certified read-only boundary. GitHub's shared reference and CLI-specific material differ in their treatment of default tools; the CLI guide also describes strict-tools-list for suppressing usual default tools. Verify your build's effective tools before relying on exclusivity. Tool availability, execution approval, and OS-level isolation are separate controls.
I have not shown a skill invocation inside this restricted profile. Access to skill activation and external documentation is another capability to verify; file reading and repository search do not automatically provide it.
For deeper tool and delegation design, advanced Copilot SDK patterns cover the corresponding builder-side questions.
Invoke the Profile by Its ID
Inside Copilot, use /agent to select a profile. You can also ask for a named specialist in plain language. The main agent may infer a suitable custom agent from its description.
For programmatic use, the file above has the ID documentation-reviewer:
copilot --agent documentation-reviewer -p "Review C:\work\example-repo\articles\example.md and return findings without changing files."
The ID comes from the file path, not necessarily its display name. A profile at .github\agents\team\documentation-reviewer.agent.md has the ID team--documentation-reviewer.
The CLI can also select agents by the name value. Prefer an unambiguous ID: a personal profile with the same ID takes priority over a repository profile. Editing the repository file may not change the specialist you actually invoke.
A Session Agent Is Not the Same as a Delegated Subagent
Selecting a custom agent for the session and delegating work to one are different operations.
When the main agent delegates, the subagent has its own conversation context. That helps contain intermediate research and execution output. It does not make a second agent a separate operating-system user or isolated machine.
Repository-instruction inheritance also differs. The CLI command reference documents that a custom agent running as a subagent does not receive repository instructions by default. include-custom-instructions: true opts it in.
A custom agent selected for the main session already follows the applicable repository instructions. The field above matters for delegation. Starting with --no-custom-instructions takes precedence even when that field is enabled.
This is an important reason to make expectations explicit. A repository rule is not automatically inherited by every specialist merely because its profile lives in the same repository.
Compose the Layers Without Duplicating Them
Suppose your team wants documentation checked before a release:
| Layer | Responsibility |
|---|---|
| Repository instructions | State that changed public behavior needs accurate documentation |
article-check skill |
Define the repeatable claim-and-evidence review procedure |
| Documentation reviewer | Define the specialist role and intended tool configuration |
| Permission configuration | Decide which tool requests are approved |
| Execution environment | Limit what running commands or integrations can reach |
That is a proposed organization, not a promise that every combination works without checking capabilities. A specialist needs a way to load the skill and the tools needed to follow it.
If a checklist is enough, start with a skill. If the role needs independent context or a distinct tool configuration, add a custom agent. Duplicating the same long procedure in every file creates more places for it to drift.
When you are building an AI CLI with the Copilot SDK, the same distinction helps: workflow, tool execution, and specialization are different responsibilities.
Add Hooks and Plugins When the Problem Requires Them
Hooks run code at lifecycle events. That is different from asking a model to follow instructions. A preToolUse hook can inspect an action before execution; it still needs correct implementation and trustworthy configuration.
Plugins package reusable customizations such as skills, agents, hooks, and MCP configuration. They are useful when distribution becomes a real problem, not a prerequisite for your first local skill.
Review third-party resources before installing them. A short Markdown file may point to scripts, broad approvals, or external services. Treat those dependencies as part of the thing you are trusting.
For the approval and isolation side, the Copilot CLI permission model explains why a persona is not a sandbox.
Check Behavior Before Expanding the Setup
Start with one instruction file, one useful skill, and a specialist only if it adds something the skill does not.
Then check the actual behavior:
- Confirm which instructions, skills, and agent profile are discovered.
- Request the skill or agent explicitly before relying on automatic selection.
- Inspect the effective tools and approval prompts.
- Try an allowed task and a task the configuration should refuse in a controlled environment.
- Record what worked, what was denied, and what remains unverified.
This is an adoption checklist, not a claim that those checks have already been performed for the examples above.
Use representative agent evaluations rather than judging a setup by how impressive its prompt sounds. The aim is less repeated steering and clearer responsibility, not the largest collection of agent files.
FAQ
Are custom agents the same as skills?
No. A skill supplies a reusable task workflow. A custom agent supplies a specialist profile and configuration; when delegated to, it runs in its own conversation context.
Where do I put a .agent.md file?
Use .github\agents for a repository profile or $HOME\.copilot\agents for a personal profile with the default Copilot home. Use a clear file name such as documentation-reviewer.agent.md, then restart the CLI.
Where do I put SKILL.md?
Put it in its own skill directory, such as .github\skills\article-check\SKILL.md. Personal and other project skill locations are also supported. The file name must be exactly SKILL.md.
Should I use AGENTS.md or .github\copilot-instructions.md?
Either can hold applicable repository guidance. The CLI can combine them; keep the rules consistent rather than assuming one universally overrides the other.
How do I invoke a custom agent?
In an interactive session, use /agent. From a terminal, use copilot --agent documentation-reviewer -p "Review the requested documentation." after loading the corresponding profile.
Do custom subagents inherit all repository rules automatically?
No. Use include-custom-instructions: true when a delegated custom agent needs repository instructions. The setting does not override --no-custom-instructions or automatically import every extra instruction directory used by the main session.
Can custom agents use MCP tools?
Yes, MCP configuration can provide external tools. Review the host-specific configuration, tool selection, approvals, and credentials. Do not add an external capability unless the specialist's task actually requires it.
When should I avoid a custom agent?
When a short instruction or a focused workflow is enough. A custom agent adds value through specialization, context separation, or tool configuration -- not simply by having another file with a role name.




