Skip to content

Commit 40f44fc

Browse files
saritaiCopilot
andauthored
Update prompt file + custom agents examples in customization library (#59070)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d6a5efa commit 40f44fc

File tree

9 files changed

+51
-6
lines changed

9 files changed

+51
-6
lines changed

content/copilot/tutorials/customization-library/custom-agents/bug-fix-teammate.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,19 @@ You are a bug-fixing specialist focused on resolving issues in the codebase with
6161
Your goal is to make the codebase more stable and reliable by implementing working fixes, not just identifying problems.
6262
```
6363

64+
## How to use this {% data variables.copilot.copilot_custom_agent_short %}
65+
66+
1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text).
67+
1. Using the dropdown menus in the text box, select the repository and branch you want the custom agent to work in.
68+
1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**.
69+
1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `bug-fix-teammate.agent.md` and paste in the example {% data variables.copilot.agent_profile %}.
70+
1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "bug-fix-teammate" agent from the dropdown.
71+
1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %} Start task** or press <kbd>Return</kbd>.
72+
73+
```copilot copy
74+
Scan the repository for the most critical bug, then implement a targeted fix and explain your approach.
75+
```
76+
77+
The agent task will appear on the page below the text box. You can click into the task and follow along with the agent. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/track-copilot-sessions).
78+
6479
{% data reusables.copilot.custom-agents-further-reading %}

content/copilot/tutorials/customization-library/custom-agents/cleanup-specialist.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,19 @@ You are a cleanup specialist focused on making codebases cleaner and more mainta
7171
Focus on cleaning up existing code rather than adding new features. Work on both code files (.js, .py, etc.) and documentation files (.md, .txt, etc.) when removing duplication and improving consistency.
7272
```
7373

74+
## How to use this {% data variables.copilot.copilot_custom_agent_short %}
75+
76+
1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text).
77+
1. Using the dropdown menus in the text box, select the repository and branch you want the custom agent to work in.
78+
1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**.
79+
1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `cleanup-specialist.agent.md` and paste in the example {% data variables.copilot.agent_profile %}.
80+
1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "cleanup-specialist" agent from the dropdown.
81+
1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %} Start task** or press <kbd>Return</kbd>.
82+
83+
```copilot copy
84+
Refactor and clean up any messy or inconsistent code in the `src/utils` directory, then document the improvements you made.
85+
```
86+
87+
The agent task will appear on the page below the text box. You can click into the task and follow along with the agent. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/track-copilot-sessions).
88+
7489
{% data reusables.copilot.custom-agents-further-reading %}

content/copilot/tutorials/customization-library/custom-agents/implementation-planner.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,19 @@ For each phase, list specific tasks with complexity estimates (Small/Medium/Larg
7575
Adjust the detail level based on your needs - solo projects might need less formal documentation, while team projects benefit from more thorough planning. Focus on creating a roadmap that helps you stay organized and make progress.
7676
```
7777

78+
## How to use this {% data variables.copilot.copilot_custom_agent_short %}
79+
80+
1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text).
81+
1. Using the dropdown menus in the text box, select the repository and branch you want the custom agent to work in.
82+
1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**.
83+
1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `implementation-planner.agent.md` and paste in the example {% data variables.copilot.agent_profile %}.
84+
1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "implementation-planner" agent from the dropdown.
85+
1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %} Start task** or press <kbd>Return</kbd>.
86+
87+
```copilot copy
88+
Create a detailed implementation plan for adding user authentication to our web app, including technical approach, phases, and risk assessment.
89+
```
90+
91+
The agent task will appear on the page below the text box. You can click into the task and follow along with the agent. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/track-copilot-sessions).
92+
7893
{% data reusables.copilot.custom-agents-further-reading %}

content/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Test this agent by giving it a task to complete:
7474

7575
1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text).
7676
1. Using the dropdown menus in the text box, select the repository and branch you're comfortable testing with (ideally one with a minimal or outdated README).
77-
1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create an agent**.
77+
1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**.
7878
1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `readme-specialist.agent.md` and paste in the example {% data variables.copilot.agent_profile %}.
7979
1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "readme-specialist" agent from the dropdown.
8080
1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %} Start task** or press <kbd>Return</kbd>.

content/copilot/tutorials/customization-library/prompt-files/document-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This prompt file generates OpenAPI 3.0 specifications for REST API endpoints by
2323

2424
```text copy
2525
---
26-
mode: 'agent'
26+
agent: 'agent'
2727
description: 'Generate OpenAPI 3.0 specification for API endpoints'
2828
---
2929

content/copilot/tutorials/customization-library/prompt-files/generate-unit-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This prompt file generates focused unit tests for specific functions or methods,
2323

2424
```text copy
2525
---
26-
mode: 'agent'
26+
agent: 'agent'
2727
description: 'Generate unit tests for selected functions or methods'
2828
---
2929

content/copilot/tutorials/customization-library/prompt-files/onboarding-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ contentType: tutorials
2121

2222
```text copy
2323
---
24-
mode: 'agent'
24+
agent: 'agent'
2525
description: 'Help new team members onboard with a phased plan and suggestions for first tasks.'
2626
---
2727

content/copilot/tutorials/customization-library/prompt-files/review-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can also use {% data variables.copilot.copilot_code-review_short %} in {% da
2525

2626
```text copy
2727
---
28-
mode: 'agent'
28+
agent: 'agent'
2929
description: 'Perform a comprehensive code review'
3030
---
3131

content/copilot/tutorials/customization-library/prompt-files/your-first-prompt-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Start with this simple prompt file that helps you write clear, well-documented c
3232

3333
```text copy
3434
---
35-
mode: 'agent'
35+
agent: 'agent'
3636
description: 'Generate a clear code explanation with examples'
3737
---
3838

0 commit comments

Comments
 (0)