typespec-create-agent
Skill này làm gì
Công cụ này tạo một trợ lý AI (gọi là “agent”) cho Microsoft 365 Copilot. Nó xác định agent có thể làm gì, cách nó nên hành xử và cách mọi người bắt đầu trò chuyện với nó.
Khi nào nên dùng
- ✓Khi bạn muốn tạo một trợ lý AI tùy chỉnh cho các tác vụ cụ thể.
- ✓Khi xác định khả năng của agent, như tìm kiếm trên web hoặc tài liệu.
- ✓Khi thiết lập cách agent nên tương tác với người dùng.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/typespec-create-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 agent giúp trả lời các câu hỏi về sản phẩm của công ty, có quyền truy cập web và tài liệu SharePoint.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn cung cấp thông tin về mục đích của agent, các khả năng (như tìm kiếm web, đọc email, v.v.) và cách nó nên hoạt động. Sau đó công cụ tạo mã cấu hình cho agent.
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 TypeSpec Declarative Agent
Create a complete TypeSpec declarative agent for Microsoft 365 Copilot with the following structure:
Requirements
Generate a main.tsp file with:
Agent Declaration
- Use
@agentdecorator with a descriptive name and description - Name should be 100 characters or less
- Description should be 1,000 characters or less
- Use
Instructions
- Use
@instructionsdecorator with clear behavioral guidelines - Define the agent's role, expertise, and personality
- Specify what the agent should and shouldn't do
- Keep under 8,000 characters
- Use
Conversation Starters
- Include 2-4
@conversationStarterdecorators - Each with a title and example query
- Make them diverse and showcase different capabilities
- Include 2-4
Capabilities (based on user needs)
WebSearch- for web content with optional site scopingOneDriveAndSharePoint- for document access with URL filteringTeamsMessages- for Teams channel/chat accessEmail- for email access with folder filteringPeople- for organization people searchCodeInterpreter- for Python code executionGraphicArt- for image generationGraphConnectors- for Copilot connector contentDataverse- for Dataverse data accessMeetings- for meeting content access
Template Structure
import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";
using TypeSpec.Http;
using TypeSpec.M365.Copilot.Agents;
@agent({
name: "[Agent Name]",
description: "[Agent Description]"
})
@instructions("""
[Detailed instructions about agent behavior, role, and guidelines]
""")
@conversationStarter(#{
title: "[Starter Title 1]",
text: "[Example query 1]"
})
@conversationStarter(#{
title: "[Starter Title 2]",
text: "[Example query 2]"
})
namespace [AgentName] {
// Add capabilities as operations here
op capabilityName is AgentCapabilities.[CapabilityType]<[Parameters]>;
}
Best Practices
- Use descriptive, role-based agent names (e.g., "Customer Support Assistant", "Research Helper")
- Write instructions in second person ("You are...")
- Be specific about the agent's expertise and limitations
- Include diverse conversation starters that showcase different features
- Only include capabilities the agent actually needs
- Scope capabilities (URLs, folders, etc.) when possible for better performance
- Use triple-quoted strings for multi-line instructions
Examples
Ask the user:
- What is the agent's purpose and role?
- What capabilities does it need?
- What knowledge sources should it access?
- What are typical user interactions?
Then generate the complete TypeSpec agent definition.
Câu hỏi thường gặp
“Agent” trong Microsoft 365 Copilot là gì?
Agent là một trợ lý AI mà bạn có thể cấu hình để thực hiện các tác vụ cụ thể trong Microsoft 365, như trả lời câu hỏi hoặc quản lý thông tin.
“Capabilities” (khả năng) là gì?
Khả năng là các công cụ agent có thể dùng, như tìm kiếm trên internet (WebSearch), truy cập tệp trong OneDrive/SharePoint, đọc email, v.v.
TypeSpec là gì?
TypeSpec là ngôn ngữ dùng để mô tả cách các agent AI hoạt động và những khả năng chúng có.
Chi tiết
Mô tả gốc của tác giả
Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7458
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
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.