Copilot Prompting
Use this skill when copilot:copilot-delegate needs to compose a prompt for the Copilot companion runtime.
Prompt Copilot like an operator, not a collaborator. Keep prompts compact and block-structured with clear sections. State the task, the output contract, the follow-through defaults, and the small set of extra constraints that matter.
Core rules:
- Prefer one clear task per Copilot run. Split unrelated asks into separate runs.
- Tell Copilot what done looks like. Do not assume it will infer the desired end state.
- Add explicit grounding and verification rules for any task where unsupported guesses would hurt quality.
- Prefer better prompt contracts over adding long natural-language explanations.
- Use explicit contracts over vague nudges.
Block-structured prompt format:
- Context: repository context, git branch, recent changes, relevant architecture notes.
- Task: the concrete job, scope, and what done looks like.
- Constraints: boundaries, what not to touch, required patterns, size limits.
- Output Format: exact shape, ordering, and brevity requirements. Request structured JSON output for machine-parseable results.
Model-specific guidance:
Copilot supports multiple backend models including GPT-5, Claude, and Gemini. Tailor prompts to model strengths:
- GPT-5: strong at structured output, code generation, and following detailed XML/JSON contracts. Use explicit output schemas.
- Claude: strong at nuanced reasoning, long-context analysis, and careful instruction following. Provide clear task decomposition.
- Gemini: strong at search-grounded research, multimodal analysis, and broad knowledge tasks. Include search context when relevant.
When to add sections:
- Coding or debugging: add verification criteria and missing-context handling.
- Review or adversarial review: add grounding rules and structured output contract.
- Research or recommendation tasks: add citation requirements and search context.
- Write-capable tasks: add action safety constraints so Copilot stays narrow and avoids unrelated refactors.
Repository context inclusion:
- Include the current git branch name when relevant to the task.
- Include recent commit messages or diff summary when reviewing changes.
- Include relevant architecture notes or patterns from the codebase when the task depends on them.
- Do not include entire file contents unless the task specifically requires them.
Prompt assembly checklist:
- Define the exact task and scope in the Context and Task sections.
- Choose the smallest output contract that still makes the answer easy to use.
- Decide whether Copilot should keep going by default or stop for missing high-risk details.
- Add verification, grounding, and safety constraints only where the task needs them.
- Remove redundant instructions before sending the prompt.