typespec-create-agent — скилл для GitHub Copilot: создание агента
Скилл помогает составить TypeSpec-описание декларативного агента для Microsoft 365 Copilot. Подойдёт, если нужно задать его инструкции, возможности и примеры запросов.
npx skills add github/awesome-copilot --skill typespec-create-agent -a claude-codeЧто делает typespec-create-agent
Скилл создаёт файл main.tsp с объявлением агента, описанием его роли и поведения, а также примерами начала диалога. В нём можно задать от двух до четырёх таких примеров и выбрать нужные агенту возможности.
Список возможностей включает поиск в интернете, доступ к OneDrive и SharePoint, сообщения Teams и почту. Также доступны поиск людей в организации, выполнение Python-кода, создание изображений, данные Dataverse, встречи и контент коннекторов Copilot. При необходимости источники можно ограничить URL или папками. Ставьте скилл, если готовите агента именно для Microsoft 365 Copilot; для обычных инструкций к чат-боту он избыточен.
Какие задачи решает
- собрать каркас агента в
main.tsp - описать роль и ограничения агента
- подобрать возможности агента под источники данных
- добавить примеры запросов для начала диалога
Примеры запросов агенту
- Создай агента для ответов на вопросы сотрудников по документам в OneDrive.
- Собери `main.tsp` для агента, который ищет информацию в Teams и почте.
- Подготовь декларативного агента с поиском в интернете и выполнением Python-кода.
Как установить typespec-create-agent
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill typespec-create-agent -a claude-code2Вручную: положить файлы
~/.claude/skills/typespec-create-agent/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/typespec-create-agent/
Вручную: положить файлы
.agents/skills/typespec-create-agent/SKILL.mdДля всех проектов — ~/.agents/skills/
Вручную: положить файлы
.cursor/skills/typespec-create-agent/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill typespec-create-agent2GitHub CLI
gh skill install github/awesome-copilot typespec-create-agent3Вручную: положить файлы
.github/skills/typespec-create-agent/SKILL.mdКомандой платформы
gemini skills install https://github.com/github/awesome-copilot --path skills/typespec-create-agentВручную: положить файлы
.devin/skills/typespec-create-agent/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Похожие
Вопросы о typespec-create-agent
Как установить typespec-create-agent в GitHub Copilot?
Выполните npx skills add github/awesome-copilot --skill typespec-create-agent или gh skill install github/awesome-copilot typespec-create-agent.
Что делает typespec-create-agent?
Он формирует main.tsp для декларативного агента Microsoft 365 Copilot: задаёт инструкции, примеры диалога и выбранные возможности.
Какие возможности можно добавить агенту?
Например, поиск в интернете, доступ к файлам OneDrive и SharePoint, сообщения Teams или почту. Выбирайте только те возможности, которые нужны агенту.
Исходный текст
SKILL.md · MIT
---
name: typespec-create-agent
description: 'Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot'
---
# 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:
1. **Agent Declaration**
- Use `@agent` decorator with a descriptive name and description
- Name should be 100 characters or less
- Description should be 1,000 characters or less
2. **Instructions**
- Use `@instructions` decorator 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
3. **Conversation Starters**
- Include 2-4 `@conversationStarter` decorators
- Each with a title and example query
- Make them diverse and showcase different capabilities
4. **Capabilities** (based on user needs)
- `WebSearch` - for web content with optional site scoping
- `OneDriveAndSharePoint` - for document access with URL filtering
- `TeamsMessages` - for Teams channel/chat access
- `Email` - for email access with folder filtering
- `People` - for organization people search
- `CodeInterpreter` - for Python code execution
- `GraphicArt` - for image generation
- `GraphConnectors` - for Copilot connector content
- `Dataverse` - for Dataverse data access
- `Meetings` - for meeting content access
## Template Structure
```typescript
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:
1. What is the agent's purpose and role?
2. What capabilities does it need?
3. What knowledge sources should it access?
4. What are typical user interactions?
Then generate the complete TypeSpec agent definition.
© github · MIT · github/awesome-copilot