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
This commit is contained in:
Aaron Powell
2025-11-25 16:24:55 +11:00
committed by GitHub
parent 7b7f9d519c
commit 86adaa48fe
163 changed files with 1475 additions and 1013 deletions

View File

@@ -42,15 +42,15 @@ Create reusable prompt files:
- `generate-docs.prompt.md` - Documentation generation
- `debug-issue.prompt.md` - Debugging assistance
### 4. `.github/chatmodes/` Directory
### 4. `.github/agents/` Directory
Create specialized chat modes:
- `architect.chatmode.md` - Architecture planning mode
- `reviewer.chatmode.md` - Code review mode
- `debugger.chatmode.md` - Debugging mode
- `architect.agent.md` - Architecture planning mode
- `reviewer.agent.md` - Code review mode
- `debugger.agent.md` - Debugging mode
**Chat Mode Attribution**: When using content from awesome-copilot chatmodes, add attribution comments:
```markdown
<!-- Based on/Inspired by: https://github.com/github/awesome-copilot/blob/main/chatmodes/[filename].chatmode.md -->
<!-- Based on/Inspired by: https://github.com/github/awesome-copilot/blob/main/agents/[filename].agent.md -->
```
### 5. `.github/workflows/` Directory
@@ -171,10 +171,10 @@ project-root/
│ │ ├── refactor-code.prompt.md
│ │ ├── generate-docs.prompt.md
│ │ └── debug-issue.prompt.md
│ ├── chatmodes/
│ │ ├── architect.chatmode.md
│ │ ├── reviewer.chatmode.md
│ │ └── debugger.chatmode.md
│ ├── agents/
│ │ ├── architect.agent.md
│ │ ├── reviewer.agent.md
│ │ └── debugger.agent.md
│ └── workflows/
│ └── copilot-setup-steps.yml
```
@@ -233,7 +233,7 @@ Requirements for the form:
```
**Chat Modes (.chatmode.md):**
**Chat Modes (.agent.md):**
```yaml
---
description: Generate an implementation plan for new features or refactoring existing code.

View File

@@ -12,11 +12,11 @@ model: Auto (copilot)
## Mission
Analyze `.chatmode.md` or `.prompt.md` files to understand their purpose, complexity, and required capabilities, then recommend the most suitable AI model(s) from GitHub Copilot's available options. Provide rationale based on task characteristics, model strengths, cost-efficiency, and performance trade-offs.
Analyze `.agent.md` or `.prompt.md` files to understand their purpose, complexity, and required capabilities, then recommend the most suitable AI model(s) from GitHub Copilot's available options. Provide rationale based on task characteristics, model strengths, cost-efficiency, and performance trade-offs.
## Scope & Preconditions
- **Input**: Path to a `.chatmode.md` or `.prompt.md` file
- **Input**: Path to a `.agent.md` or `.prompt.md` file
- **Available Models**: GPT-4.1, GPT-5, GPT-5 mini, GPT-5 Codex, Claude Sonnet 3.5, Claude Sonnet 4, Claude Sonnet 4.5, Claude Opus 4.1, Gemini 2.5 Pro, Gemini 2.0 Flash, Grok Code Fast 1, o3, o4-mini (with deprecation dates)
- **Model Auto-Selection**: Available in VS Code (Sept 2025+) - selects from GPT-4.1, GPT-5 mini, GPT-5, Claude Sonnet 3.5, Claude Sonnet 4.5 (excludes premium multipliers > 1)
- **Context**: GitHub Copilot subscription tiers (Free: 2K completions + 50 chat/month with 0x models only; Pro: unlimited 0x + 1000 premium/month; Pro+: unlimited 0x + 5000 premium/month)
@@ -25,7 +25,7 @@ Analyze `.chatmode.md` or `.prompt.md` files to understand their purpose, comple
Required:
- `${input:filePath:Path to .chatmode.md or .prompt.md file}` - Absolute or workspace-relative path to the file to analyze
- `${input:filePath:Path to .agent.md or .prompt.md file}` - Absolute or workspace-relative path to the file to analyze
Optional:
@@ -38,7 +38,7 @@ Optional:
**Read and Parse File**:
- Read the target `.chatmode.md` or `.prompt.md` file
- Read the target `.agent.md` or `.prompt.md` file
- Extract frontmatter (description, mode, tools, model if specified)
- Analyze body content to identify:
- Task complexity (simple/moderate/complex/advanced)
@@ -505,7 +505,7 @@ model: "[Recommended Model Name]"
### Failure Triggers
- File path is invalid or unreadable → Stop and request valid path
- File is not `.chatmode.md` or `.prompt.md` → Stop and clarify file type
- File is not `.agent.md` or `.prompt.md` → Stop and clarify file type
- Cannot determine task complexity from content → Request more specific file or clarification
- Model recommendation contradicts documented capabilities → Use Context7 to verify current info
- Subscription tier is invalid (not Free/Pro/Pro+) → Default to Pro and note assumption
@@ -551,7 +551,7 @@ If file specifies a deprecated model:
### Example 2: Complex Architecture Review
**File**: `architect.chatmode.md`
**File**: `architect.agent.md`
**Content**: "Review system design for scalability, security, maintainability; analyze trade-offs; provide ADR-level recommendations"
**Recommendation**: Claude Sonnet 4.5 (1x multiplier, expert reasoning, excellent for architecture)
**Alternative**: Claude Opus 4.1 (10x, use for very large codebases >500K tokens)
@@ -559,7 +559,7 @@ If file specifies a deprecated model:
### Example 3: Django Expert Mode
**File**: `django.chatmode.md`
**File**: `django.agent.md`
**Content**: "Django 5.x expert with ORM optimization, async views, REST API design; uses context7 for up-to-date Django docs"
**Recommendation**: GPT-5 (1x multiplier, advanced reasoning, excellent code quality)
**Alternative**: Claude Sonnet 4.5 (1x, alternative perspective, strong with frameworks)
@@ -567,7 +567,7 @@ If file specifies a deprecated model:
### Example 4: Free Tier User with Planning Mode
**File**: `plan.chatmode.md`
**File**: `plan.agent.md`
**Content**: "Research and planning mode with read-only tools (search, fetch, githubRepo)"
**Subscription**: Free (2K completions + 50 chat requests/month, 0x models only)
**Recommendation**: GPT-4.1 (0x, balanced, included in Free tier)

View File

@@ -11,7 +11,7 @@ Analyze current repository context and suggest relevant Custom Chat Modes files
## Process
1. **Fetch Available Custom Chat Modes**: Extract Custom Chat Modes list and descriptions from [awesome-copilot README.chatmodes.md](https://github.com/github/awesome-copilot/blob/main/docs/README.chatmodes.md). Must use `#fetch` tool.
2. **Scan Local Custom Chat Modes**: Discover existing custom chat mode files in `.github/chatmodes/` folder
2. **Scan Local Custom Chat Modes**: Discover existing custom chat mode files in `.github/agents/` folder
3. **Extract Descriptions**: Read front matter from local custom chat mode files to get descriptions
4. **Analyze Context**: Review chat history, repository files, and current project needs
5. **Compare Existing**: Check against custom chat modes already available in this repository
@@ -20,7 +20,7 @@ Analyze current repository context and suggest relevant Custom Chat Modes files
8. **Validate**: Ensure suggested chatmodes would add value not already covered by existing chatmodes
9. **Output**: Provide structured table with suggestions, descriptions, and links to both awesome-copilot custom chat modes and similar local custom chat modes
**AWAIT** user request to proceed with installation of specific custom chat modes. DO NOT INSTALL UNLESS DIRECTED TO DO SO.
10. **Download Assets**: For requested chat modes, automatically download and install individual chat modes to `.github/chatmodes/` folder. Do NOT adjust content of the files. Use `#todos` tool to track progress. Prioritize use of `#fetch` tool to download assets, but may use `curl` using `#runInTerminal` tool to ensure all content is retrieved.
10. **Download Assets**: For requested chat modes, automatically download and install individual chat modes to `.github/agents/` folder. Do NOT adjust content of the files. Use `#todos` tool to track progress. Prioritize use of `#fetch` tool to download assets, but may use `curl` using `#runInTerminal` tool to ensure all content is retrieved.
## Context Analysis Criteria
@@ -42,13 +42,13 @@ Display analysis results in structured table comparing awesome-copilot custom ch
| Awesome-Copilot Custom Chat Mode | Description | Already Installed | Similar Local Custom Chat Mode | Suggestion Rationale |
|---------------------------|-------------|-------------------|-------------------------|---------------------|
| [code-reviewer.chatmode.md](https://github.com/github/awesome-copilot/blob/main/chatmodes/code-reviewer.chatmode.md) | Specialized code review custom chat mode | ❌ No | None | Would enhance development workflow with dedicated code review assistance |
| [architect.chatmode.md](https://github.com/github/awesome-copilot/blob/main/chatmodes/architect.chatmode.md) | Software architecture guidance | ✅ Yes | azure_principal_architect.chatmode.md | Already covered by existing architecture custom chat modes |
| [debugging-expert.chatmode.md](https://github.com/github/awesome-copilot/blob/main/chatmodes/debugging-expert.chatmode.md) | Debug assistance custom chat mode | ❌ No | None | Could improve troubleshooting efficiency for development team |
| [code-reviewer.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/code-reviewer.agent.md) | Specialized code review custom chat mode | ❌ No | None | Would enhance development workflow with dedicated code review assistance |
| [architect.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/architect.agent.md) | Software architecture guidance | ✅ Yes | azure_principal_architect.agent.md | Already covered by existing architecture custom chat modes |
| [debugging-expert.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/debugging-expert.agent.md) | Debug assistance custom chat mode | ❌ No | None | Could improve troubleshooting efficiency for development team |
## Local Chatmodes Discovery Process
1. List all `*.chatmode.md` files in `.github/chatmodes/` directory
1. List all `*.agent.md` files in `.github/agents/` directory
2. For each discovered file, read front matter to extract `description`
3. Build comprehensive inventory of existing chatmodes
4. Use this inventory to avoid suggesting duplicates
@@ -56,7 +56,7 @@ Display analysis results in structured table comparing awesome-copilot custom ch
## Requirements
- Use `githubRepo` tool to get content from awesome-copilot repository chatmodes folder
- Scan local file system for existing chatmodes in `.github/chatmodes/` directory
- Scan local file system for existing chatmodes in `.github/agents/` directory
- Read YAML front matter from local chatmode files to extract descriptions
- Compare against existing chatmodes in this repository to avoid duplicates
- Focus on gaps in current chatmode library coverage

View File

@@ -10,7 +10,7 @@ Analyze current repository context and suggest relevant collections from the [Gi
## Process
1. **Fetch Available Collections**: Extract collection list and descriptions from [awesome-copilot README.collections.md](https://github.com/github/awesome-copilot/blob/main/docs/README.collections.md). Must use `#fetch` tool.
2. **Scan Local Assets**: Discover existing prompt files in `prompts/`, instruction files in `instructions/`, and chat modes in `chatmodes/` folders
2. **Scan Local Assets**: Discover existing prompt files in `prompts/`, instruction files in `instructions/`, and chat modes in `agents/` folders
3. **Extract Local Descriptions**: Read front matter from local asset files to understand existing capabilities
4. **Analyze Repository Context**: Review chat history, repository files, programming languages, frameworks, and current project needs
5. **Match Collection Relevance**: Compare available collections against identified patterns and requirements
@@ -60,14 +60,14 @@ For each suggested collection, break down individual assets:
**Installation Preview:**
- Will install to `prompts/`: 4 Azure-specific prompts
- Will install to `instructions/`: 6 infrastructure and DevOps best practices
- Will install to `chatmodes/`: 5 specialized Azure expert modes
- Will install to `agents/`: 5 specialized Azure expert modes
## Local Asset Discovery Process
1. **Scan Asset Directories**:
- List all `*.prompt.md` files in `prompts/` directory
- List all `*.instructions.md` files in `instructions/` directory
- List all `*.chatmode.md` files in `chatmodes/` directory
- List all `*.agent.md` files in `agents/` directory
2. **Extract Asset Metadata**: For each discovered file, read YAML front matter to extract:
- `description` - Primary purpose and functionality
@@ -98,7 +98,7 @@ When user confirms a collection installation:
3. **Install to Appropriate Directories**:
- `*.prompt.md` files → `prompts/` directory
- `*.instructions.md` files → `instructions/` directory
- `*.chatmode.md` files → `chatmodes/` directory
- `*.agent.md` files → `agents/` directory
4. **Avoid Duplicates**: Skip files that are substantially similar to existing assets
5. **Report Installation**: Provide summary of installed assets and usage instructions
@@ -106,7 +106,7 @@ When user confirms a collection installation:
- Use `fetch` tool to get collections data from awesome-copilot repository
- Use `githubRepo` tool to get individual asset content for download
- Scan local file system for existing assets in `prompts/`, `instructions/`, and `chatmodes/` directories
- Scan local file system for existing assets in `prompts/`, `instructions/`, and `agents/` directories
- Read YAML front matter from local asset files to extract descriptions and capabilities
- Compare collections against repository context to identify relevant matches
- Focus on collections that fill capability gaps rather than duplicate existing assets
@@ -125,7 +125,7 @@ When user confirms a collection installation:
- Download raw content from GitHub repository
- Validate file format and structure
- Check for substantial overlap with existing local assets
- Install to appropriate directory (`prompts/`, `instructions/`, or `chatmodes/`)
- Install to appropriate directory (`prompts/`, `instructions/`, or `agents/`)
4. **Installation Summary**: Report installed assets with usage instructions
5. **Workflow Enhancement Guide**: Explain how the collection improves development capabilities