typespec-create-api-plugin

Generate TypeSpec API plugin files with REST operations and Adaptive Cards for Microsoft 365 Copilot.

1|1|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/ultraviollettnympho/transit-ticket --skill typespec-create-api-plugin-ultraviollettnympho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typespec-create-api-plugin
Source: https://github.com/ultraviollettnympho/transit-ticket/tree/main/.github/skills/typespec-create-api-plugin
Command: npx skills add https://github.com/ultraviollettnympho/transit-ticket --skill typespec-create-api-plugin-ultraviollettnympho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a Microsoft 365 Copilot API plugin requires writing correct TypeSpec definitions with agents, actions, authentication, and response cards, which is error-prone when done by hand. This Skill generates complete main.tsp and actions.tsp files following the official TypeSpec M365 Copilot patterns. ## Core Features & Use Cases - Agent and Action Generation: Produces main.tsp with the @agent definition and actions.tsp with REST operations using @route, @get, @post, and model definitions. - Authentication Configuration: Supports no-auth, API key, OAuth2 authorization code flow, and registered auth reference patterns via @useAuth. - Adaptive Cards and Confirmations: Adds @card response rendering, confirmation dialogs for destructive operations, and @reasoning/@responding instructions. - Use Case: You want to expose your company's ticket-tracking REST API to Microsoft 365 Copilot. Provide the base URL, operations, and auth method, and receive ready-to-use TypeSpec plugin files. ## Quick Start Ask the assistant to create a TypeSpec API plugin for your REST API, providing the base URL, the operations you need, and the authentication method it uses.

Frequently Asked Questions about typespec-create-api-plugin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Microsoft 365 Copilot API plugin with TypeSpec?

Define an agent in main.tsp using the @agent decorator and reference operations from actions.tsp, where each REST endpoint is declared with @route, an HTTP verb decorator, and @action. Provide your API base URL, operations, and auth method to generate both files.

What authentication methods does a TypeSpec Copilot plugin support?

TypeSpec M365 Copilot plugins support no authentication for public APIs, API key auth via ApiKeyAuth, OAuth2 authorization code flow via OAuth2Auth, and registered auth references using @authReferenceId. The @useAuth decorator applies the chosen method to the service namespace.

How do I add Adaptive Cards to Copilot plugin responses?

Use the @card decorator on an operation with a dataPath pointing to the response collection, plus title and url field mappings, and reference a card JSON template file. This renders rich visual responses when the operation returns multiple data items.

Can I require user confirmation before a Copilot plugin action runs?

Yes, add a @capabilities decorator with a confirmation block of type AdaptiveCard to the operation. The confirmation body can interpolate function parameters, and it is recommended for destructive operations like deletes or critical updates.

What files does a TypeSpec Copilot API plugin require?

A plugin requires main.tsp containing the agent definition with instructions, and actions.tsp containing the service namespace with REST operations and response models. An optional cards directory holds Adaptive Card JSON templates referenced by @card decorators.