npx skills add ...
npx skills add github/awesome-copilot --skill typespec-create-api-plugin
npx skills add github/awesome-copilot --skill typespec-create-api-plugin
Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot
Create a complete TypeSpec API plugin for Microsoft 365 Copilot that integrates with external REST APIs.
Generate TypeSpec files with:
Choose based on API requirements:
No Authentication (Public APIs)
API Key
OAuth2
Registered Auth Reference
Ask the user:
Then generate:
main.tsp with agent definitionactions.tsp with API operations and modelscards/card.json if Adaptive Cards are neededimport "@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
}
}