Categories
Tags
Agent Mode Astro Auto Accept Automation Camping changelog Chat clear CLI Code Actions Codex compact Component Design Configuration context Context Copilot copy Ctrl+S CUDA Cursor Day Trip delegate diff Dynamic Routing Editor Error Error Fix Error Handling experimental Gemini git GitHub GitHub Copilot Google Hiking Hot Springs init Installation Iwate Prefecture Kobe Linux Localization Mac Mention Meteor Shower Mode Switching model Nara Prefecture NES NoAdapterInstalled Node.js nvm OpenAI params plan PowerShell Prompt props Public Key Authentication Python Redirect Reference Rename research rewind SEO Settings share Shell Execution Shift+Tab Shortcut SSH SSH config ssh-copy-id Stargazing Static Site streamer-mode Student undo Update usage Visual Studio VS Code VS2026 Windows WSL
134 words
1 minutes
How to Set Up Project Instructions in GitHub Copilot CLI【/init】
Overview
Does Copilot keep generating code that doesn’t quite match your project’s coding standards?
“We use camelCase here, not snake_case.” “Tests should be in Vitest, not Jest.” Sound familiar? You can fix this with /init.
Usage
Run this in Copilot CLI:
/copilot> /initThis creates a Copilot instruction file for your repository. Write your project’s rules there, and Copilot will follow them in every session.
What Gets Created?
/init generates an instruction file (e.g., COPILOT.md or .github/copilot-instructions.md) in your repository.
You can specify things like:
- Coding conventions (naming, indentation, etc.)
- Preferred frameworks and libraries
- How tests should be written
- Patterns to avoid
The Difference
| Before | After |
|---|---|
| Correcting “use Vitest, not Jest” every time | Copilot uses Vitest by default |
| Fixing naming conventions manually | Code follows your standards from the start |
| Output varies between team members | Everyone gets consistent results |
Related Posts
How to Set Up Project Instructions in GitHub Copilot CLI【/init】
https://naonao-na.com/en/posts/github-copilot-cli-init/
