Copilot Context ManagerBuild, manage, and silently inject your system prompt into every Copilot Chat message. Stop re-pasting your system prompt. Store it once, switch between role-specific prompts instantly, and use Features📝 Prompt Library
🔄 Soft Re-injection with
|
| Command | Description |
|---|---|
@context [question] |
Answer the question with your system prompt silently prepended |
@context (no text) |
Sync instructions file, show one-line confirmation |
@context /reinject |
Same as no-text — refresh instructions file silently |
@context /build [description] |
AI-generate a prompt from a description, then save it |
@context /show |
Print your active prompt in a code block |
@context /list |
List all prompts in your library |
@context /set |
Open the prompt switcher picker |
@context /apply |
Sync active prompt to workspace .github/copilot-instructions.md |
Status Bar
The status bar item shows: $(copilot) [Prompt Name]
Click it for a quick-action menu: switch context, build a new prompt, apply to workspace, open editor.
Managing Prompts
Prompts are stored in .vscode/copilot-prompts.json in your workspace:
{
"activeContext": "backend-dev",
"contexts": [
{
"id": "backend-dev",
"name": "Backend Development",
"description": "Node.js / TypeScript API work",
"prompt": "You are an expert backend engineer specializing in Node.js and TypeScript..."
},
{
"id": "code-review",
"name": "Code Review",
"description": "Thorough review mode",
"prompt": "You are a senior engineer performing a detailed code review..."
}
]
}
Template Variables
Use these placeholders in your prompt — they resolve at injection time:
| Variable | Resolves to |
|---|---|
{{workspaceName}} |
Current workspace folder name |
{{fileName}} |
Currently open file path |
{{languageId}} |
Language of the active editor |
{{timestamp}} |
Current ISO timestamp |
Command Palette Commands
| Command | Description |
|---|---|
Copilot Context: Build Prompt with Wizard |
Launch the 5-step guided prompt builder |
Copilot Context: New Prompt |
Create a prompt from scratch |
Copilot Context: Select Active Context |
Switch the active prompt |
Copilot Context: Edit Prompts (JSON) |
Open the raw prompts file |
Copilot Context: Import Prompt from File |
Import .md / .txt as a new prompt |
Copilot Context: Export Active Prompt |
Save active prompt to a file |
Copilot Context: Copy Prompt to Clipboard |
Copy prompt text |
Copilot Context: Delete a Prompt |
Remove a prompt from the library |
Copilot Context: Apply to Workspace |
Sync to .github/copilot-instructions.md |
Copilot Context: Apply Globally |
Sync to ~/.github/copilot-instructions.md |
Copilot Context: Show Current Prompt |
Display active prompt in editor panel |
Copilot Context: Quick Action |
Open the status bar action menu |
Settings
| Setting | Default | Description |
|---|---|---|
copilotContext.promptsFile |
.vscode/copilot-prompts.json |
Path to the prompts storage file |
copilotContext.enableStatusBar |
true |
Show status bar indicator |
copilotContext.defaultScope |
workspace |
Default sync scope: workspace, global, or both |
License
MIT