add-action
Guide users through adding a new connector action to a Copilot Studio agent. Connector actions require UI-based connection setup,…
Push/pull Copilot Studio agent content via the VS Code extension's LanguageServerHost LSP binary. Handles authentication (interactive browser login for push/pull, device code flow for chat token), sync push, sync pull, clone, and diff operations.
Claude Code
$ npx -y skills add microsoft/skills-for-copilot-studio --skill manage-agent --agent claude-code
Codex
$ npx skills add microsoft/skills-for-copilot-studio --skill manage-agent -a codex -y
Cursor
$ npx skills add microsoft/skills-for-copilot-studio --skill manage-agent -a cursor -y
Gemini CLI
$ npx skills add microsoft/skills-for-copilot-studio --skill manage-agent -a gemini-cli -y
GitHub Copilot
$ npx skills add microsoft/skills-for-copilot-studio --skill manage-agent -a github-copilot -y
OpenCode
$ npx skills add microsoft/skills-for-copilot-studio --skill manage-agent -a opencode -y
Windsurf
$ npx skills add microsoft/skills-for-copilot-studio --skill manage-agent -a windsurf -y
user-invocable: false description: Push/pull Copilot Studio agent content via the VS Code extension's LanguageServerHost LSP binary. Handles authentication (interactive browser login for push/pull, device code flow for chat token), sync push, sync pull, clone, and diff operations. argument-hint: <push|pull|clone|changes|validate|publish|auth|list-agents|list-envs> allowed-tools: Bash(node *manage-agent.bundle.js *), Read, Glob, Grep context: fork agent: copilot-studio-manage
Push and pull Copilot Studio agent content by calling the VS Code extension's LanguageServerHost binary directly, using the same custom LSP protocol the extension uses internally.
This is a new capability under active development. The manage-agent scripts (`manage-agent.bundle.js`, `chat-with-agent.bundle.js`) are pre-built bundles that must not be modified, patched, or monkey-patched. If a script fails:
1. **Report the error as-is** — show the user the full error output 2. **Do not attempt to fix, patch, or work around script errors** — the scripts interact with the LSP binary using a specific protocol and any modifications will break things 3. **Direct the user to raise an issue** at https://github.com/microsoft/skills-for-copilot-studio/issues with the error output 4. **Suggest using the VS Code extension directly** — the user can perform the same push/pull/clone operations from the Copilot Studio VS Code extension UI as a fallback
1. **Copilot Studio VS Code extension** must be installed (`ms-copilotstudio.vscode-copilotstudio`). 2. **Azure AD app registration** (optional) — only needed for device code flow (`auth` command). If `--client-id` is omitted, the script uses VS Code's first-party client ID with interactive browser login instead. 3. **Environment details** — tenant ID, environment ID, environment URL, and agent management URL. These come from the `.mcs/conn.json` inside a cloned agent workspace (created automatically during clone).
Dataverse URLs must be HTTPS origins on an organization hostname under `crm.dynamics.com`, `crm<number>.dynamics.com`, `crm.microsoftdynamics.us`, `crm.appsplatform.us`, or `crm.dynamics.cn`, without credentials, custom ports, paths, queries, or fragments. Trailing slashes and the default HTTPS port are accepted. Tenant IDs must be GUIDs or tenant domain names; agent IDs must be GUIDs. Authenticated REST requests do not follow redirects. Accepting a sovereign-cloud Dataverse hostname does not add sovereign-cloud authentication or discovery; the existing authority and BAP endpoints are unchanged.
Search for `.mcs/conn.json` in the workspace and nearby directories to find existing connection details. The script auto-reads environment details from `conn.json`. If no `conn.json` is found, ask the user for the required parameters.
There are **two different auth flows** depending on the operation:
These commands use VS Code's first-party client ID with the **Island API gateway**. Authentication is **interactive** — a browser window opens automatically for sign-in. No manual code entry is needed.
**No separate auth step is needed before push/pull.** The commands handle token acquisition automatically. Just run the command directly (Phase 2).
The `auth` command acquires a generic `api.powerplatform.com` token using **device code flow**. This token is used by the chat and test skills, not by push/pull.
Run with a **5-minute timeout**:
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js auth \
--tenant-id "<tenantId>" \
--client-id "<clientId>" \
--environment-url "<environmentUrl>"**Timeout: 300000ms (5 minutes)** — set this on the Bash tool call.
Tokens and MSAL refresh tokens are persisted in the OS credential store (macOS Keychain, Windows DPAPI, Linux secret-tool). After initial authentication:
The script emits a JSON line to stdout:
{"status":"device_code","userCode":"XXXXXXXX","verificationUri":"https://login.microsoft.com/device","message":"...","expiresIn":900}**When you see this in the output**, immediately tell the user:
> **Authentication Required** > > Please open **{verificationUri}** in your browser and enter code **{userCode}** > > The command is waiting for you to complete sign-in. You have {expiresIn/60} minutes.
The command will automatically continue once the user completes authentication. **Do NOT cancel the command** — it is waiting for the browser sign-in to complete.
Two tokens are acquired sequentially (Copilot Studio API, then Dataverse API), so the user may need to authenticate **twice** on first use.
Tokens are cached. Proceed to Phase 2.
The user didn't authenticate in time. Re-run the `auth` command and remind them to authenticate promptly.
All commands auto-detect the agent directory (finds the subfolder with `.mcs/conn.json`) and read connection details from it.
`--client-id` is optional. When omitted, uses VS Code's 1p client with interactive browser login.
node ${CLAUDE_SKILL_DIR}/..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.
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 global variable to a Copilot Studio agent. Use when the user needs a variable that persists across topics in the same…
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,…
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…