Generated banner for Typespec Create Agent
Generated logo for Typespec Create Agent

Typespec Create Agent

GitHubOfficialOriginally contributed by @troystaylor as prompts/typespec-create-agent.prompt.md; moved into a skill by pull request #761Distributed by GitHub

  • Skill
  • Content generator
  • Software development
  • MIT
  • No issues found

From the author

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot
— the description by troystaylor

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill assists developers in creating declarative agents for Microsoft 365 Copilot using the TypeSpec language. It guides the user through defining agent metadata, behavioral instructions, conversation starters, and specific capabilities, resulting in a structured main.tsp file ready for implementation.

What it does

  • Generates TypeSpec code for Microsoft 365 Copilot agents.
  • Structures agent declarations with names and descriptions.
  • Drafts behavioral instructions and role-based guidelines.
  • Configures conversation starters to showcase agent capabilities.
  • Maps specific capabilities like WebSearch, Email, or Dataverse to the agent definition.

When to use it

  • When you need to build a custom declarative agent for Microsoft 365 Copilot.
  • When you want to ensure your agent definition follows standard TypeSpec syntax.
  • When you need to quickly scaffold the structure of an agent including its capabilities.

Advantages

  • Ensures consistent structure for agent definitions.
  • Simplifies the integration of various M365 Copilot capabilities.
  • Promotes best practices by encouraging scoped capabilities and clear instructions.

Usage examples

“Create a TypeSpec agent for a project manager that can access SharePoint documents and Teams messages.”
The agent generates a main.tsp file with the @agent decorator, instructions for a project management role, and the necessary capability operations for OneDriveAndSharePoint and TeamsMessages.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/github/typespec-create-agent/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip typespec-create-agent.zip -d .agents/skills

Documentation by troystaylor

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

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.

Files

ATTRIBUTION.md

Attribution

This folder is an unmodified copy of the Agent Skill "typespec-create-agent", distributed by AutoGineer (https://autogineer.com/agent-skills).

The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.

Files added by AutoGineer

  • ATTRIBUTION.md: this file, written by AutoGineer

  • LICENSE: copied from LICENSE

Requirements and compatibility

Written for: GitHub Copilot, Claude Code

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Names Claude Code tools

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Originally contributed by
GitHub avatar of troystaylor@troystayloras prompts/typespec-create-agent.prompt.mdmoved into a skill by pull request #761
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/typespec-create-agent · commit 797337f
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
troystaylor

AutoGineer is not affiliated with or endorsed by troystaylor or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download typespec-create-agent.zip