Mastering AI Coding Tools: Custom Instructions & MCP
What Are Custom Instructions?
Custom instructions are configuration files that help AI tools like GitHub Copilot understand how you want your code written. Instead of repeatedly explaining your preferences, you define them once in a file, and the AI applies them every time it helps you write or review code.
For example, you might prefer:
– Friendly and informal responses
– Descriptive names for variables and functions
– Clean and simple code with one purpose per file
– No unnecessary comments
These preferences go into a file like copilot-instructions.md. This file lives in your project folder and is automatically read by Copilot and other compatible tools. By setting up these rules, you help the AI produce code that matches your team’s standards and makes your life easier.
Two Types of Custom Instructions
AI coding tools support two types of instruction files:
1. Global Instructions (copilot-instructions.md)
These are general guidelines applied across your entire project. They set the tone and style of your codebase.
2. Fine-tuned Instructions (custom.instructions.md)
These are more specific and can apply to individual file types (like .ts, .css, or .html) or tasks (like writing commit messages or generating tests).
This fine-grained control allows developers to tailor how the AI behaves in different contexts. For example:
– Use a strict naming convention in TypeScript files
– Avoid inline styles in HTML files
– Include Jest syntax when generating unit tests
Tip: Keep your instructions short and clear. Long files reduce the available memory (‘context window’) the AI can use to understand your code.
How to Create Custom Instructions
1. Analyze Your Project Automatically
Use tools like Cursor or Copilot to scan your existing code. They can suggest rules based on how your code is already structured.
2. Start from Examples
Browse platforms like:
– https://codingrules.ai
– https://www.cursordirectory.com
– https://github.com/github/awesome-copilot
3. Customize with Project Details
Add extra context like:
– ESLint configurations
– Framework-specific practices (Angular, React, etc.)
– Dependency preferences (e.g., use Axios instead of Fetch)
Your goal is to teach the AI what good code means in your project.
What Is MCP (Model Context Protocol)?
MCP or Model Context Protocol is a system created to make AI tools smarter by connecting them directly to external services.
Think of MCP as the bridge between your AI assistant and tools like GitHub, Jira, databases, or file systems. Instead of trying to guess what’s happening in your project, the AI can directly ask these services for details.
It works using a client-server model:
– Client: The AI assistant (like Copilot or Claude)
– Server: An MCP service that provides structured data (e.g., a GitHub repo or Jira board)
Some available MCP servers:
– GitHub MPC (for code and pull requests)
– Atlassian MPC (for Jira tickets)
– Playwright MPC (for end-to-end testing)
– File System MPC (to read/write project files)
– Memory MPC (for saving information between sessions)
In short, MCP lets your AI coding tool work more like a real teammate, with access to everything it needs to help you.
Which AI Model Should You Choose?
Different AI models have different strengths. When using these tools, the model’s memory (also called ‘context size’) and reasoning abilities really matter:
Model | Tokens (Memory) | Best For |
Claude 4 Opus | 200k | High-quality coding and analysis |
GPT-4.1 | 1M | Very large projects |
Gemini 2.5 Pro | 1M | Google ecosystem and long tasks |
DeepSeek R1 | 128k | Local/open-source development |
Use models with higher memory when working on large codebases.
Why This Matters
Without custom instructions or MCP, your AI tool is like a junior developer with no onboarding. They might write okay code—but it won’t match your style, and they’ll miss a lot of context.
By adding custom instructions and MCP, you give your AI assistant superpowers:
– It knows how your team works
– It connects to your tools like GitHub or Jira
– It writes better code that you’ll actually keep
And because these instruction files live inside your project, every team member benefits from them. Your whole team gets a shared, intelligent assistant.
Comments are closed.