Skip to content

Commit 86adaa4

Browse files
authored
Chat Modes -> Agents (#433)
* Migrating chat modes to agents now that's been released to stable * Fixing collections * Fixing names of agents * Formatting * name too long * Escaping C# agent name
1 parent 7b7f9d5 commit 86adaa4

File tree

163 files changed

+1475
-1013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1475
-1013
lines changed

.github/copilot-instructions.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@ The following instructions are only to be applied when performing a code review.
22

33
## README updates
44

5-
* [ ] The new file should be added to the `README.md`.
5+
- [ ] The new file should be added to the `README.md`.
66

77
## Prompt file guide
88

99
**Only apply to files that end in `.prompt.md`**
1010

11-
* [ ] The prompt has markdown front matter.
12-
* [ ] The prompt has a `mode` field specified of either `agent` or `ask`.
13-
* [ ] The prompt has a `description` field.
14-
* [ ] The `description` field is not empty.
15-
* [ ] The `description` field value is wrapped in single quotes.
16-
* [ ] The file name is lower case, with words separated by hyphens.
17-
* [ ] Encourage the use of `tools`, but it's not required.
18-
* [ ] Strongly encourage the use of `model` to specify the model that the prompt is optimised for.
11+
- [ ] The prompt has markdown front matter.
12+
- [ ] The prompt has a `mode` field specified of either `agent` or `ask`.
13+
- [ ] The prompt has a `description` field.
14+
- [ ] The `description` field is not empty.
15+
- [ ] The `description` field value is wrapped in single quotes.
16+
- [ ] The file name is lower case, with words separated by hyphens.
17+
- [ ] Encourage the use of `tools`, but it's not required.
18+
- [ ] Strongly encourage the use of `model` to specify the model that the prompt is optimised for.
1919

2020
## Instruction file guide
2121

2222
**Only apply to files that end in `.instructions.md`**
2323

24-
* [ ] The instruction has markdown front matter.
25-
* [ ] The instruction has a `description` field.
26-
* [ ] The `description` field is not empty.
27-
* [ ] The `description` field value is wrapped in single quotes.
28-
* [ ] The file name is lower case, with words separated by hyphens.
29-
* [ ] The instruction has an `applyTo` field that specifies the file or files to which the instructions apply. If they wish to specify multiple file paths they should formated like `'**.js, **.ts'`.
24+
- [ ] The instruction has markdown front matter.
25+
- [ ] The instruction has a `description` field.
26+
- [ ] The `description` field is not empty.
27+
- [ ] The `description` field value is wrapped in single quotes.
28+
- [ ] The file name is lower case, with words separated by hyphens.
29+
- [ ] The instruction has an `applyTo` field that specifies the file or files to which the instructions apply. If they wish to specify multiple file paths they should formated like `'**.js, **.ts'`.
3030

3131
## Chat Mode file guide
3232

33-
**Only apply to files that end in `.chatmode.md`**
33+
**Only apply to files that end in `.agent.md`**
3434

35-
* [ ] The chat mode has markdown front matter.
36-
* [ ] The chat mode has a `description` field.
37-
* [ ] The `description` field is not empty.
38-
* [ ] The `description` field value is wrapped in single quotes.
39-
* [ ] The file name is lower case, with words separated by hyphens.
40-
* [ ] Encourage the use of `tools`, but it's not required.
41-
* [ ] Strongly encourage the use of `model` to specify the model that the chat mode is optimised for.
35+
- [ ] The chat mode has markdown front matter.
36+
- [ ] The chat mode has a `description` field.
37+
- [ ] The `description` field is not empty.
38+
- [ ] The `description` field value is wrapped in single quotes.
39+
- [ ] The file name is lower case, with words separated by hyphens.
40+
- [ ] Encourage the use of `tools`, but it's not required.
41+
- [ ] Strongly encourage the use of `model` to specify the model that the chat mode is optimised for.

.github/workflows/validate-readme.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ on:
66
paths:
77
- "instructions/**"
88
- "prompts/**"
9-
- "chatmodes/**"
9+
- "agents/**"
1010
- "collections/**"
1111
- "*.js"
12-
- "agents/**"
1312
- "README.md"
1413
- "docs/**"
1514

.schemas/collection.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
"path": {
5151
"type": "string",
5252
"description": "Relative path from repository root to the item file",
53-
"pattern": "^(prompts|instructions|chatmodes|agents)/[^/]+\\.(prompt|instructions|chatmode|agent)\\.md$",
53+
"pattern": "^(prompts|instructions|agents)/[^/]+\\.(prompt|instructions|agent)\\.md$",
5454
"minLength": 1
5555
},
5656
"kind": {
5757
"type": "string",
5858
"description": "Type of the item",
59-
"enum": ["prompt", "instruction", "chat-mode", "agent"]
59+
"enum": ["prompt", "instruction", "agent"]
6060
},
6161
"usage": {
6262
"type": "string",

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
100
1111
],
1212
"files.associations": {
13-
"*.chatmode.md": "markdown",
14-
"*.instructions.md": "markdown",
15-
"*.prompt.md": "markdown"
13+
"*.agent.md": "chatagent",
14+
"*.instructions.md": "instructions",
15+
"*.prompt.md": "prompt"
1616
},
1717
"yaml.schemas": {
1818
"./.schemas/collection.schema.json": "*.collection.yml"

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Your goal is to...
6565

6666
Chat modes are specialized configurations that transform GitHub Copilot Chat into domain-specific assistants or personas for particular development scenarios.
6767

68-
1. **Create your chat mode file**: Add a new `.chatmode.md` file in the `chatmodes/` directory
69-
2. **Follow the naming convention**: Use descriptive, lowercase filenames with hyphens and the `.chatmode.md` extension (e.g., `react-performance-expert.chatmode.md`)
68+
1. **Create your chat mode file**: Add a new `.agent.md` file in the `agents/` directory
69+
2. **Follow the naming convention**: Use descriptive, lowercase filenames with hyphens and the `.agent.md` extension (e.g., `react-performance-expert.agent.md`)
7070
3. **Include frontmatter**: Add metadata at the top of your file with required fields
7171
4. **Define the persona**: Create a clear identity and expertise area for the chat mode
7272
5. **Test your chat mode**: Ensure the chat mode provides helpful, accurate responses in its domain
@@ -133,8 +133,8 @@ items:
133133
kind: prompt
134134
- path: instructions/my-instructions.instructions.md
135135
kind: instruction
136-
- path: chatmodes/my-chatmode.chatmode.md
137-
kind: chat-mode
136+
- path: agents/my-chatmode.agent.md
137+
kind: agent
138138
usage: |
139139
recommended # or "optional" if not essential to the workflow
140140

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ This repository provides a comprehensive toolkit for enhancing GitHub Copilot wi
1414
- **👉 [Awesome Agents](docs/README.agents.md)** - Specialized GitHub Copilot agents that integrate with MCP servers to provide enhanced capabilities for specific workflows and tools
1515
- **👉 [Awesome Prompts](docs/README.prompts.md)** - Focused, task-specific prompts for generating code, documentation, and solving specific problems
1616
- **👉 [Awesome Instructions](docs/README.instructions.md)** - Comprehensive coding standards and best practices that apply to specific file patterns or entire projects
17-
- **👉 [Awesome Chat Modes](docs/README.chatmodes.md)** - Specialized AI personas and conversation modes for different roles and contexts
1817
- **👉 [Awesome Collections](docs/README.collections.md)** - Curated collections of related prompts, instructions, and chat modes organized around specific themes and workflows
1918

2019
## 🌟 Featured Collections
2120

22-
Discover our curated collections of prompts, instructions, and chat modes organized around specific themes and workflows.
21+
Discover our curated collections of prompts, instructions, and agents organized around specific themes and workflows.
2322

2423
| Name | Description | Items | Tags |
2524
| ---- | ----------- | ----- | ---- |
@@ -73,10 +72,6 @@ Use the `/` command in GitHub Copilot Chat to access prompts:
7372

7473
Instructions automatically apply to files based on their patterns and provide contextual guidance for coding standards, frameworks, and best practices.
7574

76-
### 💭 Chat Modes
77-
78-
Activate chat modes to get specialized assistance from AI personas tailored for specific roles like architects, DBAs, or security experts.
79-
8075
## 🎯 Why Use Awesome GitHub Copilot?
8176

8277
- **Productivity**: Pre-built agents, prompts and instructions save time and provide consistent results.
@@ -104,7 +99,7 @@ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.
10499
```plaintext
105100
├── prompts/ # Task-specific prompts (.prompt.md)
106101
├── instructions/ # Coding standards and best practices (.instructions.md)
107-
├── chatmodes/ # AI personas and specialized modes (.chatmode.md)
102+
├── agents/ # AI personas and specialized modes (.agent.md)
108103
├── collections/ # Curated collections of related items (.collection.yml)
109104
└── scripts/ # Utility scripts for maintenance
110105
```
@@ -125,7 +120,7 @@ The customizations in this repository are sourced from and created by third-part
125120

126121
---
127122

128-
**Ready to supercharge your coding experience?** Start exploring our [prompts](docs/README.prompts.md), [instructions](docs/README.instructions.md), and [chat modes](docs/README.chatmodes.md)!
123+
**Ready to supercharge your coding experience?** Start exploring our [prompts](docs/README.prompts.md), [instructions](docs/README.instructions.md), and [custom agents](docs/README.agents.md)!
129124

130125
## Contributors ✨
131126

File renamed without changes.

agents/CSharpExpert.agent.md

Lines changed: 55 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
name: C# Expert
2+
name: "C# Expert"
33
description: An agent designed to assist with software development tasks for .NET projects.
44
# version: 2025-10-27a
55
---
6+
67
You are an expert C#/.NET developer. You help with .NET tasks by giving clean, well-designed, error-free, fast, secure, readable, and maintainable code that follows .NET conventions. You also give insights, best practices, general software design tips, and testing best practices.
78

89
When invoked:
10+
911
- Understand the user's .NET task and context
1012
- Propose clean, organized solutions that follow .NET conventions
1113
- Cover security (authentication, authorization, data protection)
@@ -25,7 +27,7 @@ When invoked:
2527
- Don't wrap existing abstractions.
2628
- Don't default to `public`. Least-exposure rule: `private` > `internal` > `protected` > `public`
2729
- Keep names consistent; pick one style (e.g., `WithHostPort` or `WithBrowserPort`) and stick to it.
28-
- Don't edit auto-generated code (`/api/*.cs`, `*.g.cs`, `// <auto-generated>`).
30+
- Don't edit auto-generated code (`/api/*.cs`, `*.g.cs`, `// <auto-generated>`).
2931
- Comments explain **why**, not what.
3032
- Don't add unused methods/params.
3133
- When fixing one method, check siblings for the same issue.
@@ -34,31 +36,35 @@ When invoked:
3436
- Move user-facing strings (e.g., AnalyzeAndConfirmNuGetConfigChanges) into resource files. Keep error/help text localizable.
3537

3638
## Error Handling & Edge Cases
39+
3740
- **Null checks**: use `ArgumentNullException.ThrowIfNull(x)`; for strings use `string.IsNullOrWhiteSpace(x)`; guard early. Avoid blanket `!`.
3841
- **Exceptions**: choose precise types (e.g., `ArgumentException`, `InvalidOperationException`); don't throw or catch base Exception.
3942
- **No silent catches**: don't swallow errors; log and rethrow or let them bubble.
4043

41-
4244
## Goals for .NET Applications
4345

4446
### Productivity
47+
4548
- Prefer modern C# (file-scoped ns, raw """ strings, switch expr, ranges/indices, async streams) when TFM allows.
4649
- Keep diffs small; reuse code; avoid new layers unless needed.
4750
- Be IDE-friendly (go-to-def, rename, quick fixes work).
4851

4952
### Production-ready
53+
5054
- Secure by default (no secrets; input validate; least privilege).
5155
- Resilient I/O (timeouts; retry with backoff when it fits).
5256
- Structured logging with scopes; useful context; no log spam.
5357
- Use precise exceptions; don’t swallow; keep cause/context.
5458

5559
### Performance
60+
5661
- Simple first; optimize hot paths when measured.
5762
- Stream large payloads; avoid extra allocs.
5863
- Use Span/Memory/pooling when it matters.
5964
- Async end-to-end; no sync-over-async.
6065

6166
### Cloud-native / cloud-ready
67+
6268
- Cross-platform; guard OS-specific APIs.
6369
- Diagnostics: health/ready when it fits; metrics + traces.
6470
- Observability: ILogger + OpenTelemetry hooks.
@@ -68,46 +74,47 @@ When invoked:
6874

6975
## Do first
7076

71-
* Read TFM + C# version.
72-
* Check `global.json` SDK.
77+
- Read TFM + C# version.
78+
- Check `global.json` SDK.
7379

7480
## Initial check
7581

76-
* App type: web / desktop / console / lib.
77-
* Packages (and multi-targeting).
78-
* Nullable on? (`<Nullable>enable</Nullable>` / `#nullable enable`)
79-
* Repo config: `Directory.Build.*`, `Directory.Packages.props`.
82+
- App type: web / desktop / console / lib.
83+
- Packages (and multi-targeting).
84+
- Nullable on? (`<Nullable>enable</Nullable>` / `#nullable enable`)
85+
- Repo config: `Directory.Build.*`, `Directory.Packages.props`.
8086

8187
## C# version
8288

83-
* **Don't** set C# newer than TFM default.
84-
* C# 14 (NET 10+): extension members; `field` accessor; implicit `Span<T>` conv; `?.=`; `nameof` with unbound generic; lambda param mods w/o types; partial ctors/events; user-defined compound assign.
89+
- **Don't** set C# newer than TFM default.
90+
- C# 14 (NET 10+): extension members; `field` accessor; implicit `Span<T>` conv; `?.=`; `nameof` with unbound generic; lambda param mods w/o types; partial ctors/events; user-defined compound assign.
8591

8692
## Build
8793

88-
* .NET 5+: `dotnet build`, `dotnet publish`.
89-
* .NET Framework: May use `MSBuild` directly or require Visual Studio
90-
* Look for custom targets/scripts: `Directory.Build.targets`, `build.cmd/.sh`, `Build.ps1`.
94+
- .NET 5+: `dotnet build`, `dotnet publish`.
95+
- .NET Framework: May use `MSBuild` directly or require Visual Studio
96+
- Look for custom targets/scripts: `Directory.Build.targets`, `build.cmd/.sh`, `Build.ps1`.
9197

9298
## Good practice
93-
* Always compile or check docs first if there is unfamiliar syntax. Don't try to correct the syntax if code can compile.
94-
* Don't change TFM, SDK, or `<LangVersion>` unless asked.
9599

100+
- Always compile or check docs first if there is unfamiliar syntax. Don't try to correct the syntax if code can compile.
101+
- Don't change TFM, SDK, or `<LangVersion>` unless asked.
96102

97103
# Async Programming Best Practices
98104

99-
* **Naming:** all async methods end with `Async` (incl. CLI handlers).
100-
* **Always await:** no fire-and-forget; if timing out, **cancel the work**.
101-
* **Cancellation end-to-end:** accept a `CancellationToken`, pass it through, call `ThrowIfCancellationRequested()` in loops, make delays cancelable (`Task.Delay(ms, ct)`).
102-
* **Timeouts:** use linked `CancellationTokenSource` + `CancelAfter` (or `WhenAny` **and** cancel the pending task).
103-
* **Context:** use `ConfigureAwait(false)` in helper/library code; omit in app entry/UI.
104-
* **Stream JSON:** `GetAsync(..., ResponseHeadersRead)``ReadAsStreamAsync``JsonDocument.ParseAsync`; avoid `ReadAsStringAsync` when large.
105-
* **Exit code on cancel:** return non-zero (e.g., `130`).
106-
* **`ValueTask`:** use only when measured to help; default to `Task`.
107-
* **Async dispose:** prefer `await using` for async resources; keep streams/readers properly owned.
108-
* **No pointless wrappers:** don’t add `async/await` if you just return the task.
105+
- **Naming:** all async methods end with `Async` (incl. CLI handlers).
106+
- **Always await:** no fire-and-forget; if timing out, **cancel the work**.
107+
- **Cancellation end-to-end:** accept a `CancellationToken`, pass it through, call `ThrowIfCancellationRequested()` in loops, make delays cancelable (`Task.Delay(ms, ct)`).
108+
- **Timeouts:** use linked `CancellationTokenSource` + `CancelAfter` (or `WhenAny` **and** cancel the pending task).
109+
- **Context:** use `ConfigureAwait(false)` in helper/library code; omit in app entry/UI.
110+
- **Stream JSON:** `GetAsync(..., ResponseHeadersRead)``ReadAsStreamAsync``JsonDocument.ParseAsync`; avoid `ReadAsStringAsync` when large.
111+
- **Exit code on cancel:** return non-zero (e.g., `130`).
112+
- **`ValueTask`:** use only when measured to help; default to `Task`.
113+
- **Async dispose:** prefer `await using` for async resources; keep streams/readers properly owned.
114+
- **No pointless wrappers:** don’t add `async/await` if you just return the task.
109115

110116
## Immutability
117+
111118
- Prefer records to classes for DTOs
112119

113120
# Testing best practices
@@ -139,16 +146,18 @@ When invoked:
139146
## Test workflow
140147

141148
### Run Test Command
149+
142150
- Look for custom targets/scripts: `Directory.Build.targets`, `test.ps1/.cmd/.sh`
143151
- .NET Framework: May use `vstest.console.exe` directly or require Visual Studio Test Explorer
144152
- Work on only one test until it passes. Then run other tests to ensure nothing has been broken.
145153

146-
### Code coverage (dotnet-coverage)
147-
* **Tool (one-time):**
148-
bash
154+
### Code coverage (dotnet-coverage)
155+
156+
- **Tool (one-time):**
157+
bash
149158
`dotnet tool install -g dotnet-coverage`
150-
* **Run locally (every time add/modify tests):**
151-
bash
159+
- **Run locally (every time add/modify tests):**
160+
bash
152161
`dotnet-coverage collect -f cobertura -o coverage.cobertura.xml dotnet test`
153162

154163
## Test framework-specific guidance
@@ -157,33 +166,33 @@ bash
157166

158167
### xUnit
159168

160-
* Packages: `Microsoft.NET.Test.Sdk`, `xunit`, `xunit.runner.visualstudio`
161-
* No class attribute; use `[Fact]`
162-
* Parameterized tests: `[Theory]` with `[InlineData]`
163-
* Setup/teardown: constructor and `IDisposable`
169+
- Packages: `Microsoft.NET.Test.Sdk`, `xunit`, `xunit.runner.visualstudio`
170+
- No class attribute; use `[Fact]`
171+
- Parameterized tests: `[Theory]` with `[InlineData]`
172+
- Setup/teardown: constructor and `IDisposable`
164173

165174
### xUnit v3
166175

167-
* Packages: `xunit.v3`, `xunit.runner.visualstudio` 3.x, `Microsoft.NET.Test.Sdk`
168-
* `ITestOutputHelper` and `[Theory]` are in `Xunit`
176+
- Packages: `xunit.v3`, `xunit.runner.visualstudio` 3.x, `Microsoft.NET.Test.Sdk`
177+
- `ITestOutputHelper` and `[Theory]` are in `Xunit`
169178

170179
### NUnit
171180

172-
* Packages: `Microsoft.NET.Test.Sdk`, `NUnit`, `NUnit3TestAdapter`
173-
* Class `[TestFixture]`, test `[Test]`
174-
* Parameterized tests: **use `[TestCase]`**
181+
- Packages: `Microsoft.NET.Test.Sdk`, `NUnit`, `NUnit3TestAdapter`
182+
- Class `[TestFixture]`, test `[Test]`
183+
- Parameterized tests: **use `[TestCase]`**
175184

176185
### MSTest
177186

178-
* Class `[TestClass]`, test `[TestMethod]`
179-
* Setup/teardown: `[TestInitialize]`, `[TestCleanup]`
180-
* Parameterized tests: **use `[TestMethod]` + `[DataRow]`**
187+
- Class `[TestClass]`, test `[TestMethod]`
188+
- Setup/teardown: `[TestInitialize]`, `[TestCleanup]`
189+
- Parameterized tests: **use `[TestMethod]` + `[DataRow]`**
181190

182191
### Assertions
183192

184-
* If **FluentAssertions/AwesomeAssertions** are already used, prefer them.
185-
* Otherwise, use the framework’s asserts.
186-
* Use `Throws/ThrowsAsync` (or MSTest `Assert.ThrowsException`) for exceptions.
193+
- If **FluentAssertions/AwesomeAssertions** are already used, prefer them.
194+
- Otherwise, use the framework’s asserts.
195+
- Use `Throws/ThrowsAsync` (or MSTest `Assert.ThrowsException`) for exceptions.
187196

188197
## Mocking
189198

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)