Copilot Instructions File Template
This instruction file is loaded by Copilot for every suggestion in the repo. Defining conventions once here means every inline completion and chat response follows your team's standards automatically — no more repeating preferences.
# .github/copilot-instructions.md ## Project: {{projectName}} - Language: {{language}} ({{languageVersion}}) - Framework: {{framework}} ({{frameworkVersion}}) - Package manager: {{packageManager}} ## Coding Conventions - Use {{namingConvention}} for variables and functions - Prefer {{componentStyle}} components - Error handling: {{errorHandlingPattern}} - Always add return types to exported functions ## Testing - Framework: {{testFramework}} - File naming: {{testFilePattern}} - Minimum coverage expectations: {{coverageExpectations}} ## Do NOT - Use \`any\` type in TypeScript - Use default exports (prefer named exports) - Add comments that restate the code - Import from relative paths when path aliases exist
Variables to customize
Why this prompt works
This instruction file is loaded by Copilot for every suggestion in the repo. Defining conventions once here means every inline completion and chat response follows your team's standards automatically — no more repeating preferences.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Context-Aware Code CompletionProviding the surrounding code and project context lets the model match existing patterns exactly. The constraint against modifying existing code prevents unwanted side effects.
Inline Code SuggestionConstraining suggestions to match existing style and scope produces insertions that feel native to the codebase. The 'no explanation' rule mimics real inline completion behavior.
Code ExplanationThe audience level parameter adjusts complexity automatically. Requiring a usage example ensures the explanation is practical, not just theoretical.