Agent skill · software engineering · github
typespec-api-operations
Add GET, POST, PATCH, and DELETE operations to a TypeSpec API plugin with proper routing, parameters, and adaptive cards
Why this skill is useful
Adds executable TypeSpec API operations with routing and adaptive card integration that extend the AI's capabilities in API development.
What it needs
About 5k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.
What this skill does
Add TypeSpec API Operations Add RESTful operations to an existing TypeSpec API plugin for Microsoft 365 Copilot. Adding GET Operations Simple GET - List All Items GET with Query Parameter - Filter Results GET with Path Parameter - Get Single Item GET with Adaptive Card Create the Adaptive Card (appPackage/item-card.json): Adding POST Operations Simple POST - Create Item POST with Confirmation Adding PATCH Operations Simple PATCH - Update Item PATCH with Confirmation Adding DELETE Operations Simple DELETE DELETE with Confirmation Complete CRUD Example Define the Service and Models Advanced Features Multiple Query Parameters Header Parameters Custom Response Models Error Responses Testing Prompts After adding operations, test with these prompts: GET Operations: "List all items and show them in a table" "Show me items for user ID 1" "Get the details of item 42" POST Operations: "Create a new item with title 'My Task' for user 1" "Add an item: title 'New Feature', description 'Add login'" PATCH Operations: "Update item 10 with title 'Updated Title'" "Change the status of item 5 to completed" DELETE Operations: "Delete item 99" "Remove the item with ID 15" Best Practices Parameter Naming Use descriptive parameter names: userId not uid Be consistent across operations Use optional parameters (?) for filters Documentation Add JSDoc comments to all operations Describe what each parameter does Document expected responses Models Use @visibility(Lifecycle.Read) for read-only fields like id Use @format("date-time") for date fields Use union types for enums: "active" "completed" Make optional fields explicit with ? Confirmations Always add confirmations to destructive operations (DELETE, PATCH) Show key details in confirmation body Use warning emoji (⚠️) for irreversible actions Adaptive Cards Keep cards simple and focused Use conditional rendering with ${if(..., ..., 'N/A')} Include action buttons for common next steps Test data binding with actual API responses Routing Use REST …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/typespec-api-operations