A value your chatbot holds on to for the whole conversation, instead of forgetting it the moment the subject changes.
WHEN TO USE
SCOPE
USE FOR
Remember someone's preferred language so every part of the bot can use it.
Let the AI see what is going on in the conversation so it routes people better.
Set a starting value that different parts of the conversation can read or change.
Point the bot at a different document folder for each region by storing the address.
This is a saved copy of the skill's SKILL.md instructions. It may differ from the upstream file or the version you install.
Add Global Variable
Create a global variable that persists across all topics within a conversation.
Instructions
Auto-discover the agent directory:
Glob: **/agent.mcs.yml
Use the top-level agent. NEVER hardcode an agent name.
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).
Determine from the user:
Variable name (PascalCase, e.g., LastDiscussedCity)
Description of what it stores
Whether the AI orchestrator should be aware of it (aIVisibility)
Default value (if any)
DO NOT skip any of these properties. If the user doesn't provide them, ask follow-up questions to get the necessary information.
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>
Key fields explained:
name — PascalCase identifier. This is how topics reference the variable: Global.<name> (e.g., Global.LastDiscussedCity).
aIVisibility — Controls orchestrator awareness:
UseInAIContext — The orchestrator can read and reason about this variable. Use when the variable influences routing or response generation (e.g., user preferences, conversation state the AI should track).
HideFromAIContext — The variable exists but the orchestrator doesn't see it. Use for internal bookkeeping (e.g., counters, flags) that topics use but the AI doesn't need to reason about.
scope: Conversation — Always Conversation for global variables (persists for the session).
schemaName — Must follow the pattern <agent-schemaName>.globalvariable.<VariableName>. Read the prefix from settings.mcs.yml.
defaultValue — Initial value. Use DEFAULT if no specific initial value is needed.
How Topics Use Global Variables
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.CityName
When to Use Global Variables
Cross-topic state: A value set in one topic needs to be read in another (e.g., user's preferred language, last search query)
AI-aware context: The orchestrator should know something about the conversation state to make better routing decisions (use UseInAIContext)
Conversation-wide defaults: A default value that multiple topics can read and optionally override
Dynamic knowledge sources: A global variable can hold a URL that a knowledge source references via =$"{Global.VarName}". This enables routing to different SharePoint folders or websites per user (e.g., by geolocation or department). See /copilot-studio:add-knowledge for the full pattern. Important: the variable value must be a clean, direct URL — not a SharePoint AllItems.aspx link with query parameters.
No requirements beyond installing this skill were found.
🔌 This skill ships inside the Copilot Studio YAML Toolkit plugin. Listed package contents include 4 agents and hooks. Installed components and skill versions may vary by AI tool.
Install just this skill
Run this outside your AI tool, using Node.js 22.20.0 or newer. Skills CLI 1.7.2 skips skill selection; prompts cancel installation without an interactive terminal. If choosing Project when asked about installation scope, open your project's folder before running this.
Install checklist
Check selected tools if a picker appears; Claude Code may be unchecked under Additional agents. ↑/↓ moves, Space toggles selections, Enter confirms.
Without a tool picker, check Installing to: for your intended tool. Stop if it names a different tool.
If asked, choose Symlink (Recommended) for shared files or Copy to all agents for separate copies; review the summary before confirming installation.
Install the find-skills skill? defaults to Yes, adding another skill for all projects. Choose No if you don't want that extra installation.
Skills CLI 1.7.2 sends install data to skills.sh by default, including the source, skill names, target tools and file details; GitHub sources are reported only when GitHub confirms the repository is public, while other remote sources can also be reported. Confirmed-public GitHub sources also trigger a security-audit request. Before installing, set the environment variable DO_NOT_TRACK=1 or DISABLE_TELEMETRY=1 to disable both.
After installing for Claude Code, open it in the installation project if you chose Project; Global makes the skill available across projects on this computer. Once Claude Code loads the skill, its description helps Claude decide when to use it.
If installation created a top-level skills folder that did not exist when your Claude Code session started, run /reload-skills in that session. Run it again after later changes in that folder.
Install the whole plugin
This route installs the Copilot Studio YAML Toolkit plugin package selected for your AI tool.
Add Microsoft's marketplace, then install the plugin
Type both lines inside a Claude Code session, not at your shell prompt. They add Microsoft's marketplace, which is this repository, and the copilot-studio plugin, with its Copilot Studio skills and four sub-agents.
Install checklist
Microsoft lists Node.js 18 or later, and VS Code with the Copilot Studio extension for cloning, pushing and pulling agents.
Claude Code installs it once you pick an install option.
Good to know
A hook that runs whenever a session starts adds Microsoft's Copilot Studio instructions; one tells Claude to lean towards reading your requests as Copilot Studio requests unless there are clear signs otherwise.
The option that installs it for you in every project brings the hook's instructions into every project; to keep them to one Copilot Studio repository, pick the option for this repo only.
On first run, and after an update that changes its dependencies, the session-start hook runs npm install in the plugin's data folder; every session it also writes ~/.copilot-studio-cli/plugin-paths.json.
Add Microsoft's marketplace, then install the plugin
Type both lines in an interactive GitHub Copilot CLI session, not at your shell prompt. The first adds Microsoft's marketplace, which is this repository; the second installs the copilot-studio plugin.
Install checklist
Microsoft lists Node.js 18 or later, and VS Code with the Copilot Studio extension for cloning, pushing and pulling agents.
The plugin also carries a hooks/hooks.json file with SessionStart hooks, a path GitHub's plugin reference lists as a hooks file for plugins in this format; read the file in the repository before you install.
Guide users through adding a new connector action to a Copilot Studio agent. Connector actions require UI-based connection setup, so this skill walks users through the Copilot Studio portal steps, then delegates to edit-action for YAML modifications.Read full description
Generate and insert an Adaptive Card into a Copilot Studio topic using AdaptiveCardPrompt. Use when the user asks to add an adaptive card, rich card, form card, info card, confirmation card, or interactive card to a topic.Read full description
Add generative answer nodes (SearchAndSummarizeContent or AnswerQuestionWithAI) to a Copilot Studio topic. Use this instead of /add-node when the user asks to add grounded answers, knowledge search, generative answers, or AI-powered responses — these nodes require specific patterns (ConditionGroup follow-up, knowledge source references, autoSend, responseCaptureType) that /add-node does not cover.Read full description
Add a knowledge source (public website or SharePoint) to a Copilot Studio agent. Use when the user asks to add a knowledge source, documentation URL, website, or SharePoint site for the agent to search.Read full description
Add or modify a node in an existing Copilot Studio topic. Use when the user asks to add a question, message, condition, variable, or other node to a topic. Do NOT use this for generative answers or knowledge search — use /add-generative-answers instead.Read full description
Add child agents, connected agents, or other multi-agent patterns to a Copilot Studio agent. Use when the user asks to create a sub-agent, child agent, connected agent, or call another agent.Read full description