
Typespec Create Api Plugin
- 8.6k installs
- 37.1k repo stars
- Updated July 28, 2026
- github/awesome-copilot
typespec-create-api-plugin is an agent skill that Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot.
About
Generate a TypeSpec API plugin with REST operations authentication and Adaptive Cards for Microsoft 365 Copilot name typespec-create-api-plugin description Generate a TypeSpec API plugin with REST operations authentication and Adaptive Cards for Microsoft 365 Copilot Create TypeSpec API Plugin Create a complete TypeSpec API plugin for Microsoft 365 Copilot that integrates with external REST APIs Requirements Generate TypeSpec files with main tsp Agent Definition typescript import typespec http import typespec openapi3 import microsoft typespec-m365-copilot import actions tsp using TypeSpec Http using TypeSpec M365 Copilot Agents using TypeSpec M365 Copilot Actions agent name Agent Name description Description instructions Instructions for using the API operations namespace AgentName Reference operations from actions tsp op operation1 is APINamespace operationName actions tsp API Operations typescript import typespec http import microsoft typespec-m365-copilot using TypeSpec Http using TypeSpec M365 Copilot Actions service actions nameForHuman API Display Name descriptionForModel Model description descriptionForHuman User description server API_BASE_URL API Name useAuth AuthType Op.
- Create TypeSpec API Plugin
- **No Authentication** (Public APIs)
- **Registered Auth Reference**
- **Parameter**: {{ function.parameters.paramName }}
- **Operation Names**: Use clear, action-oriented names (listProjects, createTicket)
Typespec Create Api Plugin by the numbers
- 8,631 all-time installs (skills.sh)
- +20 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #73 of 2,209 Security skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
typespec-create-api-plugin capabilities & compatibility
- Capabilities
- create typespec api plugin · **no authentication** (public apis) · **registered auth reference** · **parameter**: {{ function.parameters.paramname · **operation names**: use clear, action oriented
- Use cases
- documentation
What typespec-create-api-plugin says it does
**No Authentication** (Public APIs) ```typescript // No @useAuth decorator needed ``` 2.
**API Key** ```typescript @useAuth(ApiKeyAuth<ApiKeyLocation.header, "X-API-Key">) ``` 3.
""") @responding(""" Present results in a clear table format with columns: ID, Title, Status.
**Operation Names**: Use clear, action-oriented names (listProjects, createTicket) 2.
npx skills add https://github.com/github/awesome-copilot --skill typespec-create-api-pluginAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 8.6k |
|---|---|
| repo stars | ★ 37.1k |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 28, 2026 |
| Repository | github/awesome-copilot ↗ |
What problem does typespec-create-api-plugin solve for developers using this skill?
Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot
Who is it for?
Developers who need typespec-create-api-plugin patterns described in the cached skill documentation.
Skip if: Skip when docs are empty or the task is outside the skill's documented scope.
When should I use this skill?
Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot
What you get
Actionable workflows and conventions from SKILL.md for typespec-create-api-plugin.
- main.tsp
- actions.tsp
- TypeSpec project scaffold
By the numbers
- Emits main.tsp and actions.tsp as core TypeSpec plugin files
- Uses 3 TypeSpec packages: @typespec/http, @typespec/openapi3, @microsoft/typespec-m365-copilot
Files
Create TypeSpec API Plugin
Create a complete TypeSpec API plugin for Microsoft 365 Copilot that integrates with external REST APIs.
Requirements
Generate TypeSpec files with:
main.tsp - Agent Definition
import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";
import "./actions.tsp";
using TypeSpec.Http;
using TypeSpec.M365.Copilot.Agents;
using TypeSpec.M365.Copilot.Actions;
@agent({
name: "[Agent Name]",
description: "[Description]"
})
@instructions("""
[Instructions for using the API operations]
""")
namespace [AgentName] {
// Reference operations from actions.tsp
op operation1 is [APINamespace].operationName;
}actions.tsp - API Operations
import "@typespec/http";
import "@microsoft/typespec-m365-copilot";
using TypeSpec.Http;
using TypeSpec.M365.Copilot.Actions;
@service
@actions(#{
nameForHuman: "[API Display Name]",
descriptionForModel: "[Model description]",
descriptionForHuman: "[User description]"
})
@server("[API_BASE_URL]", "[API Name]")
@useAuth([AuthType]) // Optional
namespace [APINamespace] {
@route("[/path]")
@get
@action
op operationName(
@path param1: string,
@query param2?: string
): ResponseModel;
model ResponseModel {
// Response structure
}
}Authentication Options
Choose based on API requirements:
1. No Authentication (Public APIs)
// No @useAuth decorator needed2. API Key
@useAuth(ApiKeyAuth<ApiKeyLocation.header, "X-API-Key">)3. OAuth2
@useAuth(OAuth2Auth<[{
type: OAuth2FlowType.authorizationCode;
authorizationUrl: "https://oauth.example.com/authorize";
tokenUrl: "https://oauth.example.com/token";
refreshUrl: "https://oauth.example.com/token";
scopes: ["read", "write"];
}]>)4. Registered Auth Reference
@useAuth(Auth)
@authReferenceId("registration-id-here")
model Auth is ApiKeyAuth<ApiKeyLocation.header, "X-API-Key">Function Capabilities
Confirmation Dialog
@capabilities(#{
confirmation: #{
type: "AdaptiveCard",
title: "Confirm Action",
body: """
Are you sure you want to perform this action?
* **Parameter**: {{ function.parameters.paramName }}
"""
}
})Adaptive Card Response
@card(#{
dataPath: "$.items",
title: "$.title",
url: "$.link",
file: "cards/card.json"
})Reasoning & Response Instructions
@reasoning("""
Consider user's context when calling this operation.
Prioritize recent items over older ones.
""")
@responding("""
Present results in a clear table format with columns: ID, Title, Status.
Include a summary count at the end.
""")Best Practices
1. Operation Names: Use clear, action-oriented names (listProjects, createTicket) 2. Models: Define TypeScript-like models for requests and responses 3. HTTP Methods: Use appropriate verbs (@get, @post, @patch, @delete) 4. Paths: Use RESTful path conventions with @route 5. Parameters: Use @path, @query, @header, @body appropriately 6. Descriptions: Provide clear descriptions for model understanding 7. Confirmations: Add for destructive operations (delete, update critical data) 8. Cards: Use for rich visual responses with multiple data items
Workflow
Ask the user: 1. What is the API base URL and purpose? 2. What operations are needed (CRUD operations)? 3. What authentication method does the API use? 4. Should confirmations be required for any operations? 5. Do responses need Adaptive Cards?
Then generate:
- Complete
main.tspwith agent definition - Complete
actions.tspwith API operations and models - Optional
cards/card.jsonif Adaptive Cards are needed
Related skills
How it compares
Choose typespec-create-api-plugin when Copilot-specific TypeSpec decorators and Adaptive Cards are required instead of generic OpenAPI-only scaffolding.
FAQ
What does typespec-create-api-plugin do?
Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot
When should I use typespec-create-api-plugin?
Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot
Is typespec-create-api-plugin safe to install?
Review the Security Audits panel on this page before installing in production.