Source profileQuality 69/100

github/awesome-copilot/skills/typespec-create-api-plugin/SKILL.md

typespec-create-api-plugin

Generate a TypeSpec API plugin with REST operations, authentication, and Adaptive Cards for Microsoft 365 Copilot

Source repository stars
37,126
Declared platforms
0
Static risk flags
1
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Create a complete TypeSpec API plugin for Microsoft 365 Copilot that integrates with external REST APIs.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/github/awesome-copilot --skill "skills/typespec-create-api-plugin"
    Safe inspection promptEditorial

    Inspect the Agent Skill "typespec-create-api-plugin" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/typespec-create-api-plugin/SKILL.md at commit 9933dcad5be5caeb288cebcd370eeeb2fc2f1685. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Reasoning & Response Instructions

      Review the “Reasoning & Response Instructions” section in the pinned source before continuing.

      Review and apply the “Reasoning & Response Instructions” source section.
    2. 02

      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?

      What is the API base URL and purpose?What operations are needed (CRUD operations)?What authentication method does the API use?
    3. 03

      Requirements

      Generate TypeSpec files with:

      Generate TypeSpec files with:
    4. 04

      main.tsp - Agent Definition

      Review the “main.tsp - Agent Definition” section in the pinned source before continuing.

      Review and apply the “main.tsp - Agent Definition” source section.

    Permission review

    Static risk signals and limitations

    Network access

    medium · line 83

    The documentation includes network, browsing, or remote request actions.

    authorizationUrl: "https://oauth.example.com/authorize";

    Network access

    medium · line 84

    The documentation includes network, browsing, or remote request actions.

    tokenUrl: "https://oauth.example.com/token";

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score69/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars37,126SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    github/awesome-copilot
    Skill path
    skills/typespec-create-api-plugin/SKILL.md
    Commit
    9933dcad5be5caeb288cebcd370eeeb2fc2f1685
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    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 needed
      
    2. 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.tsp with agent definition
    • Complete actions.tsp with API operations and models
    • Optional cards/card.json if Adaptive Cards are needed

    Alternatives

    Compare before choosing