
Typespec Create Agent
Author a Microsoft 365 Copilot declarative agent in TypeSpec—agent metadata, instructions, starters, and capability decorators in one main.tsp file.
Overview
typespec-create-agent is an agent skill for the Build phase that generates a TypeSpec main.tsp declarative agent with instructions, conversation starters, and Microsoft 365 Copilot capabilities.
Install
npx skills add https://github.com/github/awesome-copilot --skill typespec-create-agentWhat is this skill?
- Generates main.tsp with @agent name (≤100 chars) and description (≤1,000 chars)
- @instructions block (≤8,000 chars) defining role, boundaries, and personality
- 2–4 @conversationStarter entries with diverse title and example queries
- Optional capability decorators: WebSearch, SharePoint, Teams, Email, People, CodeInterpreter, GraphicArt, GraphConnector
- Structured checklist aligned to Microsoft declarative agent requirements
- @agent name limit 100 characters; description limit 1,000 characters
- @instructions limit 8,000 characters
- Includes 2–4 @conversationStarter decorators in the required structure
Adoption & trust: 8.4k installs on skills.sh; 34.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have a Copilot agent concept but no valid TypeSpec file combining @agent metadata, instructions, starters, and capability decorators within Microsoft limits.
Who is it for?
Builders in Microsoft 365 ecosystems who need a declarative Copilot agent spec with SharePoint, Teams, or Graph-backed capabilities.
Skip if: Non-Microsoft agent platforms, raw OpenAI Assistant API-only projects, or teams without tenant access to declarative agent publishing.
When should I use this skill?
You need a complete TypeSpec declarative agent file for Microsoft 365 Copilot with instructions, starters, and selected capabilities.
What do I get? / Deliverables
You get a main.tsp ready to refine and register—a named agent, bounded instructions, 2–4 starters, and capability decorators matched to your M365 data sources.
- main.tsp with @agent, @instructions, and conversation starters
- Capability decorator set aligned to user needs
- Review-ready declarative agent definition within documented character caps
Recommended Skills
Journey fit
Build covers composing agent definitions and enterprise integrations; this skill outputs TypeSpec source for Copilot, not launch SEO or growth analytics. agent-tooling matches declarative agent packaging for M365 Copilot rather than general frontend UI or unrelated backend CRUD.
How it compares
TypeSpec source for M365 declarative agents—not a Claude Code skill package or a generic chatbot prompt markdown file.
Common Questions / FAQ
Who is typespec-create-agent for?
Solo developers and indie teams shipping Microsoft 365 Copilot agents who want TypeSpec-first definitions with instructions and capability decorators.
When should I use typespec-create-agent?
During Build → agent-tooling when you are creating or revising a declarative agent before packaging, validation, or tenant rollout in Microsoft 365.
Is typespec-create-agent safe to install?
Review the Security Audits panel on this page; the skill writes agent definitions that may reference organizational data connectors you must scope and approve in your tenant.
SKILL.md
READMESKILL.md - Typespec Create Agent
# 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.