add-action
Guide users through adding a new connector action to a Copilot Studio agent. Connector…
Add a global variable to a Copilot Studio agent. Use when the user needs a variable that persists across topics in the same conversation and can optionally be visible to the AI orchestrator.
$ npx -y skills add microsoft/skills-for-copilot-studio --skill add-global-variable --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/add-global-variableContext preview
The summary Claude sees to decide when to auto-load this skill.
Add a global variable to a Copilot Studio agent. Use when the user needs a variable that persists across topics in the same conversation and can optionally be visible to the AI orchestrator.
user-invocable: false description: Add a global variable to a Copilot Studio agent. Use when the user needs a variable that persists across topics in the same conversation and can optionally be visible to the AI orchestrator. argument-hint: <variable name and purpose> allowed-tools: Read, Write, Glob, Grep context: fork agent: copilot-studio-author
Create a global variable that persists across all topics within a conversation.
1. **Auto-discover the agent directory**:
Glob: **/agent.mcs.yml
Use the top-level agent. NEVER hardcode an agent name.
2. **Read `settings.mcs.yml`** to get the `schemaName` prefix:
Read: <agent-dir>/settings.mcs.yml
Extract the root-level `schemaName` value (e.g., `copilots_header_cre3c_fullagent`).
3. **Determine from the user**:
4. **Create the variable file** at `<agent-dir>/variables/<VariableName>.mcs.yml`:
# Name: <Human-readable Name> # <Description> name: <VariableName> aIVisibility: <UseInAIContext or HideFromAIContext> scope: Conversation description: <Description of what the variable stores> schemaName: <prefix>.globalvariable.<VariableName> kind: GlobalVariableComponent defaultValue: <DEFAULT or specific value>
5. **Key fields explained**:
Topics reference global variables with the `Global.` prefix:
# Reading a global variable in a condition
- kind: ConditionGroup
id: conditionGroup_Xk9mPq
conditions:
- id: conditionItem_Lw3nRs
condition: =!IsBlank(Global.LastDiscussedCity)
actions:
- kind: SendActivity
id: sendMessage_Yt7vBw
activity:
text:
- "Last time we discussed {Global.LastDiscussedCity}."
# Setting a global variable from a topic
- kind: SetTextVariable
id: setTextVariable_Qp4kMn
variable: Global.LastDiscussedCity
value: =Topic.CityNameA 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 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…
Add child agents, connected agents, or other multi-agent patterns to a Copilot Studio agent.…