A PowerShell module for interacting with GitHub Copilot chat modes, providing easy discovery, installation, and analysis of chat mode configurations.
This module allows you to:
- Discover available chat modes from multiple repositories
- Install chat modes to your local
.github/chatmodesdirectory - Analyze tools and capabilities across different chat modes
- Search for specific tools or chat modes using wildcards
From the PowerShell Gallery:
Install-Module -Name copilot-chatmodes# Clone the repository
git clone https://github.com/dfinke/copilot-chatmodes.git
cd copilot-chatmodes
# Import the module
Import-Module .\copilot-chatmodes.psd1- PowerShell 5.1 or higher
- Internet connection for GitHub API access
- Optional:
GITHUB_TOKENenvironment variable for higher API rate limits
Public helper scripts (in Public/) provide small, focused tasks you can run directly from the repo root:
Public/Get-Chatmode.ps1— Wrapper to callGet-Chatmodefrom the module or from source.Public/Get-ChatmodeContent.ps1— Fetch and display chatmode content.Public/Get-ChatmodeTool.ps1— RunGet-ChatmodeToolquickly from the repository.Public/Install-Chatmode.ps1— Installs a chatmode file into a local.github/chatmodesfolder.Public/Show-ChatmodeWebsite.ps1— Opens the awesome-copilot chatmodes website in your browser.
Opens the default "awesome chatmodes" website in your browser, or a custom URL if provided.
# Open the awesome chatmodes page (default)
Show-ChatmodeWebsite
Use this function to quickly access the main resource for chatmodes.
The module provides convenient aliases for commonly used functions:
gcmt→Get-ChatmodeTool- Quick access to tool analysis and search
Discovers available chat modes from the GitHub repository.
You can now pass multiple names or patterns to Get-Chatmode (as separate arguments, not as an array). This allows you to search for several chat modes in a single call.
# Get all available chat modes
Get-Chatmode
# Search for specific chat modes (supports wildcards)
Get-Chatmode genui*
Get-Chatmode python*
# Search for multiple patterns at once (comma-separated, no quotes needed)
Get-Chatmode *azure*,python*,bicep*Output Example:
Files in 'chatmodes' directory of github/awesome-copilot matching '*azure*':
azure-architect.md
azure-developer.md
Files in 'chatmodes' directory of github/awesome-copilot matching 'python*':
python-expert.md
#### Owner filtering (new)
You can restrict discovery to a specific GitHub owner using the `-Owner` parameter. When provided, `Get-Chatmode` will only search the repo(s) associated with the owner (via the module's owner->repo mapping or the default repo list). This is useful when you want to limit results to a single maintainer's chatmodes.
```powershell
# List all chatmodes in owner 'dfinke' (uses dfinke/awesome-copilot-chatmodes)
Get-Chatmode -Owner dfinke
# Search only dfinke's repo for chatmodes starting with 'genui'
Get-Chatmode -Owner dfinke 'genui*'
# Search multiple owners (comma-separated or as an array)
Get-Chatmode -Owner dfinke,github '*azure*'
# Install only chatmodes from a specific owner (filter + install)
Get-Chatmode -Owner dfinke | Install-Chatmode -Owner dfinke
# Or rely on the piped object's Owner property (Install-Chatmode will respect the object's Owner)
Get-Chatmode -Owner dfinke | Install-Chatmode
Note: If an owner isn't present in the module's RepoMap or default Repos list, Get-Chatmode will warn and skip that owner. If you'd like dynamic owner->repo discovery, I can add an option to query GitHub for the owner's repositories.
### Install-Chatmode
Downloads and installs chat modes to your local `.github/chatmodes` directory.
```powershell
# Install a specific chat mode
Install-Chatmode genui
# Install multiple chat modes via pipeline
Get-Chatmode *azure* | Install-Chatmode
Analyzes and searches tools across chat modes with multiple operation modes.
Alias: gcmt (shorthand for Get-ChatmodeTool)
You can now pass multiple tool names or patterns to the -Name parameter, and multiple chat mode patterns to the -Mode parameter. Both parameters accept:
- Multiple arguments (space-separated)
- Comma-separated values (e.g.
editFiles,run*) - Wildcards (
*and?)
This allows you to search for several tools or chat modes in a single call, with flexible pattern matching.
# Use the full function name
Get-ChatmodeTool
# Or use the convenient alias
gcmt
# Both work the same way
gcmt *azure*
Get-ChatmodeTool *azure*
# Pass multiple tool names or patterns (space or comma separated)
Get-ChatmodeTool -Name editFiles run* *azure*
Get-ChatmodeTool -Name editFiles,run*,*azure*
gcmt -Name editFiles run* *azure*
gcmt -Name editFiles,run*
# Combine with Mode filtering (also supports multiple/comma-separated patterns)
Get-ChatmodeTool -Name editFiles run* -Mode *bicep*,azure-*
gcmt -Name editFiles,run* -Mode *bicep*,azure-*Get-ChatmodeTool
# Or use the alias
gcmtOutput:
Filename Tools
-------- -----
azure-principal-architect.chatmode {changes, codebase, editFiles, extensions...}
azure-saas-architect.chatmode {changes, codebase, editFiles, extensions...}
# Find tools starting with "edit"
Get-ChatmodeTool edit*
# Or using the alias
gcmt edit*
# Find tools containing "azure"
gcmt *azure*
# Find exact tool match
gcmt "microsoft.docs.mcp"Output:
Type Name Source
---- ---- ------
Chatmode editFiles azure-principal-architect.chatmode
Chatmode editFiles azure-saas-architect.chatmode
# Get all tools from a specific chat mode
Get-ChatmodeTool -Mode azure-saas-architect.chatmode
# Get tools from multiple chat modes using wildcards
Get-ChatmodeTool -Mode *bicep*
Get-ChatmodeTool -Mode azure-verified*Output:
Type Name Source
---- ---- ------
Chatmode changes azure-saas-architect.chatmode
Chatmode codebase azure-saas-architect.chatmode
Chatmode editFiles azure-saas-architect.chatmode
...
Search for specific tools within specific chat modes by combining both parameters:
# Find "run" tools in bicep-related chat modes
Get-ChatmodeTool run* -Mode *bicep*
# Find Azure tools in terraform chat modes
Get-ChatmodeTool -Mode *terraform* azure*
# Find edit tools in SaaS architect chat mode
Get-ChatmodeTool edit* -Mode azure-saas*Output:
Type Name Source
---- ---- ------
Chatmode runCommands azure-verified-modules-bicep.chatmode
Chatmode runTasks azure-verified-modules-bicep.chatmode
Chatmode runTests azure-verified-modules-bicep.chatmode
The Get-ChatmodeTool function provides powerful search capabilities with four distinct modes:
Returns overview of all chat modes with their tool collections:
Get-ChatmodeToolSearch for tools across all chat modes. The Name parameter now accepts one or more strings or comma-separated patterns:
# Single pattern or name
Get-ChatmodeTool run* # Find all tools starting with "run"
Get-ChatmodeTool *azure* # Find all tools containing "azure"
Get-ChatmodeTool editFiles # Find exact tool matches
# Multiple patterns/names (space or comma separated)
Get-ChatmodeTool -Name editFiles run* *azure*
Get-ChatmodeTool -Name editFiles,run*,*azure*List all tools from specific chat modes. The -Mode parameter also supports multiple or comma-separated patterns:
Get-ChatmodeTool -Mode *bicep* # All tools from bicep chat modes
Get-ChatmodeTool -Mode azure-saas-architect # All tools from specific mode
Get-ChatmodeTool -Mode azure-verified* # All tools from matching modes
Get-ChatmodeTool -Mode azure-verified*,*bicep* # Multiple patterns (comma separated)The most powerful feature - search for specific tools within specific chat modes. Both parameters accept multiple/comma-separated patterns:
Get-ChatmodeTool run* -Mode *bicep* # Run tools in bicep modes
Get-ChatmodeTool -Mode *terraform* azure* # Azure tools in terraform modes
Get-ChatmodeTool microsoft* -Mode *architect* # Microsoft tools in architect modes
Get-ChatmodeTool -Name run*,editFiles -Mode *bicep*,*terraform* # Multiple tool and mode patternsKey Benefits:
- Precision: Find exactly what you need with targeted searches
- Flexibility: Parameters work in any order and combination
- Wildcards: Full wildcard support for both tool names and chat mode names
- Consistency: Same output format regardless of search complexity
# Find all Azure-related chat modes
Get-Chatmode "*azure*"
# Install all Azure chat modes
Get-Chatmode "*azure*" | Install-Chatmode
# Verify installation
Get-ChildItem .\.github\chatmodes\# Find which chat modes use specific tools
gcmt "azure_design_architecture"
# Count tools per chat mode
gcmt | ForEach-Object { "$($_.Filename): $($_.Tools.Count) tools" }
# Get unique tools across all chat modes
gcmt -Mode "*" | Select-Object Name -Unique | Sort-Object Name# Find chat modes that can edit files
gcmt editFiles
# Find chat modes with Azure-specific tools
gcmt *azure* | Group-Object Source
# Explore tools in bicep-related chat modes
gcmt -Mode *bicep*
# Find specific tools in specific chat modes
gcmt run* -Mode *terraform*
gcmt microsoft* -Mode azure-saas*For better performance and higher API rate limits, set your GitHub token:
# Set GitHub token (optional but recommended)
$env:GITHUB_TOKEN = "your-github-token-here"
# Or set it permanently in your PowerShell profile
Add-Content $PROFILE '$env:GITHUB_TOKEN = "your-github-token-here"'When you install chat modes, they are organized as follows:
.github/
└── chatmodes/
├── azure-architect.md
├── python-expert.chatmode.md
└── other-chatmode.md
# Chain operations together
Get-Chatmode "*python*" |
Install-Chatmode |
ForEach-Object { Get-ChatmodeTool -Mode $_.Name }
# Find and analyze specific tool patterns
Get-ChatmodeTool *test* |
Group-Object Source |
Sort-Object Count -Descending
# Advanced combined searches
Get-ChatmodeTool azure* -Mode *architect* |
Group-Object Name |
Sort-Object Count -Descending# Find chat modes with the most tools
Get-ChatmodeTool |
Sort-Object { $_.Tools.Count } -Descending |
Select-Object -First 5
# Export tool analysis to CSV
Get-ChatmodeTool -Mode "*" |
Export-Csv -Path "chatmode-tools.csv" -NoTypeInformation
# Compare tools between specific chat mode types
Get-ChatmodeTool azure* -Mode *bicep* | Select-Object Name
Get-ChatmodeTool azure* -Mode *terraform* | Select-Object Name
# Find common tools across multiple chat modes
$bicepTools = Get-ChatmodeTool -Mode *bicep* | Select-Object -ExpandProperty Name
$terraformTools = Get-ChatmodeTool -Mode *terraform* | Select-Object -ExpandProperty Name
$bicepTools | Where-Object { $_ -in $terraformTools }- Rate Limit Exceeded: Set the
GITHUB_TOKENenvironment variable - Network Connectivity: Ensure internet access to api.github.com
- Permission Issues: Run PowerShell as Administrator if directory creation fails
# Enable verbose output for debugging
Get-Chatmode -Verbose
Get-ChatmodeTool -Verbose -Mode "*azure*"- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Version: 0.1.0
- Author: Doug Finke
- PowerShell Version: 5.1+
- Dependencies: None (uses built-in cmdlets)
This project is licensed under the terms specified in the LICENSE file.
Happy coding with GitHub Copilot chat modes! 🚀
- 2025-08-18: Added repository helper scripts (
InstallModule.ps1,PublishToGallery.ps1) andPublic/helper scripts; enhanced search and pattern support across discovery functions.