Detailed guide on creating and optimizing the .github/copilot-instructions.md file for consistent project-wide Copilot behavior.
Mastering copilot-instructions.md:
1. **File Location**: `.github/copilot-instructions.md` (exact path required)
2. **Content Structure**:
- Project overview and tech stack
- Coding conventions and style guide
- Architecture patterns to follow
- Testing requirements
- Security practices
- Performance considerations
3. **Effective Patterns**:
- Use headers to organize sections
- Be prescriptive, not descriptive
- Include "DO" and "DON'T" lists
- Reference specific libraries and versions
- Mention file naming conventions
4. **Anti-Patterns to Avoid**:
- Too vague ("write good code")
- Too long (keep under 2000 words)
- Contradictory instructions
- Instructions that conflict with language defaults
5. **Maintenance**: Update as project evolves, review quarterlyA 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.