Copilot Prompt File
<!-- SPDX-License-Identifier: MIT -->
<!-- Copyright (c) PromptKit Contributors -->
---
name: copilot-prompt-file
type: format
description: >
Output format for GitHub Copilot prompt files
(.github/prompts/*.prompt.md). Packages an assembled PromptKit
prompt as a reusable slash command invokable in Copilot Chat
across VS Code, Visual Studio, and JetBrains IDEs. Full semantic
fidelity — no content condensation.
produces: copilot-prompt-file
---
# Format: Copilot Prompt File
The output MUST be a ready-to-commit `.prompt.md` file that packages
the assembled PromptKit prompt as a GitHub Copilot Chat slash command.
The file is placed in `.github/prompts/` and becomes invokable via
`/<name>` in Copilot Chat.
**Semantic fidelity rule:** The assembled content MUST be preserved
verbatim. Every protocol phase, every check, every pattern, every
example from the source components MUST appear in the output. The
only transformations allowed are structural repackaging (section
headings, frontmatter, variable syntax) — never content removal.
Do NOT produce raw PromptKit output with assembly headers (`# Identity`,
`# Reasoning Protocols`, etc.). Repackage into natural headings that
read coherently as a standalone prompt file.
## Output Structure
### 1. File Manifest
State the file that will be created. This manifest is explanatory
output only — it is NOT part of the committed `.prompt.md` file content.
| File Path | Slash Command |
|-----------|---------------|
| `.github/prompts/<name>.prompt.md` | `/<name>` |
### 2. File Content
Emit the complete contents of `.github/prompts/<name>.prompt.md` as one
contiguous block (e.g., a single fenced code block), with no interleaved
commentary, checklist items, tables, or explanatory prose inside that
block. The block MUST contain the entire committed file, in order:
1. YAML frontmatter between `---` markers
2. The full Markdown body of the prompt
Any file manifest, activation checklist, or other supporting guidance
MUST appear outside that single file-content block.
### 3. YAML Frontmatter
The `.prompt.md` file MUST begin with YAML frontmatter between `---`
markers containing:
| Field | Required | Source | Description |
|-------|----------|--------|-------------|
| `description` | Yes | Template `description` | Single sentence describing the actionable outcome |
| `agent` | Yes | Default: `agent` | The agent mode: `ask`, `edit`, `agent`, or `plan` |
| `model` | No | User preference | Language model ID (e.g., `Claude Sonnet 4`) |
| `tools` | No | Task requirements | List of tool/toolset names (e.g., `['search/codebase']`) |
| `argument-hint` | No | Template params | Hint text for user input |
**Frontmatter rules:**
- Use single quotes for all string values
- One field per line for clean git diffs
- Derive `description` from the PromptKit template's description —
rewrite as a concise, actionable sentence if necessary
- Set `agent` based on whether the prompt needs tool access:
- `agent` — for prompts that read/write files, search code, or
run commands
- `ask` — for prompts that only analyze provided context and produce
a response (no tool use)
- Include `tools` only when the prompt requires specific tools beyond
the agent's defaults
### 4. Markdown Body
The body contains the full assembled PromptKit prompt, repackaged with
format-native headings. Follow this structure:when to use it
Community prompt sourced from the open-source GitHub repo microsoft/PromptKit (MIT). A "Copilot Prompt File" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
microsoft/PromptKit · MIT