agent-customization

**COMPÉTENCE DE WORKFLOW** — Créer, mettre à jour, réviser, corriger ou déboguer les fichiers de personnalisation d'agent VS Code (.instructions.md, .prompt.md, .agent.md, SKILL.md,…

npx skills add https://github.com/microsoft/vscode --skill agent-customization

Agent Customization

Decision Flow

PrimitiveWhen to Use
agent instructionsAlways-on, applies everywhere in the project
File InstructionsExplicit via applyTo patterns, or on-demand via description
MCPIntegrates external systems, APIs, or data
HooksDeterministic shell commands at agent lifecycle points (block tools, auto-format, inject context)
Custom AgentsSubagents for context isolation, or multi-stage workflows with tool restrictions
PromptsSingle focused task with parameterized inputs
SkillsOn-demand workflow with bundled assets (scripts/templates)

Quick Reference

Consult the reference docs for templates, domain examples, advanced frontmatter options, asset organization, anti-patterns, and creation checklists. If the references are not enough, load the official documentation links for each primitive.

TypeFileLocationReference
agent instructionscopilot-instructions.md, AGENTS.md.github/ or rootLink
File Instructions*.instructions.md.github/instructions/Link
Prompts*.prompt.md.github/prompts/Link
Hooks*.json.github/hooks/Link
Custom Agents*.agent.md.github/agents/Link
SkillsSKILL.md.github/skills/<name>/, .agents/skills/<name>/, .claude/skills/<name>/Link

User-level: {{VSCODE_USER_PROMPTS_FOLDER}}/ (*.prompt.md, *.instructions.md, *.agent.md; not skills) Customizations roam with user's settings sync

Creation Process

If you need to explore or validate patterns in the codebase, use a read-only subagent. If the ask-questions tool is available, use it to interview the user and clarify requirements.

Follow these steps when creating any customization file.

1. Determine Scope

Ask the user where they want the customization:

  • Workspace: For project-specific, team-shared customizations → .github/ folder
  • User profile: For personal, cross-workspace customizations → {{VSCODE_USER_PROMPTS_FOLDER}}/

2. Choose the Right Primitive

Use the Decision Flow above to select the appropriate file type based on the user's need.

3. Create the File

Create the file directly at the appropriate path:

  • Use the location tables in each reference file
  • Include required frontmatter as needed
  • Add the body content following the templates

4. Validate

After creating:

  • Confirm the file is in the correct location
  • Verify frontmatter syntax (YAML between --- markers)
  • Check that description is present and meaningful

Edge Cases

Instructions vs Skill? Does this apply to most work, or specific tasks? Most → Instructions. Specific → Skill.

Skill vs Prompt? Both appear as slash commands in chat (type /). Multi-step workflow with bundled assets → Skill. Single focused task with inputs → Prompt.

Skill vs Custom Agent? Same capabilities for all steps → Skill. Need context isolation (subagent returns single output) or different tool restrictions per stage → Custom Agent.

Hooks vs Instructions? Instructions guide agent behavior (non-deterministic). Hooks enforce behavior via shell commands at lifecycle events like PreToolUse or PostToolUse — they can block operations, require approval, or run formatters deterministically. Hooks can be defined in standalone .json files (see hooks reference) or inline in custom agent frontmatter via the hooks attribute (see agents reference).

Common Pitfalls

Description is the discovery surface. The description field is how the agent decides whether to load a skill, instruction, or agent. If trigger phrases aren't IN the description, the agent won't find it. Use the "Use when..." pattern with specific keywords.

YAML frontmatter silent failures. Unescaped colons in values, tabs instead of spaces, name that doesn't match folder name — all cause silent failures with no error message. Always quote descriptions that contain colons: description: "Use when: doing X".

applyTo: "**" burns context. This means "always included for every file request" — it loads the instruction into the context window on every interaction, even when irrelevant. Use specific globs (**/*.py, src/api/**) unless the instruction truly applies to all files.

Plus de skills de microsoft

python-kwargs-setattr-security
microsoft
Lors de la révision ou de la correction de code Python qui utilise setattr() avec des kwargs contrôlés par l'utilisateur pour configurer des objets d'extension C++ (SessionOptions, RunOptions, etc.) dans…
oss-growth
microsoft
Persona de growth hacker OSS
infopath-to-canvas
microsoft
Migrer un formulaire Microsoft InfoPath (.xsn) vers une application Power Apps Canvas. À UTILISER lorsque l'utilisateur souhaite convertir, porter ou migrer un formulaire/modèle InfoPath vers Canvas…
winui-code-review
microsoft
Révision de la qualité du code pour les applications WinUI 3 — conformité MVVM, exactitude de x:Bind, accessibilité, thèmes, sécurité et performances. À utiliser avant de valider pour détecter…
accessibility-aria-expert
microsoft
Détecte et corrige les problèmes d'accessibilité dans les vues web React/Fluent UI. À utiliser lors de la révision du code pour la compatibilité avec les lecteurs d'écran, la correction des étiquettes ARIA, la garantie…
generate-canvas-app
microsoft
[DÉPRÉCIÉ — utilisez plutôt canvas-app] Générer une application canevas Power Apps complète.
review-staged
microsoft
Generate structured code review for staged files AND all branch commits since main, using Claude Code agents. Provides full PR-equivalent coverage before…
python-development
microsoft
Normes de codage, conventions et modèles pour développer du code Python dans le dépôt Agent Framework. Utilisez ceci lors de l'écriture ou de la modification de code source Python…