A minimal VS Code extension that provides a generic prompt library for GitHub Copilot Chat. The extension reads prompt/agent markdown files under .github/ and makes them available as chat commands.
Features
- Generic prompt library system that reads from markdown files
- Easy to extend with new prompts
- Integration with GitHub Copilot Chat
Available Commands
/code-review
Runs the code review prompt.
/Test
Generates test cases.
/ultimate-secure-fix
Scans the current file for security vulnerabilities.
/update-impl
Implements an explicit Jira/iTrack ticket in the current workspace using MCP work-item retrieval.
- Reuses prior assigned-work-items results from chat context when available.
- Resolves the exact ticket key/id provided by the user.
- Fetches full ticket details before proposing/performing implementation.
Command Tool Access
The extension now uses per-command tool whitelists instead of sending the full VS Code tool registry for tool-enabled agents.
| Command | Tool mode | Allowed tools |
|---|---|---|
/code-review |
Enabled | Read/search workspace, inspect usages, check problems/changed files/test failures, fetch docs/web references, browse extensions/API docs, manage todos, run subagent |
/ultimate-secure-fix |
Enabled | Read/search workspace, inspect usages, edit/create files, check errors, manage todos |
/Test |
Enabled | Read/search workspace, inspect usages, edit/create files, check errors, manage todos |
/update-impl |
Enabled | Work-item retrieval, read/search workspace, inspect usages, edit/create files, check errors/changes, run terminal, manage todos, run subagent |
This keeps code-review, ultimate-secure-fix, Test, and update-impl below the model tool-count limit while preserving the tools each agent is meant to use.
Project Structure
.
├── .github/
│ ├── agents/ # Agent instructions (YAML frontmatter)
│ └── prompts/ # Prompt templates
├── src/
│ └── extension.ts # Main extension code
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── README.md
How to Use
-
Install dependencies:
npm install -
Compile the extension:
npm run compile -
Press F5 in VS Code to launch the extension in a new Extension Development Host window
-
Open GitHub Copilot Chat and use one of:
@prompt-library /code-review@prompt-library /Test@prompt-library /ultimate-secure-fix@prompt-library /update-impl
Adding New Prompts
To add a new prompt:
- Create a new markdown file in the
prompts/folder (e.g.,prompts/my-prompt.md) - Write your prompt content in the markdown file
- Add a new command in
package.jsonundercontributes.chatParticipants[0].commands - Add an entry to the
COMMAND_PROMPT_MAPinsrc/extension.tsmapping the command name to the prompt file
Development
- Compile:
npm run compile - Watch mode:
npm run watch
Requirements
- VS Code 1.106.0 or higher
- GitHub Copilot extension