Skip to content

Commit dfe63f4

Browse files
Copilotaaronpowell
andauthored
Implement Collections feature for grouping related prompts, instructions, and chat modes (#232)
* Initial plan * Implement core Collections feature with YAML parsing and README generation Co-authored-by: aaronpowell <[email protected]> * Complete Collections feature implementation with validation, tooling, and documentation Co-authored-by: aaronpowell <[email protected]> * Update generated README files to include collections instructions * Fix YAML parsing logic bug: replace impossible condition with proper indentation check Co-authored-by: aaronpowell <[email protected]> * Refactor: Extract YAML parser to shared module and improve user experience Co-authored-by: aaronpowell <[email protected]> * fixing task and file permissions * Better args handling * Adding some more collections --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: aaronpowell <[email protected]> Co-authored-by: Aaron Powell <[email protected]>
1 parent f767285 commit dfe63f4

29 files changed

+1434
-3
lines changed

.github/workflows/validate-readme.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- "instructions/**"
88
- "prompts/**"
99
- "chatmodes/**"
10+
- "collections/**"
1011
- "*.js"
1112

1213
jobs:
@@ -26,6 +27,9 @@ jobs:
2627
with:
2728
node-version: "20"
2829

30+
- name: Validate collections
31+
run: node validate-collections.js
32+
2933
- name: Update README.md
3034
run: node update-readme.js
3135

.schemas/collection.schema.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Collection Manifest",
4+
"description": "Schema for awesome-copilot collection manifest files",
5+
"type": "object",
6+
"required": ["id", "name", "description", "items"],
7+
"additionalProperties": false,
8+
"properties": {
9+
"id": {
10+
"type": "string",
11+
"description": "Unique identifier for the collection",
12+
"pattern": "^[a-z0-9-]+$",
13+
"minLength": 1,
14+
"maxLength": 50
15+
},
16+
"name": {
17+
"type": "string",
18+
"description": "Display name for the collection",
19+
"minLength": 1,
20+
"maxLength": 100
21+
},
22+
"description": {
23+
"type": "string",
24+
"description": "Description of what this collection contains",
25+
"minLength": 1,
26+
"maxLength": 500
27+
},
28+
"tags": {
29+
"type": "array",
30+
"description": "Optional tags for discovery",
31+
"items": {
32+
"type": "string",
33+
"pattern": "^[a-z0-9-]+$",
34+
"minLength": 1,
35+
"maxLength": 30
36+
},
37+
"uniqueItems": true,
38+
"maxItems": 10
39+
},
40+
"items": {
41+
"type": "array",
42+
"description": "List of items in this collection",
43+
"minItems": 1,
44+
"maxItems": 50,
45+
"items": {
46+
"type": "object",
47+
"required": ["path", "kind"],
48+
"additionalProperties": false,
49+
"properties": {
50+
"path": {
51+
"type": "string",
52+
"description": "Relative path from repository root to the item file",
53+
"pattern": "^(prompts|instructions|chatmodes)\/[^\/]+\\.(prompt|instructions|chatmode)\\.md$",
54+
"minLength": 1
55+
},
56+
"kind": {
57+
"type": "string",
58+
"description": "Type of the item",
59+
"enum": ["prompt", "instruction", "chat-mode"]
60+
}
61+
}
62+
},
63+
"uniqueItems": true
64+
},
65+
"display": {
66+
"type": "object",
67+
"description": "Optional display settings for the collection",
68+
"additionalProperties": false,
69+
"properties": {
70+
"ordering": {
71+
"type": "string",
72+
"description": "How to order items in the collection",
73+
"enum": ["manual", "alpha"],
74+
"default": "alpha"
75+
},
76+
"show_badge": {
77+
"type": "boolean",
78+
"description": "Whether to show collection badge on items",
79+
"default": false
80+
}
81+
}
82+
}
83+
}
84+
}

