Write useful Copilot repository instructions | DevPrompt Lab
Keep `.github/copilot-instructions.md` concise, accurate, and specific to the codebase.
rule · AI tooling · beginner
English Tiếng ViệtA guide for repository-level Copilot instructions with verified commands and conventions that affect code generation.
Reusable content
Write `.github/copilot-instructions.md` as concise Markdown describing the repository architecture, important conventions, safe implementation boundaries, and verified validation commands. State which directory owns each responsibility. Explain generated files or compatibility constraints that contributors must preserve. Avoid secrets, vague preferences, and instructions that conflict with local documentation. Keep code examples current and short.
Stack and architecture: {{STACK}}
Verified test and build commands: {{TEST_COMMANDS}}
Coding conventions: {{STYLE}}
How to use it
Verify GitHub's current instruction-file behavior and whether the repository uses any path-specific instruction files.
Example
For backend changes, preserve the JSON response envelope and enforce owner scope in SQL. Run `php -l` on changed files.