add-action
Guide users through adding a new connector action to a Copilot Studio agent. Connector…
Create a new Copilot Studio topic YAML file. Use when the user asks to create a new topic, conversation flow, or dialog for their agent.
$ npx -y skills add microsoft/skills-for-copilot-studio --skill new-topic --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/new-topicContext preview
The summary Claude sees to decide when to auto-load this skill.
Create a new Copilot Studio topic YAML file. Use when the user asks to create a new topic, conversation flow, or dialog for their agent.
user-invocable: false description: Create a new Copilot Studio topic YAML file. Use when the user asks to create a new topic, conversation flow, or dialog for their agent. argument-hint: <topic description> allowed-tools: Bash(node *schema-lookup.bundle.js *), Bash(node *manage-agent.bundle.js *), Read, Write, Glob context: fork agent: copilot-studio-author
Generate a new Copilot Studio topic YAML file based on user requirements.
1. **Auto-discover the agent directory**:
Glob: **/agent.mcs.yml
If multiple agents found, ask which one. NEVER hardcode an agent name.
2. **Check for matching templates** in `${CLAUDE_SKILL_DIR}/../../templates/topics/` first:
If a template matches, use it as the starting point.
3. **MANDATORY: Verify ALL `kind:` values against the schema** before writing them:
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js kinds # List all valid kind values
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve AdaptiveDialog # Resolve trigger structure
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve <TriggerType> # Resolve specific trigger
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js search <ActionKind> # Verify an action kind exists**NEVER write a `kind:` value you haven't verified exists in the schema.** This is the #1 source of hallucination errors. If `schema-lookup.bundle.js search <kind>` returns no results, the kind does NOT exist — do not use it.
4. **Determine the trigger type** from the user's description:
5. **Generate the topic YAML** with:
6. **Check settings.mcs.yml** for `GenerativeActionsEnabled`. Read the agent's `settings.mcs.yml` to check.
7. **Save** to the agent's `topics/<topic-name>.topic.mcs.yml` directory
8. **MANDATORY: Validate the generated file** after saving:
**Step A: Schema validation** — always run this first:
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js validate <saved-file.yml>**Step B: LSP-based validation** — also run this if the agent has `.mcs/conn.json`: Read `.mcs/conn.json` to get connection details, then:
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js validate \
--workspace "<path-to-agent-folder>" \
--tenant-id "<tenantId>" \
--environment-id "<envId>" \
--environment-url "<envUrl>" \
--agent-mgmt-url "<mgmtUrl>"Both validations are complementary: schema validation checks structural correctness (action kinds, property placement), while LSP validation checks Power Fx expressions, cross-file references, and environment-specific rules. If either fails, fix the issues before reporting success to the user.
When the agent has `GenerativeActionsEnabled: true` in settings:
**Use Topic Inputs** (AutomaticTaskInput) instead of Question nodes to auto-collect user info. Place `inputs` at the **AdaptiveDialog root level** (NOT inside `beginDialog`):
kind: AdaptiveDialog
inputs: # <-- at AdaptiveDialog root, NOT inside beginDialog
- kind: AutomaticTaskInput
propertyName: userName
description: "The user's name"
entity: StringPrebuiltEntity
shouldPromptUser: true
beginDialog:
kind: OnRecognizedIntent
id: main
actions:
- ...**Use Topic Outputs** instead of SendActivity for final results. Use `outputType` at the root level and `SetVariable` to set output values — do NOT use `TaskOutput` (which is only valid in `TaskDialog` connector actions):
kind: AdaptiveDialog
inputs:
- ...
beginDialog:
kind: OnRecognizedIntent
id: main
actions:
- kind: SetVariable
id: setVar_abc123
variable: Topic.result
value: ="computed value"
outputType: # <-- at AdaptiveDialog root
properties:
result:
displayName: result
description: The computed result
type: String**Include inputType/outputType schemas** at the AdaptiveDialog root level when using inputs/outputs:
inputType:
properties:
userName:
displayName: userName
description: "The user's name"
type: String
outputType:
properties:
result:
displayName: result
type: StringWhen a topic exists alongside other topics or other actions (i.e. TaskDialog), think carefully about **the topic outputs** — it directly affe
A plugin for Claude Code, GitHub Copilot CLI, and VS Code that enables authoring, testing, and troubleshooting Microsoft Copilot Studio STANDARD agents through YAML files — directly from your terminal or editor.
Repo: microsoft/skills-for-copilot-studio
Guide users through adding a new connector action to a Copilot Studio agent. Connector…
Generate and insert an Adaptive Card into a Copilot Studio topic using AdaptiveCardPrompt.…
Add generative answer nodes (SearchAndSummarizeContent or AnswerQuestionWithAI) to a Copilot…
Add a global variable to a Copilot Studio agent. Use when the user needs a variable that…
Add a knowledge source (public website or SharePoint) to a Copilot Studio agent. Use when the…
Add or modify a node in an existing Copilot Studio topic. Use when the user asks to add a…