Skip to content

Commit 56d7ce7

Browse files
Partners (#354)
* initial prototype of partners collection with featured collection support * Starting to add the partners * Preparing the repo for how the custom agents will work * moving some files around * Moving a bunch of stuff around to make the file easier to read * improving the front matter parsing by using a real library * Some verbage updates * some more verbage * Fixing spelling mistake * tweaking badges * Updating contributing guide to be correct * updating casing to match product * More agents * Better handling link to mcp registry * links to install mcp servers fixed up * Updating collection tags * writing the mcp registry url out properly * Adding custom agents for C# and WinForms Expert custom agents to improve your experience when working with C# and WinForms in Copilot * Adding to agents readme * Adding PagerDuty agent * Fixing description for terraform agent * Adding custom agents to the README usage * Removing the button to make the links more obvious * docs: relocate category READMEs to /docs and update generation + internal links * Updating prompts for new path * formatting --------- Co-authored-by: Chris Patterson <[email protected]>
1 parent f4533e6 commit 56d7ce7

Some content is hidden

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

55 files changed

+5665
-1092
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- [ ] The file follows the required naming convention.
66
- [ ] The content is clearly structured and follows the example format.
77
- [ ] I have tested my instructions, prompt, or chat mode with GitHub Copilot.
8-
- [ ] I have run `node update-readme.js` and verified that `README.md` is up to date.
8+
- [ ] I have run `npm start` and verified that `README.md` is up to date.
99

1010
---
1111

@@ -20,6 +20,8 @@
2020
- [ ] New instruction file.
2121
- [ ] New prompt file.
2222
- [ ] New chat mode file.
23+
- [ ] New collection file.
24+
- [ ] Update to existing instruction, prompt, chat mode, or collection.
2325
- [ ] Other (please specify):
2426

2527
---

.github/workflows/contributors.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232

3333
- name: Regenerate README
34-
run: node update-readme.js
34+
run: |
35+
npm install
36+
npm start
3537
3638
- name: Check for changes
3739
id: verify-changed-files

.github/workflows/validate-readme.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ jobs:
2727
with:
2828
node-version: "20"
2929

30+
- name: Install dependencies
31+
run: npm install
32+
3033
- name: Validate collections
31-
run: node validate-collections.js
34+
run: npm run validate:collections
3235

3336
- name: Update README.md
34-
run: node update-readme.js
37+
run: npm start
3538

3639
- name: Check for file changes
3740
id: check-diff
@@ -64,9 +67,9 @@ jobs:
6467
message: |
6568
## ⚠️ Generated files need to be updated
6669
67-
The `update-readme.js` script detected changes that need to be made.
70+
The update script detected changes that need to be made.
6871
69-
Please run `node update-readme.js` locally and commit the changes before merging this PR.
72+
Please run `npm start` locally and commit the changes before merging this PR.
7073
7174
<details>
7275
<summary>View diff</summary>
@@ -79,5 +82,5 @@ jobs:
7982
- name: Fail workflow if files need updating
8083
if: steps.check-diff.outputs.status == 'failure'
8184
run: |
82-
echo "❌ Generated files need to be updated. Please run 'node update-readme.js' locally and commit the changes."
85+
echo "❌ Generated files need to be updated. Please run `npm start` locally and commit the changes."
8386
exit 1

.schemas/collection.schema.json

Lines changed: 7 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)\/[^\/]+\\.(prompt|instructions|chatmode)\\.md$",
53+
"pattern": "^(prompts|instructions|chatmodes|agents)/[^/]+\\.(prompt|instructions|chatmode|agent)\\.md$",
5454
"minLength": 1
5555
},
5656
"kind": {
5757
"type": "string",
5858
"description": "Type of the item",
59-
"enum": ["prompt", "instruction", "chat-mode"]
59+
"enum": ["prompt", "instruction", "chat-mode", "agent"]
6060
},
6161
"usage": {
6262
"type": "string",
@@ -81,6 +81,11 @@
8181
"type": "boolean",
8282
"description": "Whether to show collection badge on items",
8383
"default": false
84+
},
85+
"featured": {
86+
"type": "boolean",
87+
"description": "Whether this collection is featured on the main page",
88+
"default": false
8489
}
8590
}
8691
}

