Customization decision framework reference

tech
prompt-engineering
github-copilot
reference
Consolidated decision framework for choosing between prompt files, instruction files, agents, skills, hooks, MCP servers, and Copilot Memory β€” with flowcharts, comparison matrices, and quick-reference tables.
Author

Dario Airoldi

Published

March 7, 2026

Customization decision framework reference

GitHub Copilot offers ten customization mechanisms, each designed for a specific purpose. Choosing the wrong one wastes tokens, fragments your configuration, and confuses the model. This reference consolidates every decision table, comparison matrix, and flowchart from the series into a single lookup resource.

For the conceptual foundations behind each mechanism, see the corresponding concept article. This article answers one question: β€œwhich mechanism should I use?”

Table of contents


πŸ—ΊοΈ Master decision framework

Start here. This decision tree covers all ten mechanisms:

What are you trying to accomplish?
β”‚
+- "I want rules that always apply to certain files"
β”‚   +- πŸ“š Instruction file (.instructions.md) with applyTo pattern
β”‚       πŸ“– Concept: 01.03 | πŸ“– How-to: 05.00
β”‚
+- "I want a reusable workflow I can run on demand"
β”‚   +- πŸ“ Prompt file (.prompt.md) in .github/prompts/
β”‚       πŸ“– Concept: 01.03 | πŸ“– How-to: 03.00
β”‚
+- "I want Copilot to know about my architecture/schemas/patterns"
β”‚   +- πŸ“ Context file (.md) in .copilot/context/
β”‚       πŸ“– Concept: 01.03
β”‚
+- "I want a specialized AI persona with tool restrictions"
β”‚   +- πŸ€– Agent file (.agent.md) in .github/agents/
β”‚       πŸ“– Concept: 01.04 | πŸ“– How-to: 04.00
β”‚
+- "I want a cross-platform workflow with templates and scripts"
β”‚   +- πŸ“¦ Skill (SKILL.md) in .github/skills/
β”‚       πŸ“– Concept: 01.05 | πŸ“– How-to: 06.00
β”‚
+- "I need to GUARANTEE something happens at a lifecycle point"
β”‚   +- πŸͺ Hook (.github/hooks/*.json)
β”‚       πŸ“– Concept: 01.05 | πŸ“– How-to: 09.00
β”‚
+- "I need to connect to external APIs, databases, or services"
β”‚   +- πŸ”Œ MCP server (mcp.json)
β”‚       πŸ“– Concept: 01.06 | πŸ“– How-to: 07.00
β”‚
+- "I want my preferences to persist across sessions"
β”‚   +- 🧠 Let Copilot Memory learn them (automatic)
β”‚       πŸ“– Concept: 01.09
β”‚
+- "I want cross-project knowledge shared with my team"
β”‚   +- 🌐 Copilot Spaces
β”‚       πŸ“– Overview: 01.01
β”‚
+- "I need to embed Copilot in my own application"
    +- πŸ’» GitHub Copilot SDK
        πŸ“– How-to: 14.00

πŸ“Š Mechanism comparison matrix

Core properties

Mechanism File Activation Persistence Identity change Cross-platform
Prompt files .prompt.md On-demand (/command) Single invocation No ❌ VS Code only
Instruction files .instructions.md Auto (file-pattern match) Every matching request No βœ… VS Code + GitHub.com
Context files .md in .copilot/ On-demand (semantic search) When retrieved No βœ… VS Code + VS
Agents .agent.md Agent picker Entire session Yes ❌ VS Code only
Skills SKILL.md Auto (description match) or slash command Single request No βœ… VS Code, CLI, coding agent
Hooks .json Lifecycle event Deterministic No βœ… VS Code, CLI, Claude Code
MCP servers mcp.json Tool call at runtime Session No βœ… Any MCP client
Copilot Memory (automatic) Always present Cross-session No βœ… IDE, CLI, code review
Copilot Spaces (GitHub.com) Manual selection Persistent No ❌ GitHub-hosted
SDK (code) Application logic App lifetime No βœ… Any platform

Capabilities

Mechanism Tool control Resources Can block execution Can modify input Handoffs
Prompt files βœ… Full ❌ None ❌ No ❌ No ❌ No
Instruction files ❌ None ❌ None ❌ No ❌ No ❌ No
Context files ❌ None ❌ None ❌ No ❌ No ❌ No
Agents βœ… Full ❌ None ❌ No ❌ No βœ… Full
Skills ⚠️ Limited βœ… Templates, scripts ❌ No ❌ No ❌ No
Hooks βž– N/A ❌ None βœ… Yes βœ… Yes ❌ No
MCP servers βœ… Via tools βœ… Via resources ❌ No ❌ No ❌ No

Token cost patterns

Mechanism Token cost pattern Typical cost
Instruction files Paid on every matching request 200–1,000 tokens per file
Prompt files Paid once per invocation 500–2,000 tokens
Context files Paid on demand (when retrieved) Variable
Agents Paid every request (identity layer) 200–800 tokens
Skills Progressive: ~50–100 (discovery) β†’ 500–1,500 (on match) β†’ variable (resources) Minimal until activated
Hooks Zero tokens (runs outside the prompt) 0 tokens
MCP servers Tool schemas in system prompt + results 200+ tokens per tool
Copilot Memory Injected into context window Variable

πŸ” Quick-reference lookup table

Scenario Use File/Path
TypeScript coding standards Instruction file .github/instructions/typescript.instructions.md
Python PEP 8 conventions Instruction file .github/instructions/python-pep8.instructions.md
React component patterns Instruction file .github/instructions/react.instructions.md
Generate a migration script Prompt file .github/prompts/migration.prompt.md
Code review workflow Prompt file .github/prompts/code-review.prompt.md
Generate React form component Prompt file .github/prompts/react-form.prompt.md
API schema documentation Context file .copilot/context/api-schema.md
Architecture decision records Context file .copilot/context/architecture/
Security reviewer persona Agent file .github/agents/security-reviewer.agent.md
Planning agent (read-only) Agent file .github/agents/planner.agent.md
Testing workflow with templates Skill file .github/skills/testing/SKILL.md
Deployment procedure with scripts Skill file .github/skills/deploy/SKILL.md
Block dangerous terminal commands Hook .github/hooks/security.json
Auto-format after edits Hook .github/hooks/formatting.json
Log all tool invocations Hook .github/hooks/audit.json
Query external database MCP server mcp.json + custom server
Access live monitoring data MCP server mcp.json + custom server
Personal coding style preferences Copilot Memory Automatic (learned)
Cross-project team standards Copilot Spaces GitHub.com configuration
Embed Copilot in desktop app SDK Application code
Complex code review + fixes Agent β€” Agent handoff Multiple .agent.md files
One-time refactoring Chat command Inline chat or /fix

✏️ Written customizations: prompts vs. instructions vs. context files

These three mechanisms all use Markdown, but serve fundamentally different purposes:

Aspect Prompt files Instruction files Context files
Purpose Reusable tasks Persistent rules Project knowledge
Activation On-demand (/command) Automatic (file pattern) Semantic search retrieval
Assembly position User prompt System prompt User prompt (when retrieved)
Tool control βœ… Full ❌ None ❌ None
Model routing βœ… model: field ❌ None ❌ None
Token cost Once per use Every matching request On demand

Decision tree

What kind of written guidance is it?
β”‚
+- Rules that should apply silently to certain files
β”‚   +- πŸ“š Instruction file with applyTo pattern
β”‚
+- A workflow or task I run explicitly
β”‚   +- πŸ“ Prompt file (invoked as /command)
β”‚
+- Reference material about the project
β”‚   +- πŸ“ Context file in .copilot/context/
β”‚
+- General project-wide conventions
    +- πŸ“š copilot-instructions.md in .github/

πŸ“– Deep dive: Understanding prompt files, instructions, and context layers


πŸ€– Identity and capabilities: agents vs. skills

Both extend Copilot beyond its defaults, but in fundamentally different ways:

Aspect Agents Skills
What they do Change the model’s identity Provide capabilities with resources
File .agent.md SKILL.md + folder
Activation Agent picker (or subagent) Description match or slash command
Tool control βœ… Full β€” defines available tools ⚠️ Limited
Resources ❌ None βœ… Templates, scripts, examples
Cross-platform ❌ VS Code only βœ… VS Code, CLI, coding agent
Handoffs βœ… Orchestration between agents ❌ Not supported
Standard VS Code-specific Open (agentskills.io)

Decision tree

Do you need to extend Copilot's capabilities?
β”‚
+- Does it require a specific persona with tool restrictions?
β”‚   +- πŸ€– Agent file (.agent.md)
β”‚
+- Does it require templates, scripts, or examples?
β”‚   +- Does it need to work across VS Code, CLI, and coding agent?
β”‚       +- Yes β†’ Skill (SKILL.md)
β”‚       +- No  β†’ Skill or Agent (either works)
β”‚
+- Does it need multi-agent orchestration with handoffs?
β”‚   +- πŸ€– Agent file with handoffs
β”‚
+- Is it a one-time reusable workflow without resources?
    +- πŸ“ Prompt file (.prompt.md)

πŸ“– Deep dive: Understanding agents | Understanding skills and hooks


βš–οΈ Enforcement: hooks vs. instructions

Instructions suggest behavior. Hooks guarantee it:

Aspect Instructions Hooks
Language Natural language (Markdown) Shell commands (JSON config)
Guarantee Medium β€” model may ignore High β€” your code runs deterministically
Can block execution ❌ No βœ… Yes (PreToolUse)
Token cost Tokens consumed Zero tokens
Example β€œAlways run tests after editing” PostToolUse script runs npm test

When hooks beat instructions

Need Instruction approach Hook approach Winner
β€œDon’t delete production files” β€œNever delete files matching prod*” PreToolUse blocks rm on prod* Hook βœ…
β€œFormat code after edits” β€œRun prettier after editing” PostToolUse runs npx prettier --write Hook βœ…
β€œUse camelCase naming” β€œUse camelCase for all variables” N/A β€” hooks can’t influence naming Instruction βœ…
β€œFollow React patterns” β€œUse functional components with hooks” N/A β€” hooks can’t guide coding style Instruction βœ…

Rule of thumb: Use hooks for enforcement (blocking, formatting, logging). Use instructions for guidance (standards, patterns, style).

πŸ“– Deep dive: Understanding skills, hooks, and lifecycle automation


πŸ”Œ Tool sources: built-in vs. MCP vs. extensions

What capability do you need?
β”‚
+- Already available as a built-in tool?
β”‚   +- Yes β†’ Use built-in (no setup needed)
β”‚
+- Available as a VS Code extension?
β”‚   +- Yes β†’ Is VS Code-only acceptable?
β”‚       +- Yes β†’ Install the extension
β”‚       +- No  β†’ Consider MCP for cross-platform
β”‚
+- Available as a community MCP server?
β”‚   +- Yes β†’ Install and configure in mcp.json
β”‚
+- None of the above
    +- Build your own MCP server

When to build an MCP server

Need Build MCP? Alternative
Query external APIs/databases βœ… Yes β€”
Real-time data (metrics, monitoring) βœ… Yes β€”
Complex business logic βœ… Yes β€”
Coding standards ❌ No Instruction files
Workflow with templates ❌ No Skills
Specialized persona ❌ No Agent files
One-off task ❌ No Prompt file

πŸ“– Deep dive: Understanding MCP and the tool ecosystem | πŸ“– How-to: How to create MCP servers


🧠 Persistent context: Memory vs. instructions vs. Spaces

Three mechanisms provide persistent context, each at a different scope:

Aspect Copilot Memory Instruction files Copilot Spaces
Scope Personal (GitHub account) Repository-specific Cross-project (shareable)
Content Learned preferences Explicit rules Curated knowledge
Activation Automatic Automatic (file pattern) Manual selection
Population Learned from interactions Authored by developers Assembled manually
Shared with team ❌ Personal only βœ… Via Git βœ… Via GitHub
Cross-repo βœ… Follows you ❌ Per repository βœ… Multi-repo
Best for β€œHow I like to work” β€œHow we code in this project” β€œWhat my team needs to know”

Decision tree

What kind of persistent context is it?
β”‚
+- Personal coding preferences
β”‚   +- 🧠 Copilot Memory (learned automatically)
β”‚
+- Project-specific coding standards
β”‚   +- πŸ“š Instruction files (.instructions.md)
β”‚
+- Team knowledge shared across repos
β”‚   +- 🌐 Copilot Spaces
β”‚
+- Project architecture and documentation
    +- πŸ“ Context files (.copilot/context/)

πŸ“– Deep dive: Understanding Copilot Memory


🌳 Specialized decision trees

Choosing tools for your agent

What should your agent be able to do?
β”‚
+- Read-only research β†’ tools: ['codebase', 'filesystem', 'search']
+- Research + web     β†’ tools: ['codebase', 'fetch', 'web_search']
+- Code editing       β†’ tools: ['codebase', 'editor', 'filesystem']
+- Full local access  β†’ tools: ['codebase', 'editor', 'filesystem',
β”‚                                'search', 'usages', 'problems']
+- Orchestration      β†’ tools: ['agent', 'codebase']
+- Unrestricted       β†’ tools: [] (or omit field)

πŸ“– How-to: How to leverage tools in prompt orchestrations

Choosing a model

What's your top priority?
β”‚
+- Speed and cost      β†’ GPT-4o mini / Gemini 2.0 Flash
+- Code generation     β†’ GPT-4o / Grok Code Fast 1
+- Complex reasoning   β†’ o3 / Claude Extended Thinking
+- Long context (>100K)β†’ Claude Sonnet 4 / Gemini 2.0
+- Agentic workflows   β†’ Claude Opus 4.6 / GPT-5.4
+- Multimodal          β†’ Gemini 2.0 / GPT-4o
+- Local/private       β†’ Ollama via BYOK

πŸ“– Deep dive: Understanding LLM models and model selection | πŸ“– How-to: How to optimize prompts for specific models

Choosing an MCP implementation language

If you need… Choose… Because…
Quick prototyping Python (FastMCP) Minimal boilerplate, decorator syntax
npm ecosystem access TypeScript Direct integration with npm packages
Enterprise integration C# (.NET) Strong typing, dependency injection
AI/ML capabilities Python Rich libraries (PyTorch, etc.)
Existing .NET codebase C# (.NET) Seamless integration
Maximum type safety C# or TypeScript Compile-time checking

πŸ“– How-to: How to create MCP servers for Copilot


🎯 Conclusion

Key principles

  1. Start simple. Instruction files and prompt files handle most needs. Add agents, skills, and hooks only when simpler options aren’t sufficient.
  2. One mechanism per concern. Don’t spread coding standards across prompts, instructions, and agent files. Pick the right one and consolidate.
  3. Hooks for enforcement, instructions for guidance. If you need a guarantee, use hooks. If you need influence, use instructions.
  4. Skills for portability, agents for orchestration. If it needs to work across platforms, use skills. If it needs tool control and handoffs, use agents.
  5. Memory for preferences, Spaces for knowledge. Personal preferences should be learned by Memory. Team knowledge should be curated in Spaces or instruction files.
  6. Token cost matters. Instructions inject on every request. Skills load progressively. Hooks cost zero tokens. Choose based on your token budget.

Series navigation

This reference consolidates decision guidance from across the series. Each mechanism has its own concept article (for understanding) and how-to article (for implementation).


πŸ“š References

Series concept articles:

Series how-to articles: