From cogni-copilot
Translation rules and templates for porting Claude Code plugins to Microsoft Copilot Studio. This skill should be used when the user mentions "port to copilot studio", "convert plugin to copilot", "migrate to copilot studio", "copilot studio mapping", "translate plugin to microsoft", "export plugin for copilot", "copilot studio YAML", "copilot studio topic", or any request involving converting Claude Code plugin components (agents, skills, commands, hooks, MCP servers) into their Microsoft Copilot Studio equivalents (agents, topics, flows, triggers, connectors).
How this skill is triggered — by the user, by Claude, or both
Slash command
/cogni-copilot:copilot-studio-mappingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Port Claude Code plugins to Microsoft Copilot Studio by translating each component type using the rules below. Generate output in two formats: (1) exportable files for the VS Code extension workspace, and (2) step-by-step GUI instructions for manual entry.
Port Claude Code plugins to Microsoft Copilot Studio by translating each component type using the rules below. Generate output in two formats: (1) exportable files for the VS Code extension workspace, and (2) step-by-step GUI instructions for manual entry.
| Claude Code | Copilot Studio | Output Format |
|---|---|---|
| Agent (system prompt, tools) | Agent (instructions, tools, knowledge) | agent.mcs.yaml + GUI instructions |
| Skill (SKILL.md + references) | Topic with generative orchestration + Knowledge files | .mcs.yaml topic + knowledge docs |
| Command (frontmatter + instructions) | Topic with trigger phrases + flow actions | .mcs.yaml topic + workflow.json |
| Hook (event handler) | Event trigger topic or system topic override | .mcs.yaml trigger topic |
| MCP server (tool provider) | Custom connector (OpenAPI 2.0) or REST API tool | apiDefinition.swagger.json + apiProperties.json |
Generate all output into a copilot-studio-output/ directory using the VS Code extension workspace format:
copilot-studio-output/
├── agent.mcs.yaml
├── settings.mcs.yml
├── connectionreferences.mcs.yml
├── GUI-INSTRUCTIONS.md
├── topics/
│ ├── <skill-name>.mcs.yaml
│ └── <command-name>.mcs.yaml
├── trigger/
│ └── <hook-name>.mcs.yaml
├── workflows/
│ └── <flow-name>/
│ ├── metadata.yaml
│ └── workflow.json
├── actions/
│ └── <connector-name>.mcs.yml
└── knowledge/
└── files/
└── <skill-knowledge>.md
Read the source agent's markdown file. Extract:
instructions in agent.mcs.yamldescriptionRewrite the system prompt for Copilot Studio style:
Read, Write, Bash)Each skill becomes TWO outputs:
a) Topic (.mcs.yaml):
description fieldConditionGroup nodesb) Knowledge file:
knowledge/files/Each command becomes a topic. If the command performs actions (writes files, runs commands), also generate a Power Automate flow.
Topic (.mcs.yaml):
name → topic display namedescription → topic description (used by generative orchestration)argument-hint → Question node to collect the argumentSendActivity and action nodesFlow (workflow.json):
Run a flow from Copilot trigger and Respond to Copilot actionMap Claude hook events to Copilot Studio trigger types:
| Claude Hook Event | Copilot Studio Trigger |
|---|---|
SessionStart | OnConversationStart system topic |
UserPromptSubmit | OnMessageReceived trigger topic |
PreToolUse | OnAIGeneratedResponseAboutToBeSent or custom topic with conditions |
PostToolUse | OnPlanCompletes trigger topic |
Stop | OnEndOfConversation system topic |
Notification | Event trigger (SharePoint, Dataverse, or scheduled) |
For hooks with validation logic, translate the validation into ConditionGroup nodes.
Each MCP server becomes either a custom connector or a REST API tool definition.
Custom Connector (apiDefinition.swagger.json):
REST API Tool (alternative):
For detailed YAML templates, AdaptiveDialog node types, workflow.json schema, and OpenAPI connector templates, see the reference files:
references/topic-templates.md — AdaptiveDialog YAML templates for all node typesreferences/workflow-templates.md — Power Automate flow JSON templatesreferences/connector-templates.md — OpenAPI 2.0 connector templatesreferences/gui-instructions-template.md — GUI instruction format and field mappingsFor the GUI instruction format and field mapping reference, see references/gui-instructions-template.md.
When a Claude component has no direct Copilot Studio equivalent:
# MANUAL REVIEW NEEDED comment in the generated output explaining the gapWhen generating output, enforce these rules:
Question nodes require interruptionPolicy: { allowInterruption: true } and init: prefix on new variablesStringPrebuiltEntity, BooleanPrebuiltEntity, NumberPrebuiltEntity, DateTimePrebuiltEntity{Variable.Name} syntax=npx claudepluginhub cogni-work/cogni-tools --plugin cogni-copilotProvides reference tables for Copilot Studio YAML authoring: core files, triggers, actions, variables, entities, Power Fx functions, templates.
Adds Microsoft Copilot Studio connector to Power Apps code apps using pac CLI. Configures ExecuteCopilotAsyncV2 for invoking agents, sending prompts, and parsing responses.
Builds and maintains GitHub Copilot CLI plugins including skills, agents, prompts, instructions, AGENTS.md, MCP servers, and hooks. Provides specs, templates, validation.