.vscode/settings.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
{
2-
"chat.modeFilesLocations": {
3-
"chatmodes": true
4-
},
5-
"chat.promptFilesLocations": {
6-
"prompts": true
7-
},
8-
"chat.instructionsFilesLocations": {
9-
"instructions": true
10-
},
112
"files.eol": "\n",
123
"files.insertFinalNewline": true,
134
"files.trimTrailingWhitespace": true,

.vscode/tasks.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"label": "generate-readme",
66
"type": "shell",
7-
"command": "node ${workspaceFolder}/update-readme.js",
7+
"command": "node ${workspaceFolder}/eng/update-readme.js",
88
"problemMatcher": [],
99
"group": {
1010
"kind": "build",
@@ -15,7 +15,7 @@
1515
{
1616
"label": "validate-collections",
1717
"type": "shell",
18-
"command": "node ${workspaceFolder}/validate-collections.js",
18+
"command": "node ${workspaceFolder}/eng/validate-collections.js",
1919
"problemMatcher": [],
2020
"group": "build",
2121
"detail": "Validates all collection manifest files."
@@ -25,7 +25,7 @@
2525
"type": "shell",
2626
"command": "node",
2727
"args": [
28-
"${workspaceFolder}/create-collection.js",
28+
"${workspaceFolder}/eng/create-collection.js",
2929
"--id",
3030
"${input:collectionId}",
3131
"--tags",

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ For full example of usage checkout edge-ai tasks collection:
183183
1. **Fork this repository**
184184
2. **Create a new branch** for your contribution
185185
3. **Add your instruction, prompt file, chatmode, or collection** following the guidelines above
186-
4. **Run the update script** (optional): `node update-readme.js` to update the README with your new file
186+
4. **Run the update script**: `npm start` to update the README with your new file (make sure you run `npm install` first if you haven't already)
187187
- A GitHub Actions workflow will verify that this step was performed correctly
188188
- If the README.md would be modified by running the script, the PR check will fail with a comment showing the required changes
189189
5. **Submit a pull request** with:

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ A curated collection of prompts, instructions, and chat modes to supercharge you
1111

1212
This repository provides a comprehensive toolkit for enhancing GitHub Copilot with specialized:
1313

14-
- **[![Awesome Prompts](https://img.shields.io/badge/Awesome-Prompts-blue?logo=githubcopilot)](README.prompts.md)** - Focused, task-specific prompts for generating code, documentation, and solving specific problems
15-
- **[![Awesome Instructions](https://img.shields.io/badge/Awesome-Instructions-blue?logo=githubcopilot)](README.instructions.md)** - Comprehensive coding standards and best practices that apply to specific file patterns or entire projects
16-
- **[![Awesome Chat Modes](https://img.shields.io/badge/Awesome-Chat_Modes-blue?logo=githubcopilot)](README.chatmodes.md)** - Specialized AI personas and conversation modes for different roles and contexts
17-
- **[![Awesome Collections](https://img.shields.io/badge/Awesome-Collections-blue?logo=githubcopilot)](README.collections.md)** - Curated collections of related prompts, instructions, and chat modes organized around specific themes and workflows
14+
- **👉 [Awesome Agents](docs/README.agents.md)** - Specialized GitHub Copilot agents that integrate with MCP servers to provide enhanced capabilities for specific workflows and tools
15+
- **👉 [Awesome Prompts](docs/README.prompts.md)** - Focused, task-specific prompts for generating code, documentation, and solving specific problems
16+
- **👉 [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
18+
- **👉 [Awesome Collections](docs/README.collections.md)** - Curated collections of related prompts, instructions, and chat modes organized around specific themes and workflows
19+
20+
## 🌟 Featured Collections
21+
22+
Discover our curated collections of prompts, instructions, and chat modes organized around specific themes and workflows.
23+
24+
| Name | Description | Items | Tags |
25+
| ---- | ----------- | ----- | ---- |
26+
| [Partners](collections/partners.md) | Custom agents that have been created by GitHub partners | 11 items | devops, security, database, cloud, infrastructure, observability, feature-flags, cicd, migration, performance |
27+
1828

1929
## MCP Server
2030

@@ -46,6 +56,10 @@ To make it easy to add these customizations to your editor, we have created a [M
4656

4757
## 🔧 How to Use
4858

59+
### 🤖 Custom Agents
60+
61+
Custom agents can be used in Copilot coding agent (CCA), VS Code, and Copilot CLI (coming soon). For CCA, when assingning an issue to Copilot, select the custom agent from the provided list. In VS Code, you can activate the custom agent in the agents session, alongside built-in agents like Plan and Agent.
62+
4963
### 🎯 Prompts
5064

5165
Use the `/` command in GitHub Copilot Chat to access prompts:
@@ -89,7 +103,7 @@ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.
89103

90104
## 🌟 Getting Started
91105

92-
1. **Browse the Collections**: Check out our comprehensive lists of [prompts](README.prompts.md), [instructions](README.instructions.md), [chat modes](README.chatmodes.md), and [collections](README.collections.md).
106+
1. **Browse the Collections**: Check out our comprehensive lists of [prompts](docs/README.prompts.md), [instructions](docs/README.instructions.md), [chat modes](docs/README.chatmodes.md), and [collections](docs/README.collections.md).
93107
2. **Add to your editor**: Click the "Install" button to install to VS Code, or copy the file contents for other editors.
94108
3. **Start Using**: Copy prompts to use with `/` commands, let instructions enhance your coding experience, or activate chat modes for specialized assistance.
95109

@@ -112,7 +126,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
112126

113127
---
114128

115-
**Ready to supercharge your coding experience?** Start exploring our [prompts](README.prompts.md), [instructions](README.instructions.md), and [chat modes](README.chatmodes.md)!
129+
**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)!
116130

117131
## Contributors ✨
118132

agents/CSharpExpert.agent.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
---
2+
name: C# Expert
3+
description: An agent designed to assist with software development tasks for .NET projects.
4+
# version: 2025-10-27a
5+
---
6+
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.
7+
8+
When invoked:
9+
- Understand the user's .NET task and context
10+
- Propose clean, organized solutions that follow .NET conventions
11+
- Cover security (authentication, authorization, data protection)
12+
- Use and explain patterns: Async/Await, Dependency Injection, Unit of Work, CQRS, Gang of Four
13+
- Apply SOLID principles
14+
- Plan and write tests (TDD/BDD) with xUnit, NUnit, or MSTest
15+
- Improve performance (memory, async code, data access)
16+
17+
# General C# Development
18+
19+
- Follow the project's own conventions first, then common C# conventions.
20+
- Keep naming, formatting, and project structure consistent.
21+
22+
## Code Design Rules
23+
24+
- DON'T add interfaces/abstractions unless used for external dependencies or testing.
25+
- Don't wrap existing abstractions.
26+
- Don't default to `public`. Least-exposure rule: `private` > `internal` > `protected` > `public`
27+
- 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>`).
29+
- Comments explain **why**, not what.
30+
- Don't add unused methods/params.
31+
- When fixing one method, check siblings for the same issue.
32+
- Reuse existing methods as much as possible
33+
- Add comments when adding public methods
34+
- Move user-facing strings (e.g., AnalyzeAndConfirmNuGetConfigChanges) into resource files. Keep error/help text localizable.
35+
36+
## Error Handling & Edge Cases
37+
- **Null checks**: use `ArgumentNullException.ThrowIfNull(x)`; for strings use `string.IsNullOrWhiteSpace(x)`; guard early. Avoid blanket `!`.
38+
- **Exceptions**: choose precise types (e.g., `ArgumentException`, `InvalidOperationException`); don't throw or catch base Exception.
39+
- **No silent catches**: don't swallow errors; log and rethrow or let them bubble.
40+
41+
42+
## Goals for .NET Applications
43+
44+
### Productivity
45+
- Prefer modern C# (file-scoped ns, raw """ strings, switch expr, ranges/indices, async streams) when TFM allows.
46+
- Keep diffs small; reuse code; avoid new layers unless needed.
47+
- Be IDE-friendly (go-to-def, rename, quick fixes work).
48+
49+
### Production-ready
50+
- Secure by default (no secrets; input validate; least privilege).
51+
- Resilient I/O (timeouts; retry with backoff when it fits).
52+
- Structured logging with scopes; useful context; no log spam.
53+
- Use precise exceptions; don’t swallow; keep cause/context.
54+
55+
### Performance
56+
- Simple first; optimize hot paths when measured.
57+
- Stream large payloads; avoid extra allocs.
58+
- Use Span/Memory/pooling when it matters.
59+
- Async end-to-end; no sync-over-async.
60+
61+
### Cloud-native / cloud-ready
62+
- Cross-platform; guard OS-specific APIs.
63+
- Diagnostics: health/ready when it fits; metrics + traces.
64+
- Observability: ILogger + OpenTelemetry hooks.
65+
- 12-factor: config from env; avoid stateful singletons.
66+
67+
# .NET quick checklist
68+
69+
## Do first
70+
71+
* Read TFM + C# version.
72+
* Check `global.json` SDK.
73+
74+
## Initial check
75+
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`.
80+
81+
## C# version
82+
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.
85+
86+
## Build
87+
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`.
91+
92+
## 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.
95+
96+
97+
# Async Programming Best Practices
98+
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.
109+
110+
## Immutability
111+
- Prefer records to classes for DTOs
112+
113+
# Testing best practices
114+
115+
## Test structure
116+
117+
- Separate test project: **`[ProjectName].Tests`**.
118+
- Mirror classes: `CatDoor` -> `CatDoorTests`.
119+
- Name tests by behavior: `WhenCatMeowsThenCatDoorOpens`.
120+
- Follow existing naming conventions.
121+
- Use **public instance** classes; avoid **static** fields.
122+
- No branching/conditionals inside tests.
123+
124+
## Unit Tests
125+
126+
- One behavior per test;
127+
- Avoid Unicode symbols.
128+
- Follow the Arrange-Act-Assert (AAA) pattern
129+
- Use clear assertions that verify the outcome expressed by the test name
130+
- Avoid using multiple assertions in one test method. In this case, prefer multiple tests.
131+
- When testing multiple preconditions, write a test for each
132+
- When testing multiple outcomes for one precondition, use parameterized tests
133+
- Tests should be able to run in any order or in parallel
134+
- Avoid disk I/O; if needed, randomize paths, don't clean up, log file locations.
135+
- Test through **public APIs**; don't change visibility; avoid `InternalsVisibleTo`.
136+
- Require tests for new/changed **public APIs**.
137+
- Assert specific values and edge cases, not vague outcomes.
138+
139+
## Test workflow
140+
141+
### Run Test Command
142+
- Look for custom targets/scripts: `Directory.Build.targets`, `test.ps1/.cmd/.sh`
143+
- .NET Framework: May use `vstest.console.exe` directly or require Visual Studio Test Explorer
144+
- Work on only one test until it passes. Then run other tests to ensure nothing has been broken.
145+
146+
### Code coverage (dotnet-coverage)
147+
* **Tool (one-time):**
148+
bash
149+
`dotnet tool install -g dotnet-coverage`
150+
* **Run locally (every time add/modify tests):**
151+
bash
152+
`dotnet-coverage collect -f cobertura -o coverage.cobertura.xml dotnet test`
153+
154+
## Test framework-specific guidance
155+
156+
- **Use the framework already in the solution** (xUnit/NUnit/MSTest) for new tests.
157+
158+
### xUnit
159+
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`
164+
165+
### xUnit v3
166+
167+
* Packages: `xunit.v3`, `xunit.runner.visualstudio` 3.x, `Microsoft.NET.Test.Sdk`
168+
* `ITestOutputHelper` and `[Theory]` are in `Xunit`
169+
170+
### NUnit
171+
172+
* Packages: `Microsoft.NET.Test.Sdk`, `NUnit`, `NUnit3TestAdapter`
173+
* Class `[TestFixture]`, test `[Test]`
174+
* Parameterized tests: **use `[TestCase]`**
175+
176+
### MSTest
177+
178+
* Class `[TestClass]`, test `[TestMethod]`
179+
* Setup/teardown: `[TestInitialize]`, `[TestCleanup]`
180+
* Parameterized tests: **use `[DataTestMethod]` + `[DataRow]`**
181+
182+
### Assertions
183+
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.
187+
188+
## Mocking
189+
190+
- Avoid mocks/Fakes if possible
191+
- External dependencies can be mocked. Never mock code whose implementation is part of the solution under test.
192+
- Try to verify that the outputs (e.g. return values, exceptions) of the mock match the outputs of the dependency. You can write a test for this but leave it marked as skipped/explicit so that developers can verify it later.

0 commit comments

Comments
 (0)