VS Code February events – Agent Sessions Day on Feb 19th
Dismiss this update
AI models have broad general knowledge but don't know your codebase or team practices. Think of the AI as a skilled new team member: it writes great code, but doesn't know your conventions, architecture decisions, or preferred libraries. Customization is how you share that context, so responses match your coding standards, project structure, and workflows.
This article covers the customization options in VS Code: custom instructions, prompt files, custom agents, agent skills, MCP servers, and language models.
| Goal | Use | When it activates |
|---|---|---|
| Apply coding standards everywhere | Always-on instructions | Automatically included in every request |
| Different rules for different file types | File-based instructions | When files match a pattern or description |
| Reusable task I run repeatedly | Prompt files | When you invoke a slash command |
| Package multi-step workflow with scripts | Agent skills | When the task matches the skill description |
| Specialized AI persona with tool restrictions | Custom agents | When you select it or another agent delegates to it |
| Connect to external APIs or databases | MCP | When the task matches a tool description |
| Automate tasks at agent lifecycle points | Hooks | When the agent reaches a matching lifecycle event |
Prompt files vs custom agents: Prompt files are best for single, repeatable tasks invoked as slash commands (for example, scaffolding a component). Custom agents are persistent personas that control which tools are available and can orchestrate subagents for multi-step workflows.
Custom instructions enable you to define common guidelines and rules that automatically influence how AI generates code and handles other development tasks. Instead of manually including context in every chat prompt, specify custom instructions in a Markdown file to ensure consistent AI responses that align with your coding practices and project requirements.
VS Code supports two type of custom instructions:
Use custom instructions to:
Agent Skills enable you to give the AI specialized capabilities and workflows through folders containing instructions, scripts, and resources. These skills are loaded on-demand based on the task at hand. Agent Skills is an open standard that works across multiple AI agents, including VS Code, GitHub Copilot CLI, and GitHub Copilot coding agent.
Use Agent Skills to:
Prompt files, also known as slash commands, let you simplify prompting for common tasks by encoding them as standalone Markdown files that you can invoke directly in chat. Each prompt file includes task-specific context and guidelines about how the task should be performed.
Use prompt files to:
Custom agents enable you to let the AI assume different personas for specific roles or tasks, like a database administration, front-end development, or planning. A custom agent is described in a Markdown file that defines its behavior, capabilities, tools, and language model preferences.
Use custom agents to:
MCP and tools provide a gateway to external services and specialized tools through Model Context Protocol (MCP). This extends the agent's capabilities beyond code and the terminal, and enable it to interact with databases, APIs, and other development tools. MCP Apps let you define rich user experiences, like dashboards or forms, to facilitate complex interactions.
Use MCP and tools to:
Hooks enable you to execute custom shell commands at key lifecycle points during agent sessions. Hooks provide deterministic, code-driven automation that runs regardless of how the agent is prompted.
Use hooks to:
Language models let you choose from different AI models optimized for specific tasks. You can switch between models to get the best performance for code generation, reasoning, or specialized tasks like vision processing. Bring your own API key to access more models or have more control over model hosting.
Use different language models to:
Implement AI customizations incrementally. Start with the basics and add more as needed.
Initialize your project: Type /init in chat to analyze your workspace and generate a .github/copilot-instructions.md file with coding standards and project context tailored to your codebase. Review and refine the generated instructions.
Add targeted rules: Create file-based *.instructions.md files to apply specific rules for different parts of your codebase, such as language conventions or framework patterns.
Automate repetitive tasks: Create prompt files for common workflows like component generation, code reviews, or documentation. Add MCP servers to connect external services like issue trackers or databases.
Create specialized workflows: Build custom agents for specific roles or project phases. Package reusable capabilities as agent skills to share across tools and minimize context usage.
If your customization files aren't being applied or are causing unexpected behavior, use the chat customization diagnostics view to identify problems.
Select Configure Chat (gear icon) > Diagnostics in the Chat view to see all loaded custom agents, prompt files, instruction files, and skills along with any errors. Check for issues like syntax errors, invalid configurations, or problems loading resources.
Learn more about troubleshooting AI in VS Code.