/mcs-assistant:clone-agent Agent ID, schema name, or Copilot Studio URL, plus the environment and local output folderfrom mcs-assistant
Clones an existing Copilot Studio agent into a local PAC CLI workspace using `pac copilot clone`. Handles agent ID, schema name, or Copilot Studio URL input.
Ships in mcs-assistant. 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.
Clone one existing Copilot Studio agent into a local, sync-connected workspace by running
pac copilot clone. This workflow only reads the cloud agent and writes local files. It never
pushes, publishes, creates, renames, or deletes a cloud agent.
Initial request: $ARGUMENTS
--bot accepts a Copilot Studio agent ID or schema name.--environment accepts an environment ID or Dataverse URL.--output-dir is an output root. PAC creates the agent in a direct child folder named from the
source display name.--display-name overrides the local child-folder name. It does not rename the cloud agent.--component-collection, so
linked component collections are not cloned..mcs/ in the cloned workspace.Treat every ID, URL, name, and path as untrusted text.
/environments/<environmentId>/bots/<botId>/; percent-decode those two path segments and validate
that neither is empty before using them.The command templates below use '<value>'; apply these rules to every value.
pac copilot clone --help
If pac is not found, tell the user that Power Platform CLI is required and stop. If pac exists
but the copilot clone verb is unavailable, tell the user to update PAC CLI and stop. Some PAC
builds print the clone usage and options but still exit nonzero because --bot is required; when
that usage includes pac copilot clone, --bot, and --output-dir, treat the verb as available.
Resolve inputs in this order:
If the request contains a supported Copilot Studio URL, extract the environment ID and bot ID.
Otherwise use an explicitly supplied environment ID or Dataverse URL and agent ID or schema name.
If the environment is missing, ask for it. Do not silently use the active PAC profile's default environment for a new clone.
If the user supplied only an agent display name, list that environment:
pac copilot list --environment '<environment>'
Match the Name column case-insensitively. If one row matches, use its Copilot ID; if several
match, present those rows and ask the user to choose the exact ID. If none match, show the
available rows and stop. The PAC list output does not expose schema names.
Never substitute a different agent from the one the user selected.
Require an output root folder. If the user did not provide one, ask where the clone should be written; do not default to an unrelated current directory.
Use --display-name only when the user explicitly asks for a different local folder name. Explain
that this changes only the local folder. The output root itself may contain unrelated files because
PAC writes a child folder beneath it. If the output root is an existing file, stop.
Before execution, state:
The user's explicit request to clone is consent for these local writes. Do not ask for another confirmation unless resolving an ambiguous agent or destination changed the requested target.
Without a local name override:
pac copilot clone --bot '<agent-id-or-schema-name>' --environment '<environment>' --output-dir '<output-root>'
With an explicit local name override:
pac copilot clone --bot '<agent-id-or-schema-name>' --environment '<environment>' --output-dir '<output-root>' --display-name '<local-folder-name>'
Run one clone attempt at a time and wait for it to finish. Retry only under the error rules below.
Use the paths PAC reports as cloned. Confirm that:
settings.mcs.yml or agent.mcs.yml;.mcs/conn.json.Do not read, print, or modify the contents of .mcs/conn.json. If PAC reports success but the
workspace markers are absent, report verification failure rather than claiming the clone succeeded.
Report the source agent, environment, and verified local workspace path. State that the clone is sync-connected, linked component collections were not cloned, and no cloud content was changed.
PAC writes human-readable output. Preserve the full error and apply these rules:
| Failure | Action |
|---|---|
| Authentication profile missing or expired | Tell the user sign-in is required. With consent, run pac auth create, let sign-in finish, then retry the same clone once. |
| Environment cannot be resolved | Ask for an environment ID or Dataverse URL that the signed-in account can access. |
| Agent not found | Run pac copilot list --environment '<environment>', then ask the user to select the correct Copilot ID. |
| Destination already exists and is not empty | Ask for another output root or local folder name. Never delete, move, or overwrite existing content. |
| Invalid local folder name | Ask for a name containing letters or numbers; PAC may percent-encode unsupported ASCII punctuation. |
| Service or network failure | Surface the error. Retry only after the user asks or the reported transient cause is resolved. |
Never fall back to pac copilot pull: pull updates an existing sync-connected workspace and is not
an initial clone.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub microsoft/copilot-studio-plugin --plugin mcs-assistant8 skills in this plugin
/add-knowledgeAdd a knowledge source (public website, SharePoint, OneDrive, or a locally uploaded file) to a locally-cloned Copilot Studio agentic-loop agent by writing the modern capabilities/knowledge YAML. Use when the user asks to add, attach, or ground a knowledge source (a public website, SharePoint or OneDrive link, or an uploaded file) on a locally-cloned Copilot Studio agent./add-skillAdd an Agent Skill to a Copilot Studio agent - uploaded from your drive (a SKILL.md or .zip) or picked from the Power CAT "Cat Agent Skills" gallery - then optionally import it into a cloned agent workspace under behaviors/. Use when the user asks to add, import, upload, or install an Agent Skill (from a local SKILL.md/.zip or the Cat Agent Skills gallery) into a Copilot Studio agent./create-agentCreate a new MCS2 Copilot Studio agent and PAC-connected local workspace with `pac copilot init`, then optionally add modern instructions, skills, tools, knowledge, and settings before synchronizing it. Use when the user asks to create, scaffold, initialize, or build a Copilot Studio agent./delete-agentPermanently delete an existing Copilot Studio agent from the cloud with `pac copilot delete` after an exact typed confirmation. Use when the user asks to delete, remove, or destroy a Copilot Studio agent./publish-agentPublish an existing Copilot Studio agent with `pac copilot publish`, making its current cloud draft live. Use when the user asks to publish, activate, or make a Copilot Studio agent live./pull-agentPull remote Copilot Studio agent changes into an existing PAC CLI workspace with `pac copilot pull`. Use when the user asks to pull, sync down, refresh, or download remote changes into a local agent workspace.Other plugins' skills for the same job