{"id":"2e286823-f885-4c25-8fc2-e6e859cef897","shortId":"VtXfMG","kind":"skill","title":"Typespec Create Api Plugin","tagline":"Awesome Copilot skill by Github","description":"# Create TypeSpec API Plugin\n\nCreate a complete TypeSpec API plugin for Microsoft 365 Copilot that integrates with external REST APIs.\n\n## Requirements\n\nGenerate TypeSpec files with:\n\n### main.tsp - Agent Definition\n```typescript\nimport \"@typespec/http\";\nimport \"@typespec/openapi3\";\nimport \"@microsoft/typespec-m365-copilot\";\nimport \"./actions.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.M365.Copilot.Agents;\nusing TypeSpec.M365.Copilot.Actions;\n\n@agent({\n  name: \"[Agent Name]\",\n  description: \"[Description]\"\n})\n@instructions(\"\"\"\n  [Instructions for using the API operations]\n\"\"\")\nnamespace [AgentName] {\n  // Reference operations from actions.tsp\n  op operation1 is [APINamespace].operationName;\n}\n```\n\n### actions.tsp - API Operations\n```typescript\nimport \"@typespec/http\";\nimport \"@microsoft/typespec-m365-copilot\";\n\nusing TypeSpec.Http;\nusing TypeSpec.M365.Copilot.Actions;\n\n@service\n@actions(#{\n    nameForHuman: \"[API Display Name]\",\n    descriptionForModel: \"[Model description]\",\n    descriptionForHuman: \"[User description]\"\n})\n@server(\"[API_BASE_URL]\", \"[API Name]\")\n@useAuth([AuthType]) // Optional\nnamespace [APINamespace] {\n  \n  @route(\"[/path]\")\n  @get\n  @action\n  op operationName(\n    @path param1: string,\n    @query param2?: string\n  ): ResponseModel;\n\n  model ResponseModel {\n    // Response structure\n  }\n}\n```\n\n## Authentication Options\n\nChoose based on API requirements:\n\n1. **No Authentication** (Public APIs)\n   ```typescript\n   // No @useAuth decorator needed\n   ```\n\n2. **API Key**\n   ```typescript\n   @useAuth(ApiKeyAuth<ApiKeyLocation.header, \"X-API-Key\">)\n   ```\n\n3. **OAuth2**\n   ```typescript\n   @useAuth(OAuth2Auth<[{\n     type: OAuth2FlowType.authorizationCode;\n     authorizationUrl: \"https://oauth.example.com/authorize\";\n     tokenUrl: \"https://oauth.example.com/token\";\n     refreshUrl: \"https://oauth.example.com/token\";\n     scopes: [\"read\", \"write\"];\n   }]>)\n   ```\n\n4. **Registered Auth Reference**\n   ```typescript\n   @useAuth(Auth)\n   \n   @authReferenceId(\"registration-id-here\")\n   model Auth is ApiKeyAuth<ApiKeyLocation.header, \"X-API-Key\">\n   ```\n\n## Function Capabilities\n\n### Confirmation Dialog\n```typescript\n@capabilities(#{\n  confirmation: #{\n    type: \"AdaptiveCard\",\n    title: \"Confirm Action\",\n    body: \"\"\"\n    Are you sure you want to perform this action?\n      * **Parameter**: {{ function.parameters.paramName }}\n    \"\"\"\n  }\n})\n```\n\n### Adaptive Card Response\n```typescript\n@card(#{\n  dataPath: \"$.items\",\n  title: \"$.title\",\n  url: \"$.link\",\n  file: \"cards/card.json\"\n})\n```\n\n### Reasoning & Response Instructions\n```typescript\n@reasoning(\"\"\"\n  Consider user's context when calling this operation.\n  Prioritize recent items over older ones.\n\"\"\")\n@responding(\"\"\"\n  Present results in a clear table format with columns: ID, Title, Status.\n  Include a summary count at the end.\n\"\"\")\n```\n\n## Best Practices\n\n1. **Operation Names**: Use clear, action-oriented names (listProjects, createTicket)\n2. **Models**: Define TypeScript-like models for requests and responses\n3. **HTTP Methods**: Use appropriate verbs (@get, @post, @patch, @delete)\n4. **Paths**: Use RESTful path conventions with @route\n5. **Parameters**: Use @path, @query, @header, @body appropriately\n6. **Descriptions**: Provide clear descriptions for model understanding\n7. **Confirmations**: Add for destructive operations (delete, update critical data)\n8. **Cards**: Use for rich visual responses with multiple data items\n\n## Workflow\n\nAsk the user:\n1. What is the API base URL and purpose?\n2. What operations are needed (CRUD operations)?\n3. What authentication method does the API use?\n4. Should confirmations be required for any operations?\n5. Do responses need Adaptive Cards?\n\nThen generate:\n- Complete `main.tsp` with agent definition\n- Complete `actions.tsp` with API operations and models\n- Optional `cards/card.json` if Adaptive Cards are needed","tags":["typespec","create","api","plugin","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/typespec-create-api-plugin","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T08:40:12.539Z","embedding":null,"createdAt":"2026-04-18T20:26:12.686Z","updatedAt":"2026-04-22T08:40:12.539Z","lastSeenAt":"2026-04-22T08:40:12.539Z","tsv":"'/actions.tsp':46 '/authorize':167 '/path':113 '/token':171,175 '1':136,278,359 '2':146,289,368 '3':157,300,375 '365':22 '4':179,310,383 '5':318,391 '6':326 '7':334 '8':344 'action':90,115,211,221,284 'action-ori':283 'actions.tsp':71,77,405 'adapt':224,395,414 'adaptivecard':208 'add':336 'agent':36,53,55,402 'agentnam':67 'api':3,12,18,29,64,78,92,102,105,134,140,147,155,198,363,381,407 'apikeyauth':151,194 'apikeylocation.header':152,195 'apinamespac':75,111 'appropri':304,325 'ask':356 'auth':181,185,192 'authent':129,138,377 'authorizationurl':164 'authreferenceid':186 'authtyp':108 'awesom':5 'base':103,132,364 'best':276 'bodi':212,324 'call':247 'capabl':201,205 'card':225,228,345,396,415 'cards/card.json':236,412 'category-awesome-copilot' 'choos':131 'clear':261,282,329 'column':265 'complet':16,399,404 'confirm':202,206,210,335,385 'consid':242 'context':245 'convent':315 'copilot':6,23 'count':272 'creat':2,10,14 'createticket':288 'critic':342 'crud':373 'data':343,353 'datapath':229 'decor':144 'defin':291 'definit':37,403 'delet':309,340 'descript':57,58,97,100,327,330 'descriptionforhuman':98 'descriptionformodel':95 'destruct':338 'dialog':203 'display':93 'end':275 'extern':27 'file':33,235 'format':263 'function':200 'function.parameters.paramname':223 'generat':31,398 'get':114,306 'github':9 'header':323 'http':301 'id':189,266 'import':39,41,43,45,81,83 'includ':269 'instruct':59,60,239 'integr':25 'item':230,252,354 'key':148,156,199 'like':294 'link':234 'listproject':287 'main.tsp':35,400 'method':302,378 'microsoft':21 'microsoft/typespec-m365-copilot':44,84 'model':96,125,191,290,295,332,410 'multipl':352 'name':54,56,94,106,280,286 'nameforhuman':91 'namespac':66,110 'need':145,372,394,417 'oauth.example.com':166,170,174 'oauth.example.com/authorize':165 'oauth.example.com/token':169,173 'oauth2':158 'oauth2auth':161 'oauth2flowtype.authorizationcode':163 'older':254 'one':255 'op':72,116 'oper':65,69,79,249,279,339,370,374,390,408 'operation1':73 'operationnam':76,117 'option':109,130,411 'orient':285 'param1':119 'param2':122 'paramet':222,319 'patch':308 'path':118,311,314,321 'perform':219 'plugin':4,13,19 'post':307 'practic':277 'present':257 'priorit':250 'provid':328 'public':139 'purpos':367 'queri':121,322 'read':177 'reason':237,241 'recent':251 'refer':68,182 'refreshurl':172 'regist':180 'registr':188 'registration-id-her':187 'request':297 'requir':30,135,387 'respond':256 'respons':127,226,238,299,350,393 'responsemodel':124,126 'rest':28,313 'result':258 'rich':348 'rout':112,317 'scope':176 'server':101 'servic':89 'skill':7 'source-github' 'status':268 'string':120,123 'structur':128 'summari':271 'sure':215 'tabl':262 'titl':209,231,232,267 'tokenurl':168 'type':162,207 'typescript':38,80,141,149,159,183,204,227,240,293 'typescript-lik':292 'typespec':1,11,17,32 'typespec.http':48,86 'typespec.m365.copilot.actions':52,88 'typespec.m365.copilot.agents':50 'typespec/http':40,82 'typespec/openapi3':42 'understand':333 'updat':341 'url':104,233,365 'use':47,49,51,62,85,87,281,303,312,320,346,382 'useauth':107,143,150,160,184 'user':99,243,358 'verb':305 'visual':349 'want':217 'workflow':355 'write':178 'x':154,197 'x-api-key':153,196","prices":[{"id":"7bbf0a49-1f24-4b59-89e9-432cd59fa197","listingId":"2e286823-f885-4c25-8fc2-e6e859cef897","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:26:12.686Z"}],"sources":[{"listingId":"2e286823-f885-4c25-8fc2-e6e859cef897","source":"github","sourceId":"github/awesome-copilot/typespec-create-api-plugin","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/typespec-create-api-plugin","isPrimary":false,"firstSeenAt":"2026-04-18T21:51:31.042Z","lastSeenAt":"2026-04-22T06:52:33.227Z"},{"listingId":"2e286823-f885-4c25-8fc2-e6e859cef897","source":"skills_sh","sourceId":"github/awesome-copilot/typespec-create-api-plugin","sourceUrl":"https://skills.sh/github/awesome-copilot/typespec-create-api-plugin","isPrimary":true,"firstSeenAt":"2026-04-18T20:26:12.686Z","lastSeenAt":"2026-04-22T08:40:12.539Z"}],"details":{"listingId":"2e286823-f885-4c25-8fc2-e6e859cef897","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"typespec-create-api-plugin","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/typespec-create-api-plugin"},"updatedAt":"2026-04-22T08:40:12.539Z"}}