Aller au contenu
Skillpedia
Agents5.8k · #14552

create-custom-agent

Ce qu’il fait

Cette skill crée des fichiers d'agents personnalisés pour Visual Studio Code, chacun définissant une persona d'IA spécialisée avec ses propres outils et instructions. Elle s'adresse aux développeurs qui veulent des agents ciblés pour la planification, la relecture ou d'autres rôles.

Quand l’utiliser

  • ✓Quand vous voulez créer un nouvel agent personnalisé VS Code pour un rôle précis.
  • ✓Quand vous voulez configurer des transferts pour qu'un agent confie le travail à un autre.
  • ✓Quand vous voulez limiter les outils qu'un agent peut utiliser.

Lien du skill

https://github.com/dotnet/skills/blob/main/.agents/skills/create-custom-agent/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/dotnet/skills/blob/main/.agents/skills/create-custom-agent/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Crée un agent VS Code personnalisé pour la relecture de code, qui ne peut que lire les fichiers et transférer vers un planificateur.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent écrit un fichier d'agent avec le bon en-tête (frontmatter), définit ses outils et ses instructions, puis ajoute les transferts éventuels vers d'autres agents.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Create Custom Agent

This skill helps you create VS Code custom agent files that define specialized AI personas for development tasks. Custom agents configure which tools are available, provide specialized instructions, and can chain together via handoffs.

When to Use

  • Creating a new custom agent from scratch
  • Scaffolding an .agent.md file with proper frontmatter
  • Setting up agent-to-agent handoffs for multi-step workflows
  • Configuring tool restrictions for specialized roles (planner, reviewer, etc.)
  • Creating workspace-shared or user-profile agents

When Not to Use

  • Creating instruction files (use .instructions.md instead)
  • Creating reusable prompts (use .prompt.md instead)
  • Modifying existing agents (edit the file directly)

Inputs

Input Required Description
Agent name Yes Descriptive name for the agent (e.g., planner, code-reviewer)
Description Yes Brief description shown as placeholder text in chat
Purpose/Persona Yes What role the agent plays and how it should behave
Tools Recommended List of tools or tool sets the agent can use
Handoffs Optional Next-step agents to transition to after completing work

Workflow

Step 1: Create the agent file

Create a file with .agent.md extension in the agents/ directory:

agents/<agent-name>.agent.md

Step 2: Add YAML frontmatter

Add the header with required and optional fields:

---
name: <agent-name>
description: <brief description for chat placeholder>
tools:
  - <tool-name>
  - <tool-set-name>
---

Available frontmatter fields:

Field Required Description
name No Display name (defaults to filename)
description Yes Placeholder text shown in chat input
argument-hint No Hint text guiding user interaction
tools No List of available tools/tool sets
agents No List of allowed subagents (* for all, [] for none)
model No AI model name or prioritized array of models
handoffs No List of next-step agent transitions
user-invokable No Show in agents dropdown (default: true)
disable-model-invocation No Prevent subagent invocation (default: false)
target No Target environment: vscode or github-copilot
mcp-servers No MCP server configs for GitHub Copilot target

Step 3: Configure tools

Specify which tools the agent can use:

tools:
  - search              # Built-in tool
  - fetch               # Built-in tool
  - codebase            # Tool set
  - myServer/*          # All tools from MCP server

Common tool patterns:

  • Read-only agents: ['search', 'fetch', 'codebase']
  • Full editing agents: ['*'] or specific editing tools
  • Specialized agents: Cherry-pick specific tools

Step 4: Add handoffs (optional)

Configure transitions to other agents:

handoffs:
  - label: Start Implementation
    agent: implementation
    prompt: Implement the plan outlined above.
    send: false
    model: GPT-5.2 (copilot)

Handoff fields:

  • label: Button text displayed to user
  • agent: Target agent identifier
  • prompt: Pre-filled prompt for target agent
  • send: Auto-submit prompt (default: false)
  • model: Optional model override for handoff

Step 5: Write agent instructions (body)

Add the agent's behavior instructions in Markdown:

You are a security-focused code reviewer. Your job is to:

1. Analyze code for security vulnerabilities
2. Check for common security anti-patterns
3. Suggest secure alternatives

## Guidelines

- Focus on OWASP Top 10 vulnerabilities
- Flag hardcoded secrets immediately
- Review authentication and authorization logic

## Reference other files

See [security guidelines](../security.md) for standards.

Tips for instructions:

  • Use Markdown links to reference other files
  • Reference tools with #tool:<tool-name> syntax
  • Be specific about agent behavior and constraints

Step 6: Validate the agent

Verify the agent loads correctly:

  1. Open Command Palette (Ctrl+Shift+P)
  2. Run "Chat: New Custom Agent" or check agents dropdown
  3. Use "Diagnostics" view (right-click in Chat view) to check for errors

Template

---
name: <agent-name>
description: <brief description for chat placeholder>
argument-hint: <optional hint for user input>
tools:
  - <tool-1>
  - <tool-2>
handoffs:
  - l
Questions fréquentes

Qu'est-ce qu'un transfert ?

C'est un lien qui envoie le travail à un autre agent comme étape suivante.

Puis-je limiter les outils d'un agent ?

Oui. Les jeux d'outils peuvent être restreints selon un rôle comme relecteur ou planificateur.

S'agit-il des fichiers d'instructions ?

Non. Les fichiers d'instructions et de prompts sont créés avec d'autres outils.

Détails

Description originale de l’auteur

Creates VS Code custom agent files (.agent.md) for specialized AI personas with tools, instructions, and handoffs. Use when scaffolding new custom agents, configuring agent workflows, or setting up agent-to-agent handoffs.

repo: dotnet/skills

Popularité

Étoiles GitHub
5.8k
Position au classement
#14552
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires