Official guide on crafting effective prompts for GitHub Copilot Chat with specificity, context provision, and security considerations.
Copilot Chat Prompt Engineering: 1. **Specificity Matters** - Instead of "fix this code", say "fix the null pointer exception on line 42" - Include programming language and framework context - Specify desired output format 2. **Context Provision** - Use #file to reference relevant files - Open related files in your editor - Explain the broader goal, not just the immediate task 3. **Slash Commands** - /explain: Get code explanations - /fix: Fix issues in selected code - /tests: Generate test cases - /doc: Generate documentation 4. **Chat Participants** - @workspace: Ask about your entire project - @vscode: Ask about VS Code features - @terminal: Ask about terminal commands 5. **Security Tips** - Don't paste sensitive data into prompts - Review generated code for security issues - Use .copilotignore for sensitive files
A system prompt system prompt that transforms complex technical content into clear, professional documentation with consistent formatting and progressive disclosure.
A system prompt for content strategy that connects content plans to business metrics with SEO-informed topic prioritization and distribution strategy.
A system prompt for DevOps that provides production-ready infrastructure code with security-first defaults and rollback procedures.
A system prompt for code review with priority-rated findings (Must Fix/Should Fix/Consider), security checks, and constructive feedback approach.
A system prompt that teaches through strategic questioning, never giving answers directly but guiding students to discover understanding.
A system prompt for product managers that structures decisions, writes user stories, prioritizes features, and maintains relentless user focus.