add-action
Guide users through adding a new connector action to a Copilot Studio agent. Connector actions require UI-based connection setup,…
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.
Claude Code
$ npx -y skills add microsoft/skills-for-copilot-studio --skill add-global-variable --agent claude-code
Codex
$ npx skills add microsoft/skills-for-copilot-studio --skill add-global-variable -a codex -y
Cursor
$ npx skills add microsoft/skills-for-copilot-studio --skill add-global-variable -a cursor -y
Gemini CLI
$ npx skills add microsoft/skills-for-copilot-studio --skill add-global-variable -a gemini-cli -y
GitHub Copilot
$ npx skills add microsoft/skills-for-copilot-studio --skill add-global-variable -a github-copilot -y
OpenCode
$ npx skills add microsoft/skills-for-copilot-studio --skill add-global-variable -a opencode -y
Windsurf
$ npx skills add microsoft/skills-for-copilot-studio --skill add-global-variable -a windsurf -y
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.
Guide users through adding a new connector action to a Copilot Studio agent. Connector actions require UI-based connection setup,…
Generate and insert an Adaptive Card into a Copilot Studio topic using AdaptiveCardPrompt. Use when the user asks to add an…
Add generative answer nodes (SearchAndSummarizeContent or AnswerQuestionWithAI) to a Copilot Studio topic. Use this instead of…
Add a knowledge source (public website or SharePoint) to a Copilot Studio agent. Use when the user asks to add a knowledge…
Add or modify a node in an existing Copilot Studio topic. Use when the user asks to add a question, message, condition, variable,…
Add child agents, connected agents, or other multi-agent patterns to a Copilot Studio agent. Use when the user asks to create a…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…