typespec-create-agent

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot

23 stars

Best use case

typespec-create-agent is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot

Teams using typespec-create-agent should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/typespec-create-agent/SKILL.md --create-dirs "https://raw.githubusercontent.com/christophacham/agent-skills-library/main/skills/ai-ml/typespec-create-agent/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/typespec-create-agent/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How typespec-create-agent Compares

Feature / Agenttypespec-create-agentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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.

Related Skills

create-spring-boot-kotlin-project

23
from christophacham/agent-skills-library

Create Spring Boot Kotlin Project Skeleton

create-spring-boot-java-project

23
from christophacham/agent-skills-library

Create Spring Boot Java Project Skeleton

mcp-create-declarative-agent

23
from christophacham/agent-skills-library

Skill converted from mcp-create-declarative-agent.prompt.md

customaize-agent:create-workflow-command

23
from christophacham/agent-skills-library

Create a workflow command that orchestrates multi-step execution through sub-agents with file-based task prompts

customaize-agent:create-skill

23
from christophacham/agent-skills-library

Guide for creating effective skills. This command should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations. Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization

create-plan

23
from christophacham/agent-skills-library

Create a structured implementation plan for a feature or change. This documentation shall serve Agents and Humans. Produces a plan with requirements, phases, implementation steps, todo list, and Definition of Done. Use this skill when the user wants to plan a non-trivial feature before implementing it.

create-llms

23
from christophacham/agent-skills-library

Create an llms.txt file from scratch based on repository structure following the llms.txt specification at https://llmstxt.org/

customaize-agent:create-hook

23
from christophacham/agent-skills-library

Create and configure git hooks with intelligent project analysis, suggestions, and automated testing

customaize-agent:create-command

23
from christophacham/agent-skills-library

Interactive assistant for creating new Claude commands with proper structure, patterns, and MCP tool integration

create-agentsmd

23
from christophacham/agent-skills-library

Prompt for generating an AGENTS.md file for a repository

customaize-agent:create-agent

23
from christophacham/agent-skills-library

Comprehensive guide for creating Claude Code agents with proper structure, triggering conditions, system prompts, and validation - combines official Anthropic best practices with proven patterns

genderapi-io-automation

23
from christophacham/agent-skills-library

Automate Genderapi IO tasks via Rube MCP (Composio). Always search tools first for current schemas.