No slash command · from copilot-studio
Pushes and pulls Copilot Studio agent content via the VS Code extension's LanguageServerHost LSP binary. Handles authentication, sync, clone, and diff operations.
Ships in copilot-studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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:
ms-copilotstudio.vscode-copilotstudio).auth command). If --client-id is omitted, the script uses VS Code's first-party client ID with interactive browser login instead..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).
auth command (device code flow — chat/test token)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.
status: "ok"Tokens are cached. Proceed to Phase 2.
device_code_expiredThe 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}/../../scripts/manage-agent.bundle.js pull \
--workspace "<path-to-agent-folder>" \
--tenant-id "<tenantId>" \
--environment-id "<envId>" \
--environment-url "<envUrl>" \
--agent-mgmt-url "<mgmtUrl>"
Important: Always pull before push to get fresh row versions. If you push without pulling first, you'll get a ConcurrencyVersionMismatch error.
Push automatically validates all .mcs.yml files before pushing and blocks if there are errors. Add --force to bypass validation (not recommended).
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js push \
--workspace "<path-to-agent-folder>" \
--tenant-id "<tenantId>" \
--environment-id "<envId>" \
--environment-url "<envUrl>" \
--agent-mgmt-url "<mgmtUrl>"
Validates all .mcs.yml files in the workspace using the LSP binary's full diagnostics (YAML structure, Power Fx, schema, cross-file references).
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>"
Returns JSON: { "valid": true|false, "summary": { "errors": N, "warnings": N }, "files": [...] }
Requires either --agent-id (the bot GUID from list-agents) or --url (a Copilot Studio web URL). Uses Island API token automatically.
With explicit IDs:
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js clone \
--workspace "<target-folder>" \
--tenant-id "<tenantId>" \
--environment-id "<envId>" \
--environment-url "<envUrl>" \
--agent-mgmt-url "<mgmtUrl>" \
--agent-id "<agentId>"
With a Copilot Studio URL (recommended shortcut):
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js clone \
--workspace "<target-folder>" \
--tenant-id "<tenantId>" \
--url "https://copilotstudio.microsoft.com/environments/<envId>/bots/<agentId>/overview"
When --url is provided, the script extracts environmentId and agentId from the URL and resolves environmentUrl and agentMgmtUrl automatically via the BAP API. The --url flag also works with push, pull, changes, and validate commands.
--client-id is optional. When omitted, uses VS Code's 1p client with interactive browser login.
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js changes \
--workspace "<path-to-agent-folder>" \
--tenant-id "<tenantId>" \
--environment-id "<envId>" \
--environment-url "<envUrl>" \
--agent-mgmt-url "<mgmtUrl>"
Publishes the agent so that the current draft becomes the live version reachable by external clients (/chat-with-agent, /run-tests, Teams, etc.). Uses the Dataverse PvaPublish bound action directly (no LSP binary needed).
IMPORTANT — Publishing makes this version of the agent available to ALL users the agent is shared with. If you are working in a development environment this is fine, but if the agent is shared with production users, always confirm with the user before publishing. Ask: "This will publish the agent and make it live for all users it's shared with. Should I proceed?"
The command polls the publishedon field on the bot entity until the timestamp changes, confirming that publish has taken effect. Default timeout is 5 minutes.
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js publish \
--workspace "<path-to-agent-folder>" \
--tenant-id "<tenantId>" \
--environment-url "<envUrl>" \
[--timeout <ms>]
Timeout: 300000ms (5 minutes) — set this on the Bash tool call.
Optional: --agent-id "<agentId>" overrides the bot ID from conn.json.
{"status":"ok","botId":"...","publishedOn":"2026-03-27T12:00:00Z","previousPublishedOn":"2026-03-26T10:00:00Z","durationMs":45000,"durationSeconds":45}
push, if the user wants changes to be testable via /chat-with-agent or /run-testsUses Dataverse REST API directly (no LSP binary needed). --client-id is optional.
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js list-agents \
--tenant-id "<tenantId>" \
--environment-url "<envUrl>" \
[--no-owner]
By default lists only agents owned by the current user. Add --no-owner to list all unmanaged agents.
Uses BAP REST API directly (no LSP binary needed). --client-id is optional.
node ${CLAUDE_SKILL_DIR}/../../scripts/manage-agent.bundle.js list-envs \
--tenant-id "<tenantId>"
All commands output JSON to stdout with a status field:
{"status":"device_code","userCode":"XXXXXXXX","verificationUri":"https://login.microsoft.com/device","message":"...","expiresIn":900}
{"status":"ok","method":"powerplatformls/syncPull","result":{...}}
{"status":"error","error":"description of what went wrong"}
| Error | Likely cause | Resolution |
|---|---|---|
| Extension not found | Copilot Studio VS Code extension not installed | Install from VS Code marketplace |
| LSP request timed out | Binary not responding or wrong protocol version | Check extension version, try updating |
| device_code_expired | User didn't authenticate in time | Re-run auth, authenticate promptly |
| ConcurrencyVersionMismatch | Push without fresh row versions | Pull first, then push |
| Token expired + silent refresh failed | Refresh token expired (~90 days) | Run auth command for new device code flow |
| Binary missing | Extension installed but binary not present | Reinstall the extension |
| PvaPublish failed | Insufficient permissions or bot not found | Verify the user has publish permissions and the agent ID is correct |
| Publish timed out | Publish still in progress after timeout | Increase --timeout or check the Copilot Studio UI for status |
What SKILL.md sets; muted values are Claude Code's defaults
copilot-studio-manage), in the backgroundThree short reads, in order
31 skills in this plugin
/add-actionAdd Connector Action (Guide)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./add-adaptive-cardAdd Adaptive CardGenerate 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./add-generative-answersnpx claudepluginhub microsoft/skills-for-copilot-studio --plugin copilot-studioOther plugins' skills for the same job