Back to guide/Developer Tools

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.

copilot-promptsprojectNamelanguagelanguageVersion
Edit View
Prompt
# .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

{{projectName}}{{language}}{{languageVersion}}{{framework}}{{frameworkVersion}}{{packageManager}}{{namingConvention}}{{componentStyle}}{{errorHandlingPattern}}{{testFramework}}{{testFilePattern}}{{coverageExpectations}}

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.