Choose what VS Code should reuse
VS Code custom instructions give an agent reusable guidance about a project, such as where to add code, which libraries to use, and which tests to run. Store this guidance in Markdown files instead of repeating it in every prompt. See VS Code custom instructions.
Create the right project instruction file
Open the Agent Customizations editor, select + next to Workspace, and choose the project instruction file offered for your harness. The selected harness determines which instruction files VS Code reads. VS Code documents .github/copilot-instructions.md or AGENTS.md for Copilot, AGENTS.md for OpenAI Codex, and CLAUDE.md for Anthropic Claude. See VS Code custom instructions.
Keep instructions concise and project-specific
Write a short statement for each requirement and explain non-obvious constraints. Do not duplicate formatter or linter rules. For one-time guidance, put it in the prompt instead of creating a shared rule. Instructions guide the model, but they do not guarantee compliance or replace tests, code review, or security controls. See VS Code custom instructions.
Scope rules to relevant files
Targeted .instructions.md files can use applyTo patterns, while Claude rules files can use paths patterns. Codex uses directory locations instead. Codex loads nested instructions along the path from the repository root to the session working directory. See VS Code custom instructions.
Attach reference material when needed
Use Add Context in the chat input to attach an existing instruction file to one request. A Markdown link to supporting documentation does not guarantee that the document contents reach the model, so attach the relevant file when the agent needs it. See VS Code custom instructions.
Know your instruction limits
Custom instructions do not apply to inline suggestions as you type. An instruction file such as AGENTS.md gives guidance to an existing agent, but does not define a custom agent. See VS Code custom instructions.
Questions people ask
Where should I put VS Code project instructions?
Use the project instruction file offered for your selected harness. VS Code documents .github/copilot-instructions.md or AGENTS.md for Copilot, AGENTS.md for Codex, and CLAUDE.md for Claude. See VS Code custom instructions.
Can VS Code read my KnowMan articles?
The available documentation does not show how to connect KnowMan to VS Code or how VS Code agents can read saved KnowMan articles. KnowMan does document local MCP configurations for Claude Desktop, Claude Code, and Cursor in its MCP server guide.
Do I need to repeat project instructions in every prompt?
No. Store reusable guidance in Markdown instruction files instead of repeating it in every prompt. For one-time requirements, put the guidance in the prompt. See VS Code custom instructions.
How do I check that my instructions work?
Start a new chat using the same harness and repository, without repeating the rules in the prompt. This avoids relying on guidance left in the earlier conversation. See VS Code custom instructions.