create-custom-agent
Skill này làm gì
Skill này tạo file custom agent cho Visual Studio Code, mỗi file định nghĩa một persona AI chuyên biệt với tool và hướng dẫn riêng. Skill dành cho lập trình viên muốn có các agent tập trung cho việc lập kế hoạch, review hoặc các vai trò khác.
Khi nào nên dùng
- ✓Khi bạn muốn tạo một custom agent mới cho VS Code với một vai trò cụ thể.
- ✓Khi bạn muốn thiết lập handoff để agent này chuyển công việc sang agent khác.
- ✓Khi bạn muốn giới hạn các tool mà một agent được dùng.
Liên kết skill
https://github.com/dotnet/skills/blob/main/.agents/skills/create-custom-agent/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một custom agent cho VS Code để review code, chỉ được đọc file và chuyển giao cho một agent lập kế hoạch.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết một file agent với frontmatter đúng, thiết lập tool và hướng dẫn cho nó, rồi thêm các handoff đến agent khác nếu cần.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.mdfile 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.mdinstead) - Creating reusable prompts (use
.prompt.mdinstead) - 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 useragent: Target agent identifierprompt: Pre-filled prompt for target agentsend: 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:
- Open Command Palette (Ctrl+Shift+P)
- Run "Chat: New Custom Agent" or check agents dropdown
- 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
Câu hỏi thường gặp
Handoff là gì?
Handoff là một liên kết gửi công việc đến agent khác như bước tiếp theo.
Tôi có thể giới hạn tool mà agent dùng không?
Có. Bộ tool có thể được thu hẹp để phù hợp với một vai trò như reviewer hoặc planner.
Skill này có dành cho file hướng dẫn không?
Không. File instruction và prompt được tạo bằng các công cụ khác.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 5.8k
- Vị trí xếp hạng
- #14552
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
create-skill
5.8kGiúp agent của bạn tạo một agent skill mới với tên hợp lệ, mô tả kích hoạt rõ ràng và file SKILL.md đúng tiêu chuẩn.
csharp-scripts
5.8kGiúp agent của bạn chạy một chương trình C# nhỏ dưới dạng một file duy nhất bằng công cụ dòng lệnh .NET, không cần tạo project đầy đủ.
dotnet-pinvoke
5.8kGiúp agent của bạn gọi các thư viện native C hoặc C++ từ .NET đúng cách, gồm khai báo chữ ký, xử lý chuỗi, bộ nhớ và safe handle.
nuget-trusted-publishing
5.8kGiúp agent của bạn thiết lập trusted publishing NuGet từ GitHub Actions, để package được xuất bản bằng token ngắn hạn thay vì API key lưu sẵn.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.