Where Copilot CLI looks for instructions
User-level instructions live in $HOME/.copilot/copilot-instructions.md and apply across repositories (GitHub docs). Repository-wide instructions live in .github/copilot-instructions.md, and modular files under .github/instructions/ ending in .instructions.md are discovered in the standard locations (GitHub docs). AGENTS.md files provide agent instructions and are discovered the same way (GitHub docs).
Standard discovery locations include the repository root, the current working directory, intermediate directories between them, and any directories nested in the path of a file being worked on (GitHub docs). Path-specific custom instructions use glob syntax to say which files or directories they apply to (GitHub docs).
Combine files and check them with /instructions
Run the /instructions command to view the instruction files discovered for the current session and to enable or disable individual files (GitHub docs). When multiple user-level and repository instruction files exist, Copilot CLI combines their instructions (GitHub docs). There is no general precedence order between these files, so avoid conflicting instructions (GitHub docs).
Custom instructions are natural language and are most effective as short, self-contained statements (GitHub docs).
Reference other files with @
In an instruction file, write @ followed by a relative path to include another file. Copilot CLI reads the referenced file immediately and supports references within referenced files (GitHub docs). Referenced files must remain within the repository, or within the custom instructions directory for local instructions (GitHub docs).
The added instruction content is not displayed, but is available to Copilot to allow it to generate higher quality responses (GitHub docs).
How instruction changes take effect
Changes to custom instruction files are not immediately available in active CLI sessions (GitHub docs). To apply your changes, exit the session, then resume it with copilot --continue, or start a new session with /new (GitHub docs).
Copilot CLI uses local files for personal instructions instead of the personal instructions configured on GitHub.com, and organization custom instructions are not supported in local client sessions (GitHub docs). Because AI is non-deterministic, Copilot may not follow your instructions in exactly the same way every time (GitHub docs).
Bring in outside knowledge with an MCP server
GitHub's docs note that if you know a specific MCP server can achieve a particular task, naming it in your prompt can help Copilot deliver the results you want (GitHub docs). KnowMan runs a hosted remote MCP server at https://api.knowman.io/mcp over Streamable HTTP, with OAuth sign-in or an API key sent as Authorization: Bearer <key> (KnowMan MCP).
A local stdio server is also available with npx -y @knowman/mcp on Node 22 or newer (KnowMan MCP). For background on the pattern, see the MCP server knowledge base guide. The steps to register an MCP server in Copilot CLI are not covered on this page.
What the KnowMan server can do
KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps memories such as claims, decisions, and playbooks (KnowMan). Its MCP server exposes six tools: kb_search, kb_ask, kb_get_item, kb_save, kb_recent, and kb_memories (KnowMan MCP). kb_search finds saved items by keyword or meaning, kb_ask answers with citations, and kb_save stores a URL with an optional note (KnowMan MCP).
For the wider pattern, see knowledge bases for AI agents and give your AI context.
Where KnowMan fits
Instruction files keep Copilot CLI anchored to your repository: referenced files must remain within the repository, or within the custom instructions directory (GitHub docs). KnowMan covers material outside that scope: it saves articles and links, reads and tags them, and keeps memories such as claims, decisions, and playbooks (KnowMan).
For the general idea, see a personal knowledge base, persistent memory for AI agents, and connect any AI to your notes.
Questions people ask
How do I give Copilot CLI context across repositories?
User-level instructions live in $HOME/.copilot/copilot-instructions.md and apply across repositories (GitHub docs). Repository-wide instructions live in .github/copilot-instructions.md and are discovered in the standard locations (GitHub docs).
Where do I put custom instructions for Copilot CLI?
User-level instructions live in $HOME/.copilot/copilot-instructions.md, and repository-wide instructions live in .github/copilot-instructions.md (GitHub docs). Modular files under .github/instructions/ and AGENTS.md files are discovered in the standard locations (GitHub docs).
Why are my custom instruction changes not showing up?
Changes to custom instruction files are not immediately available in active CLI sessions (GitHub docs). Exit the session, then resume it with copilot --continue, or start a new session with /new (GitHub docs).
Can Copilot CLI search my saved articles?
Naming a specific MCP server in your prompt can help Copilot deliver the results you want when that server can do the task (GitHub docs). KnowMan's server exposes kb_search and kb_ask at https://api.knowman.io/mcp (KnowMan MCP). Adding an MCP server in Copilot CLI is not covered on this page.