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;
}
@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
Operation Names: Use clear, action-oriented names (listProjects, createTicket)
Models: Define TypeScript-like models for requests and responses
HTTP Methods: Use appropriate verbs (@get, @post, @patch, @delete)
Paths: Use RESTful path conventions with @route
Parameters: Use @path, @query, @header, @body appropriately
Descriptions: Provide clear descriptions for model understanding
Confirmations: Add for destructive operations (delete, update critical data)
Cards: Use for rich visual responses with multiple data items
Workflow
Ask the user:
What is the API base URL and purpose?
What operations are needed (CRUD operations)?
What authentication method does the API use?
Should confirmations be required for any operations?
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
git-commitgithubExecute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping46 k46 k instalaciones en skills.sh0
excalidraw-diagram-generatorgithubGenerate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.30.8 k30.8 k instalaciones en skills.sh0
documentation-writergithubDiátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.27.1 k27.1 k instalaciones en skills.sh0
prdgithubGenerate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical specifications, and risk analysis.23.6 k23.6 k instalaciones en skills.sh0
refactorgithubSurgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.22 k22 k instalaciones en skills.sh0