A self-contained agent + skill for VS Code with GitHub Copilot (agent mode) that migrates a classic Microsoft Copilot Studio agent to the modern, new-experience orchestration model — producing real Skills, Tools, WorkflowTools, Knowledge, and Connected agents.
It runs the official microsoft/copilot-studio-plugin inside the GitHub Copilot CLI and applies the two fixes the plugin's sandbox can't make on its own (WorkflowTool schema + connection-reference collisions).
CopilotMigrationSkill/
└── .github/
├── agents/
│ └── copilot-studio-migrator.agent.md # custom agent (agent picker)
└── skills/
└── copilot-studio-migration/
├── SKILL.md # the /copilot-studio-migration skill
├── scripts/fix-workflowtools.js # dependency-free WorkflowTool repair
└── references/
├── modern-schema.md # exact cli-copilot YAML schemas
└── troubleshooting.md # known errors + fixes
Quick clone
git clone https://github.com/1999Swarup/copilot-studio-migration-skill.gitA. Use it in your own project (recommended)
Copy the .github/agents and .github/skills folders from this repo into your project's .github/
folder. VS Code auto-discovers agents and skills there.
B. Make it personal (available in every workspace)
Copy the skill folder to ~/.copilot/skills/copilot-studio-migration/ and the agent to your
VS Code profile agents/ folder.
C. Just open this folder
Open CopilotMigrationSkill as a workspace in VS Code — the .github/ customizations are picked up.
- Power Platform CLI
pac≥ 2.9.3 —pac install latest - GitHub Copilot CLI —
npm install -g @github/copilot(Node 22+) - git
- A GitHub account with a Copilot licence, and access to your Power Platform environment
In VS Code Copilot Chat (Agent mode):
-
Pick the “Copilot Studio Migrator” agent from the agent picker, or type
/copilot-studio-migrationto invoke the skill, then paste your classic agent URL:/copilot-studio-migration Migrate this agent to the modern experience: https://copilotstudio.microsoft.com/environments/<ENV_ID>/bots/<BOT_ID>/overview from tenant <TENANT_ID>
The agent will: verify prerequisites → connect GitHub + Power Platform (device codes) →
install the migration plugin → run /mcs-assistant:migrate → read the real error and repair
if the push fails → pull → push → publish → verify.
The migration plugin's AI runs in a restricted sandbox and often can't read the diagnostic log or its own converter script, so it may push invalid YAML. Running inside VS Code Copilot (full terminal access) lets the agent:
- read
pac-log.txtto get the exact Dataverse error, and - rewrite
WorkflowToolYAML to the correct schema (workflowId,toolInputs,toolOutputs) and drop connection references that already exist in the environment.
See SKILL.md, modern-schema.md, and troubleshooting.md.
Experimental — always review generated YAML before publishing. Not an official Microsoft product.