.vscode/tasks.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,50 @@
44
{
55
"label": "generate-readme",
66
"type": "shell",
7-
"command": "node update-readme.js",
7+
"command": "node ${workspaceFolder}/update-readme.js",
88
"problemMatcher": [],
99
"group": {
1010
"kind": "build",
1111
"isDefault": true
1212
},
1313
"detail": "Generates the README.md file using update-readme.js script."
14+
},
15+
{
16+
"label": "validate-collections",
17+
"type": "shell",
18+
"command": "node ${workspaceFolder}/validate-collections.js",
19+
"problemMatcher": [],
20+
"group": "build",
21+
"detail": "Validates all collection manifest files."
22+
},
23+
{
24+
"label": "create-collection",
25+
"type": "shell",
26+
"command": "node",
27+
"args": [
28+
"${workspaceFolder}/create-collection.js",
29+
"--id",
30+
"${input:collectionId}",
31+
"--tags",
32+
"${input:tags}"
33+
],
34+
"problemMatcher": [],
35+
"group": "build",
36+
"detail": "Creates a new collection manifest template."
37+
}
38+
],
39+
"inputs": [
40+
{
41+
"id": "collectionId",
42+
"description": "Collection ID (lowercase, hyphen-separated)",
43+
"default": "my-collection",
44+
"type": "promptString"
45+
},
46+
{
47+
"id": "tags",
48+
"description": "Comma separated list of tags",
49+
"default": "tag1,tag2",
50+
"type": "promptString"
1451
}
1552
]
1653
}

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,48 @@ You are an expert [domain/role] with deep knowledge in [specific areas].
100100
- [Best practices to follow]
101101
```
102102

103+
### Adding Collections
104+
105+
Collections group related prompts, instructions, and chat modes around specific themes or workflows, making it easier for users to discover and adopt comprehensive toolkits.
106+
107+
1. **Create your collection manifest**: Add a new `.collection.yml` file in the `collections/` directory
108+
2. **Follow the naming convention**: Use descriptive, lowercase filenames with hyphens (e.g., `python-web-development.collection.yml`)
109+
3. **Reference existing items**: Collections should only reference files that already exist in the repository
110+
4. **Test your collection**: Verify all referenced files exist and work well together
111+
112+
#### Creating a collection:
113+
```bash
114+
# Using the creation script
115+
node create-collection.js my-collection-id
116+
117+
# Or using VS Code Task: Ctrl+Shift+P > "Tasks: Run Task" > "create-collection"
118+
```
119+
120+
#### Example collection format:
121+
```yaml
122+
id: my-collection-id
123+
name: My Collection Name
124+
description: A brief description of what this collection provides and who should use it.
125+
tags: [tag1, tag2, tag3] # Optional discovery tags
126+
items:
127+
- path: prompts/my-prompt.prompt.md
128+
kind: prompt
129+
- path: instructions/my-instructions.instructions.md
130+
kind: instruction
131+
- path: chatmodes/my-chatmode.chatmode.md
132+
kind: chat-mode
133+
display:
134+
ordering: alpha # or "manual" to preserve order above
135+
show_badge: false # set to true to show collection badge
136+
```
137+
138+
#### Collection Guidelines:
139+
- **Focus on workflows**: Group items that work together for specific use cases
140+
- **Reasonable size**: Typically 3-10 items work well
141+
- **Test combinations**: Ensure the items complement each other effectively
142+
- **Clear purpose**: The collection should solve a specific problem or workflow
143+
- **Validate before submitting**: Run `node validate-collections.js` to ensure your manifest is valid
144+
103145
## Submitting Your Contribution
104146

105147
1. **Fork this repository**

README.collections.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 📦 Collections
2+
3+
Curated collections of related prompts, instructions, and chat modes organized around specific themes, workflows, or use cases.
4+
### How to Use Collections
5+
6+
**Browse Collections:**
7+
- Explore themed collections that group related customizations
8+
- Each collection includes prompts, instructions, and chat modes for specific workflows
9+
- Collections make it easy to adopt comprehensive toolkits for particular scenarios
10+
11+
**Install Items:**
12+
- Click install buttons for individual items within collections
13+
- Or browse to the individual files to copy content manually
14+
- Collections help you discover related customizations you might have missed
15+
16+
| Name | Description | Items | Tags |
17+
| ---- | ----------- | ----- | ---- |
18+
| [Azure & Cloud Development](collections/azure-cloud-development.md) | Comprehensive Azure cloud development tools including Infrastructure as Code, serverless functions, architecture patterns, and cost optimization for building scalable cloud applications. | 15 items | azure, cloud, infrastructure, bicep, terraform, serverless, architecture, devops |
19+
| [C# .NET Development](collections/csharp-dotnet-development.md) | Essential prompts, instructions, and chat modes for C# and .NET development including testing, documentation, and best practices. | 7 items | csharp, dotnet, aspnet, testing |
20+
| [Database & Data Management](collections/database-data-management.md) | Database administration, SQL optimization, and data management tools for PostgreSQL, SQL Server, and general database development best practices. | 8 items | database, sql, postgresql, sql-server, dba, optimization, queries, data-management |
21+
| [DevOps On-Call](collections/devops-oncall.md) | A focused set of prompts, instructions, and a chat mode to help triage incidents and respond quickly with DevOps tools and Azure resources. | 5 items | devops, incident-response, oncall, azure |
22+
| [Frontend Web Development](collections/frontend-web-dev.md) | Essential prompts, instructions, and chat modes for modern frontend web development including React, Angular, Vue, TypeScript, and CSS frameworks. | 11 items | frontend, web, react, typescript, javascript, css, html, angular, vue |
23+
| [Project Planning & Management](collections/project-planning.md) | Tools and guidance for software project planning, feature breakdown, epic management, implementation planning, and task organization for development teams. | 15 items | planning, project-management, epic, feature, implementation, task, architecture |
24+
| [Security & Code Quality](collections/security-best-practices.md) | Security frameworks, accessibility guidelines, performance optimization, and code quality best practices for building secure, maintainable, and high-performance applications. | 6 items | security, accessibility, performance, code-quality, owasp, a11y, optimization, best-practices |
25+
| [Testing & Test Automation](collections/testing-automation.md) | Comprehensive collection for writing tests, test automation, and test-driven development including unit tests, integration tests, and end-to-end testing strategies. | 11 items | testing, tdd, automation, unit-tests, integration, playwright, jest, nunit |

README.instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Team and project-specific instructions to enhance GitHub Copilot's behavior for
2828
| [Cmake Vcpkg](instructions/cmake-vcpkg.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcmake-vcpkg.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcmake-vcpkg.instructions.md) | C++ project configuration and package management |
2929
| [ColdFusion Coding Standards for CFC Files](instructions/coldfusion-cfc.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfc.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfc.instructions.md) | ColdFusion Coding Standards for CFC component and application patterns |
3030
| [ColdFusion Coding Standards](instructions/coldfusion-cfm.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfm.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfm.instructions.md) | ColdFusion cfm files and application patterns |
31+
| [Collections Development](instructions/collections.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcollections.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcollections.instructions.md) | Guidelines for creating and managing awesome-copilot collections |
3132
| [Containerization & Docker Best Practices](instructions/containerization-docker-best-practices.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcontainerization-docker-best-practices.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcontainerization-docker-best-practices.instructions.md) | Comprehensive best practices for creating optimized, secure, and efficient Docker images and managing containers. Covers multi-stage builds, image layer optimization, security scanning, and runtime best practices. |
3233
| [Conventional Commit](instructions/conventional-commit.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconventional-commit.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconventional-commit.prompt.md) | Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation. |
3334
| [Convert Spring JPA project to Spring Data Cosmos](instructions/convert-jpa-to-spring-data-cosmos.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconvert-jpa-to-spring-data-cosmos.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconvert-jpa-to-spring-data-cosmos.instructions.md) | Step-by-step guide for converting Spring Boot JPA applications to use Azure Cosmos DB with Spring Data Cosmos |

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This repository provides a comprehensive toolkit for enhancing GitHub Copilot wi
1414
- **[![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
1515
- **[![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
1616
- **[![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
1718

1819
## MCP Server
1920

@@ -76,12 +77,13 @@ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.
7677
├── prompts/ # Task-specific prompts (.prompt.md)
7778
├── instructions/ # Coding standards and best practices (.instructions.md)
7879
├── chatmodes/ # AI personas and specialized modes (.chatmode.md)
80+
├── collections/ # Curated collections of related items (.collection.yml)
7981
└── scripts/ # Utility scripts for maintenance
8082
```
8183

8284
## 🌟 Getting Started
8385

84-
1. **Browse the Collections**: Check out our comprehensive lists of [prompts](README.prompts.md), [instructions](README.instructions.md), and [chat modes](README.chatmodes.md).
86+
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).
8587
2. **Add to your editor**: Click the "Install" button to install to VS Code, or copy the file contents for other editors.
8688
3. **Start Using**: Copy prompts to use with `/` commands, let instructions enhance your coding experience, or activate chat modes for specialized assistance.
8789

0 commit comments

Comments
 (0)