Skip to main content
skill GitHub Copilot official · GitHub

typespec-create-agent — GitHub Copilot skill: build an agent

This skill drafts a TypeSpec definition for a Microsoft 365 Copilot declarative agent. Use it to shape the agent's instructions, capabilities, and sample prompts.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill typespec-create-agent
Open on GitHub

What typespec-create-agent does

The skill generates a main.tsp file with an agent declaration, behavioral instructions, and conversation starters. You can provide two to four starters and choose capabilities to match the agent's needs.

Available capabilities cover web search, OneDrive and SharePoint documents, Teams messages, and email. The list also includes organization people search, Python execution, image generation, Dataverse, meetings, and Copilot connector content. Sources can be scoped by URL or folder where supported. Install it when you're building for Microsoft 365 Copilot; it is a poor fit for a general-purpose chatbot prompt.

What it helps with

  • draft an agent definition in main.tsp
  • set the agent's role and behavioral limits
  • choose capabilities for the agent's data sources
  • add varied conversation starters

Example prompts for the agent

  • Create an agent that answers employee questions using OneDrive documents.
  • Generate `main.tsp` for an agent that searches Teams messages and email.
  • Draft a declarative agent with web search and Python execution.

How to install typespec-create-agent

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill typespec-create-agent

2GitHub CLI

gh skill install github/awesome-copilot typespec-create-agent

3Manually: put the files in place

.github/skills/typespec-create-agent/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

session-report official Anthropic Generates an interactive HTML report on token usage, cache performance, subagents, and heavy prompts from Claude Code transcripts. Claude Code 3,676installs bigquery-ai-ml official google This skill helps write BigQuery SQL for built-in ML and GenAI tasks. Use it for forecasting, anomaly detection, semantic search, and text analysis. Claude Code Gemini CLI CX Codex 7,033installs agent-platform-alert-configuration official google This skill creates Terraform alert policies for AI agents from OpenTelemetry metrics. Use it to watch latency, errors, token usage, and quality. Claude Code Gemini CLI CX Codex 6,857installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs media-use heygen-com Finds or generates media for HyperFrames videos, including voiceovers, music, cutouts, and color grades. Stores files locally in assets. Claude Code CX Codex Cursor +1 1,100,000installs mcp-builder official anthropics This skill walks through building an MCP server in TypeScript or Python, from reading the protocol spec to writing tests and evaluation questions. Claude Code Claude.ai 130,949installs subagent-driven-development Jesse Vincent This skill runs an implementation plan through fresh subagents for independent tasks and reviews each result. Use it for multi-step work in one session. Claude Code CX Codex 237,746installs

Questions about typespec-create-agent

How do I install typespec-create-agent in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill typespec-create-agent or gh skill install github/awesome-copilot typespec-create-agent.

What does typespec-create-agent do?

It generates a main.tsp definition for a Microsoft 365 Copilot declarative agent, with instructions, conversation starters, and selected capabilities.

Which capabilities can the agent use?

Options include web search, OneDrive and SharePoint access, Teams messages, and email. Choose only the capabilities the agent needs.

Source text

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor