/mcs-assistant:publish-agent Agent ID, schema name, or Copilot Studio URL, plus the environmentfrom mcs-assistant
Publishes a Copilot Studio agent's cloud draft live using `pac copilot publish`. Requires explicit agent and environment IDs, validates inputs, and handles URL parsing.
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.
Publish one existing Copilot Studio agent's current cloud draft by running pac copilot publish.
Publishing makes the draft live for users who can access the agent. This workflow does not upload
local files, pull, push, clone, rename, or delete an agent.
Initial request: $ARGUMENTS
--bot accepts a Copilot Studio agent ID or schema name.--environment accepts an environment ID or Dataverse URL. PAC can fall back to the active
profile, but this skill requires an explicit environment to prevent publishing the wrong target.Treat every ID, URL, and name 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 publish --help
If pac is not found, tell the user that Power Platform CLI is required and stop. If pac exists
but the copilot publish verb is unavailable, tell the user to update PAC CLI and stop. Some PAC
builds print a missing --bot error while still showing valid publish usage. When the output
includes pac copilot publish, --bot, and --environment, treat the verb as available.
Resolve inputs in this order:
If the request contains a supported Copilot Studio URL, extract its 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. Never rely on the active PAC profile's default for a publish.
If the user supplied only an agent display name, list the selected environment:
pac copilot list --environment '<environment>'
Match the Name column case-insensitively. If one row matches, present its Copilot ID and ask
the user to confirm it. If several match, 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 or environment from the target the user selected.
Publishing does not send local files. If the request is to publish local edits, require the caller to provide draft-readiness evidence from the current workflow:
The evidence must name the same agent identifier and environment resolved in step 2. Compare IDs case-insensitively and normalize environment URLs before comparing them. A generic statement that "push succeeded," a push from an earlier workflow, or a push for another workspace is insufficient. If the evidence is missing or does not match the resolved publish target, stop and require a new pull and push for that exact target. Do not silently publish an older cloud draft.
If the user explicitly wants to publish the already-current cloud draft, no local workspace is required.
Before execution, state the exact agent and environment and tell the user:
This will publish the agent and make its current cloud draft live for all users it is shared with. Should I proceed?
Publishing always requires an explicit confirmation at this point, even when the original request used the word "publish". Do not combine this confirmation with target discovery.
After confirmation:
pac copilot publish --bot '<agent-id-or-schema-name>' --environment '<environment>'
Wait for PAC to finish. Do not treat progress dots or a queued state as success, do not sleep, and do not run another status command as a substitute for command completion.
Treat the publish as successful only when PAC exits successfully and reports a successful publish status. Report the exact agent and environment and state that its cloud draft is now live.
If PAC reports Fail, Unknown, a timeout, or a nonzero exit, report failure without claiming the
agent is live.
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 repeat target confirmation before retrying once. |
| Environment cannot be resolved | Ask for an environment ID or Dataverse URL accessible to the signed-in account. |
| Agent not found or ambiguous | Run pac copilot list --environment '<environment>' and ask the user to choose the exact Copilot ID. |
Publish returns Fail or Unknown | Surface the status and full error. Do not claim success or retry automatically. |
| Publish polling exceeds PAC's timeout | Report that completion is unknown. Do not start another publish unless the user explicitly asks after checking the portal. |
| Service, permission, or network failure | Surface the full error. Retry only after the cause is resolved and the user asks. |
Never run pac copilot push from this skill. Publishing and uploading local content are separate
operations.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 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./clone-agentClone an existing Copilot Studio agent into a new local PAC CLI workspace with `pac copilot clone`. Use when the user asks to clone, check out, download, or bring a Copilot Studio agent into a local folder./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./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.npx claudepluginhub microsoft/copilot-studio-plugin --plugin mcs-assistantOther plugins' skills for the same job