> typespec-create-agent
Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot
curl "https://skillshub.wtf/github/awesome-copilot/typespec-create-agent?format=md"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.
> related_skills --same-repo
> gen-specs-as-issues
This workflow guides you through a systematic approach to identify missing features, prioritize them, and create detailed specifications for implementation.
> game-engine
Expert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript. Use when asked to create games, build game engines, implement game physics, handle collision detection, set up game loops, manage sprites, add game controls, or work with 2D/3D rendering. Covers techniques for platformers, breakout-style games, maze games, tilemaps, audio, multiplayer via WebRTC, and publishing games.
> folder-structure-blueprint-generator
Comprehensive technology-agnostic prompt for analyzing and documenting project folder structures. Auto-detects project types (.NET, Java, React, Angular, Python, Node.js, Flutter), generates detailed blueprints with visualization options, naming conventions, file placement patterns, and extension templates for maintaining consistent code organization across diverse technology stacks.
> fluentui-blazor
Guide for using the Microsoft Fluent UI Blazor component library (Microsoft.FluentUI.AspNetCore.Components NuGet package) in Blazor applications. Use this when the user is building a Blazor app with Fluent UI components, setting up the library, using FluentUI components like FluentButton, FluentDataGrid, FluentDialog, FluentToast, FluentNavMenu, FluentTextField, FluentSelect, FluentAutocomplete, FluentDesignTheme, or any component prefixed with "Fluent". Also use when troubleshooting missing pro