Skip to content

Commit e570d59

Browse files
authored
Merge pull request #43215 from github/repo-sync
Repo sync
2 parents e165ddc + f3d979e commit e570d59

File tree

8 files changed

+262
-47
lines changed

8 files changed

+262
-47
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Docs changelog
22

3+
**3 March 2026**
4+
5+
We've added a new reference article, [Copilot customization cheat sheet](https://docs.github.com/copilot/reference/customization-cheat-sheet), to help you choose the right Copilot customization approach for your workflow.
6+
7+
The article compares Copilot customization options, including what each one does, how to configure it, and where it is supported across IDEs and Copilot surfaces. It also explains what each option is best for, with common use cases to help you decide what to use.
8+
9+
<hr>
10+
311
**2 March 2026**
412

513
We've added an article about the new `/research` slash command in Copilot CLI:

content/copilot/how-tos/copilot-cli/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: '{% data variables.copilot.copilot_cli %}'
33
shortTitle: '{% data variables.copilot.copilot_cli_short %}'
4-
intro: 'Use {% data variables.product.prodname_copilot_short %} directly from your terminal to answer questions, write and debug code, and interact with {% data variables.product.github %}.'
4+
intro: Use {% data variables.product.prodname_copilot_short %} directly from your terminal to answer questions, write and debug code, and interact with {% data variables.product.github %}.
55
versions:
66
feature: copilot
77
contentType: landing
@@ -21,7 +21,7 @@ children:
2121
- /cli-best-practices
2222
- /set-up-copilot-cli
2323
- /customize-copilot
24-
- /use-copilot-cli
24+
- /use-copilot-cli-agents
2525
- /administer-copilot-cli-for-your-enterprise
2626
- /automate-with-actions
2727
- /speeding-up-task-completion
@@ -50,7 +50,7 @@ children:
5050
- /content/copilot/responsible-use/copilot-cli
5151
carousels:
5252
recommended:
53-
- /copilot/how-tos/copilot-cli/use-copilot-cli
53+
- /copilot/how-tos/copilot-cli/use-copilot-cli-agents/overview
5454
- /copilot/how-tos/copilot-cli/cli-best-practices
5555
- /copilot/reference/cli-command-reference
5656
includedCategories:
@@ -60,3 +60,4 @@ includedCategories:
6060
- Build with Copilot CLI
6161
- Administer Copilot CLI
6262
---
63+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Requesting a code review with {% data variables.copilot.copilot_cli %}
3+
shortTitle: Agentic code review
4+
allowTitleToDifferFromFilename: true
5+
intro: 'Use {% data variables.copilot.copilot_cli_short %} to review your code changes directly from the terminal.'
6+
product: '{% data reusables.gated-features.copilot-cli %}'
7+
versions:
8+
feature: copilot
9+
topics:
10+
- Copilot
11+
contentType: how-tos
12+
category:
13+
- Build with Copilot CLI
14+
---
15+
16+
## About agentic code review
17+
18+
You can use the `/review` slash command to have {% data variables.product.prodname_copilot_short %} analyze code changes without leaving the CLI. This lets you get quick feedback on your changes prior to committing.
19+
20+
1. Type `/review` and optionally specify a prompt, path, or file pattern to narrow the review scope, then press <kbd>Enter</kbd>.
21+
1. If {% data variables.product.prodname_copilot_short %} proposes running a command (for example, to inspect a diff or verify a file), review the command, then use the arrow keys to choose an option and press <kbd>Enter</kbd>.
22+
* Select **Yes** to run the command.
23+
* Select **No** to skip the command and tell {% data variables.product.prodname_copilot_short %} what to do differently.
24+
1. Read the feedback that {% data variables.product.prodname_copilot_short %} provides about your changes and apply any suggested improvements in your code editor.
25+
26+
## Further reading
27+
28+
* [AUTOTITLE](/copilot/how-tos/copilot-cli/automate-with-actions)
29+
* [AUTOTITLE](/copilot/how-tos/copilot-cli/add-custom-instructions)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Delegating tasks to {% data variables.copilot.copilot_cli %}
3+
shortTitle: Delegate tasks to Copilot
4+
intro: Use {% data variables.copilot.copilot_cli_short %}''s autopilot mode to hand off tasks and have {% data variables.product.prodname_copilot_short %} work autonomously on your behalf.
5+
allowTitleToDifferFromFilename: true
6+
product: '{% data reusables.gated-features.copilot-cli %}'
7+
versions:
8+
feature: copilot
9+
topics:
10+
- Copilot
11+
contentType: how-tos
12+
category:
13+
- Build with Copilot CLI
14+
---
15+
16+
## Get {% data variables.product.prodname_copilot_short %} to work autonomously
17+
18+
You can tell {% data variables.product.prodname_copilot_short %} to use its best judgment to complete a task autonomously, rather than the CLI prompting you for input at each decision point within a task. You do this by using the CLI's autopilot mode.
19+
20+
There are two ways to use autopilot mode:
21+
22+
* **Interactively:** In an interactive session, press <kbd>Shift</kbd>+<kbd>Tab</kbd> until you see "autopilot" in the status bar. If prompted to choose permissions for autopilot mode, allow full permissions, then enter your prompt.
23+
* **Programmatically:** Pass the CLI a prompt directly in a command, and include the `--autopilot` option. For example, to use autopilot mode with full permissions, restricting it to 10 continuations, enter `{% data reusables.cli.autopilot-programmatic-prompt %}`.
24+
25+
For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autopilot).
26+
27+
## Delegate tasks to {% data variables.copilot.copilot_coding_agent %}
28+
29+
The delegate command lets you push your current session to {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.github %}. This lets you hand off work while preserving all the context {% data variables.product.prodname_copilot_short %} needs to complete your task.
30+
31+
You can delegate a task using the slash command, followed by a prompt:
32+
33+
```shell
34+
/delegate complete the API integration tests and fix any failing edge cases
35+
```
36+
37+
Alternatively, prefix a prompt with `&` to delegate it:
38+
39+
```shell
40+
& complete the API integration tests and fix any failing edge cases
41+
```
42+
43+
{% data variables.product.prodname_copilot_short %} will ask to commit any of your unstaged changes as a checkpoint in a new branch it creates. {% data variables.copilot.copilot_coding_agent %} will open a draft pull request, make changes in the background, and request a review from you.
44+
45+
{% data variables.product.prodname_copilot_short %} will provide a link to the pull request and agent session on {% data variables.product.github %} once the session begins.
46+
47+
## Next steps
48+
49+
To learn how to invoke specialized agents tailored to specific tasks, such as code review, documentation, or security audits, see [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli-agents/invoke-custom-agents).
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Use {% data variables.copilot.copilot_cli %} agents
3+
shortTitle: Use Copilot CLI agents
4+
intro: Understand the different ways you can use agents in {% data variables.copilot.copilot_cli_short %} to delegate and automate work.
5+
versions:
6+
feature: copilot
7+
topics:
8+
- Copilot
9+
children:
10+
- /overview
11+
- /delegate-tasks-to-cca
12+
- /invoke-custom-agents
13+
- /steer-agents
14+
- /agentic-code-review
15+
contentType: how-tos
16+
---
17+
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Invoking custom agents
3+
shortTitle: Invoke custom agents
4+
intro: Use custom agents, skills, and MCP servers in {% data variables.copilot.copilot_cli_short %} to extend its capabilities.
5+
product: '{% data reusables.gated-features.copilot-cli %}'
6+
versions:
7+
feature: copilot
8+
topics:
9+
- Copilot
10+
contentType: how-tos
11+
category:
12+
- Build with Copilot CLI
13+
---
14+
15+
## Use {% data variables.copilot.custom_agents_short %}
16+
17+
A {% data variables.copilot.copilot_custom_agent_short %} is a specialized version of {% data variables.product.prodname_copilot_short %}. {% data variables.copilot.custom_agents_caps_short %} help {% data variables.product.prodname_copilot_short %} handle unique workflows, particular coding conventions, and specialist use cases.
18+
19+
{% data variables.copilot.copilot_cli_short %} includes a default group of {% data variables.copilot.custom_agents_short %} for common tasks:
20+
21+
<table>
22+
<thead>
23+
<tr>
24+
<th style="width:20%">Agent</th>
25+
<th>Description</th>
26+
</tr>
27+
</thead>
28+
<tbody>
29+
<tr>
30+
<td>Explore</td>
31+
<td>Performs quick codebase analysis, allowing you to ask questions about your code without adding to your main context.</td>
32+
</tr>
33+
<tr>
34+
<td>Task</td>
35+
<td>Executes commands such as tests and builds, providing brief summaries on success and full output on failure.</td>
36+
</tr>
37+
<tr>
38+
<td>General-purpose</td>
39+
<td>Handles complex, multi-step tasks that require the full toolset and high-quality reasoning, running in a separate context to keep your main conversation clearly focused.</td>
40+
</tr>
41+
<tr>
42+
<td>Code-review</td>
43+
<td>Reviews changes with a focus on surfacing only genuine issues, minimizing noise.</td>
44+
</tr>
45+
</tbody>
46+
</table>
47+
48+
The AI model being used by the CLI can choose to delegate a task to a subsidiary subagent process, that operates using a {% data variables.copilot.copilot_custom_agent_short %} with specific expertise, if it judges that this would result in the work being completed more effectively. The model may equally choose to handle the work directly in the main agent.
49+
50+
You can define your own {% data variables.copilot.custom_agents_short %} using Markdown files, called {% data variables.copilot.agent_profiles %}, that specify what expertise the agent should have, what tools it can use, and any specific instructions for how it should respond.
51+
52+
You can define {% data variables.copilot.custom_agents_short %} at the user, repository, or organization/enterprise level:
53+
54+
| Type | Location | Scope |
55+
| --- | --- | --- |
56+
| User-level {% data variables.copilot.copilot_custom_agent_short %} | local `~/.copilot/agents` directory | All projects |
57+
| Repository-level {% data variables.copilot.copilot_custom_agent_short %} | `.github/agents` directory in your local and remote repositories | Current project |
58+
| Organization and Enterprise-level {% data variables.copilot.copilot_custom_agent_short %} | `/agents` directory in the `.github-private` repository in an organization or enterprise | All projects under your organization and enterprise account |
59+
60+
In the case of naming conflicts, a system-level agent overrides a repository-level agent, and the repository-level agent would override an organization-level agent.
61+
62+
{% data variables.copilot.custom_agents_caps_short %} can be used in three ways:
63+
64+
* Using the slash command in the CLI's interactive interface to select from the list of available {% data variables.copilot.custom_agents_short %}:
65+
66+
```shell
67+
/agent
68+
```
69+
70+
* Calling out to the {% data variables.copilot.copilot_custom_agent_short %} directly in a prompt:
71+
72+
```shell
73+
Use the refactoring agent to refactor this code block
74+
```
75+
76+
{% data variables.product.prodname_copilot_short %} will automatically infer the agent you want to use.
77+
78+
* Specifying the {% data variables.copilot.copilot_custom_agent_short %} you want to use with the command-line option. For example:
79+
80+
```shell
81+
copilot --agent=refactor-agent --prompt "Refactor this code block"
82+
```
83+
84+
For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents).
85+
86+
## Use skills
87+
88+
You can create skills to enhance the ability of {% data variables.product.prodname_copilot_short %} to perform specialized tasks with instructions, scripts, and resources.
89+
90+
For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills).
91+
92+
## Add an MCP server
93+
94+
{% data variables.copilot.copilot_cli_short %} comes with the {% data variables.product.github %} MCP server already configured. This MCP server allows you to interact with resources on {% data variables.product.prodname_dotcom_the_website %}—for example, allowing you to merge pull requests from the CLI.
95+
96+
To extend the functionality available to you in {% data variables.copilot.copilot_cli_short %}, you can add more MCP servers:
97+
98+
1. Use the following slash command:
99+
100+
```shell
101+
/mcp add
102+
```
103+
104+
1. Fill in the details for the MCP server you want to add, using the <kbd>Tab</kbd> key to move between fields.
105+
1. Press <kbd>Ctrl</kbd>+<kbd>S</kbd> to save the details.
106+
107+
Details of your configured MCP servers are stored in the `mcp-config.json` file, which is located, by default, in the `~/.copilot` directory. This location can be changed by setting the `XDG_CONFIG_HOME` environment variable. For information about the JSON structure of a server definition, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#writing-a-json-configuration-for-mcp-servers).
108+
109+
For more detailed information on adding and managing MCP servers in {% data variables.copilot.copilot_cli_short %}, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers).
110+
111+
## Next steps
112+
113+
To learn how to guide and refine agent behavior during task execution to keep work on track, see [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli-agents/steer-agents).

0 commit comments

Comments
 (0)