manage-agent
Push/pull Copilot Studio agent content via the VS Code extension's LanguageServerHost LSP binary.
Skill by microsoftOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/microsoft-manage-agent
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/manage-agent
Tools it pre-approves 6
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(node*manage-agent.bundle.js*),Read,Glob,Grep
What's inside
- Skill name
manage-agent- 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.
- License
- MIT
- Allowed tools
- Bash(node, *manage-agent.bundle.js, *),, Read,, Glob,, Grep
- Instructions
- 262 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Agent Skills spec issues
- name: missing
Files (1)
- SKILL.md
SKILL.md (first lines)
# Manage Agent
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.
## IMPORTANT: Do Not Modify Scripts
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
## Prerequisites
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.
## Phase 0: Resolve Configuration
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.
## Phase 1: Authenticate
There are **two different auth flows** depending on the operation:
### For push / pull / clone / changes / list-agents (interactive browser login)
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.
- On first use, a browser window opens for Microsoft sign-in
- Tokens are cached in the OS credential store and silently refreshed for ~90 days
- After ~90 days, the browser will open again for re-authentication
**No separate auth step is needed before push/pull.** The commands handle token acquisition automatically. Just run the command directly (Phase 2).
### For the `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**:
```bash
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.
### Token caching and silent refresh
Tokens and MSAL refresh tokens are persisted in the OS credential store (macOS Keychain, Windows DPAPI, Linux secret-tool). After initial authentication:
- Access tokens are valid for ~1 hour
- Refresh tokens are valid for ~90 days
- The script automatically refreshes expired access tokens silently using the cached refresh token
- **Re-authentication is only needed on the very first use or after ~90 days**
### When device code flow starts (auth command only)
The script emits a JSON line to stdout:
```json
{"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.
### If the command completes with `status: "ok"`
Tokens are cached. Proceed to Phase 2.
### If the command fails with `device_code_expired`
The user didn't authenticate in time. Re-run the `auth` command and remind them to authenticate promptly.
## Phase 2: Execute Command
All commands auto-detect the agent directory (finds the subfolder with `.mcs/conn.json`) and read connection details from it.
### Pull (download remote changes)
`--client-id` is optional. When omitted, uses VS Code's 1p client with interactive browser login.
```bash
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>"
```
### Push (upload local changes)
**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).From microsoft/skills-for-copilot-studio, MIT.
More from microsoft/skills-for-copilot-studio
- 0.582score
int-project-context
microsoftOfficial
Shared project context for all Copilot Studio sub-agents.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
int-patterns
microsoftOfficial
Pattern library for Copilot Studio agent design.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
add-other-agents
microsoftOfficial
Add child agents, connected agents, or other multi-agent patterns to a Copilot Studio agent.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
edit-agent
microsoftOfficial
Edit Copilot Studio agent settings, instructions, or configuration.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
add-adaptive-card
microsoftOfficial
Generate and insert an Adaptive Card into a Copilot Studio topic using AdaptiveCardPrompt.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
add-node
microsoftOfficial
Add or modify a node in an existing Copilot Studio topic.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
lookup-schema
microsoftOfficial
Look up Copilot Studio YAML schema definitions.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
add-generative-answers
microsoftOfficial
Add generative answer nodes (SearchAndSummarizeContent or AnswerQuestionWithAI) to a Copilot Studio topic.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
add-global-variable
microsoftOfficial
Add a global variable to a Copilot Studio agent.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
create-eval-set
microsoftOfficial
Create a test set CSV file for import into Copilot Studio's in-product Evaluate tab.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
add-knowledge
microsoftOfficial
Add a knowledge source (public website or SharePoint) to a Copilot Studio agent.
SkillCFreshness: C★ 482Claude Code +9 - 0.581score
edit-triggers
microsoftOfficial
Modify topic triggers — trigger phrases and model description.
SkillCFreshness: C★ 482Claude Code +9
Signals
- Stars
- 482
- Forks
- 103
- Open issues
- 29
- Last commit (this folder)
- Apr 27, 2026 (6 months ago)
- Last release
- May 13, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from microsoft
- 0.714score
skillopt-sleep
microsoftOfficial
Reference-only OpenClaw adaptation of SkillOpt-Sleep.
SkillAFreshness: A★ 18.7KClaude Code +9 - 0.707score
Playwright MCP
microsoftOfficial
Playwright Tools.
ConnectorAFreshness: ALocal★ 38.6KClaude Code +5 - 0.687score
squad
microsoftOfficial
Squad's command catalog and interactive menu.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.687score
coordinator-response-mode
microsoftOfficial
Selecting WHO handles work is the Routing table; selecting HOW they handle it (Direct, Lightweight, Standard, Full) is Response Mode.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.687score
coordinator-source-of-truth
microsoftOfficial
The complete file-by-file source-of-truth hierarchy for Squad: which files are authoritative, which are derived/append-only, who may write each one, who may…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.687score
squad-commands
microsoftOfficial
Categorized catalog of common Squad operations.
SkillAFreshness: A★ 1.4KClaude Code +9
Cite this page
manage-agent skill. Agent Mart. https://agentmart.dev/skills/microsoft-manage-agent (last updated 2026-10-24)