/power-automate:setupfrom power-automate
Set up Power Automate CLI prerequisites. Use when the user is new, something isn't working, or they need help getting started.
Ships in power-automate. 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.
You are helping a non-technical user get the Power Automate plugin working for the first time. Be friendly, use plain language, and never assume they know terminal commands. Walk them through each step one at a time.
Run silently:
node --version 2>&1
v18.x.x or higher): Tell them "Node.js is installed" and move on.brew install node" (or direct them to nodejs.org)node --version.Run silently:
az --version 2>&1
winget install Microsoft.AzureCLI" or direct them to https://aka.ms/installazurecliwindowsbrew install azure-cli"az --version.Check if they're already logged in:
az account show --output json 2>&1
user.name field) and ask if that's the right account.az login
This will open their browser. Tell them: "A browser window should open. Sign in with your work account — the one you use for Power Automate."
After login completes, confirm it worked by running az account show again.Verify token access — this catches permission issues early.
First find out which Azure cloud they're on, because the Power Automate resource URL differs per cloud and the commercial one cannot be assumed (GCC High / DoD tenants will fail against it):
az cloud show --query name -o tsv
az cloud show | Power Automate resource |
|---|---|
AzureCloud (commercial) | https://service.flow.microsoft.com |
AzureCloud + GCC tenant | https://gov.service.flow.microsoft.us |
AzureUSGovernment (GCC High) | https://high.service.flow.microsoft.us |
AzureUSGovernment (DoD) | https://dod.service.flow.microsoft.us |
az cloud show cannot distinguish commercial from GCC, or GCC High from DoD —
for those, set PA_CLOUD=gcc / PA_CLOUD=dod explicitly.
Then request a token for the matching resource, e.g. for commercial:
az account get-access-token --resource https://service.flow.microsoft.com --output json 2>&1
FlowAgent itself auto-detects the cloud the same way; you can override the
detection with PA_CLOUD=commercial|gcc|gcchigh|dod.
PA_CLIENT_ID=<app-id>. Flow management (list/create/run) works without it.The plugin talks to Power Automate through the FlowAgent MCP server, which is
registered as flowagent in the plugin's .mcp.json and started automatically.
.mcp.json loads the bundled server/mcp.mjs through a small Node bootstrap
that resolves the plugin's installation directory (PLUGIN_ROOT, else
CLAUDE_PLUGIN_ROOT, else the current directory) and prints an actionable error
if the bundle can't be found.
If flowagent-* / mcp__flowagent__* tools appear in your tool list: tell
them "The Power Automate tools are connected" and move on.
If they're missing: the MCP server isn't registered. Fix it automatically:
Locate the installed plugin's MCP bundle. This only matches a bundle
inside a power-automate plugin directory, so it can't pick up another
plugin's MCP server:
node -e "const fs=require('fs'),p=require('path'),d=p.join(process.env.HOME||process.env.USERPROFILE,'.copilot','installed-plugins');const find=(dir)=>{let out=[];for(const e of fs.readdirSync(dir,{withFileTypes:true})){const f=p.join(dir,e.name);if(e.isDirectory()){try{out=out.concat(find(f))}catch{}}else if(e.name==='mcp.mjs'&&p.basename(p.dirname(dir))==='power-automate'){out.push(dir)}}return out};try{const hits=find(d);if(hits.length===1)console.log(JSON.stringify({found:true,serverDir:hits[0],mcpMjs:p.join(hits[0],'mcp.mjs')}));else if(hits.length>1)console.log(JSON.stringify({found:false,reason:'multiple power-automate bundles',candidates:hits}));else console.log(JSON.stringify({found:false}))}catch(e){console.log(JSON.stringify({found:false,error:e.message}))}"
If it reports multiple power-automate bundles, show the candidates and ask
the user which one to register rather than guessing.
If exactly one was found, read ~/.copilot/mcp-config.json, add the
flowagent MCP entry, and write it back:
node -e "const fs=require('fs'),p=require('path');const home=process.env.HOME||process.env.USERPROFILE;const cfgPath=p.join(home,'.copilot','mcp-config.json');let cfg;try{cfg=JSON.parse(fs.readFileSync(cfgPath,'utf8'))}catch{cfg={mcpServers:{}}};if(!cfg.mcpServers)cfg.mcpServers={};if(cfg.mcpServers.flowagent){console.log('already registered');process.exit(0)}const d=p.join(home,'.copilot','installed-plugins');const find=(dir)=>{let out=[];for(const e of fs.readdirSync(dir,{withFileTypes:true})){const f=p.join(dir,e.name);if(e.isDirectory()){try{out=out.concat(find(f))}catch{}}else if(e.name==='mcp.mjs'&&p.basename(p.dirname(dir))==='power-automate'){out.push(dir)}}return out};const hits=find(d);if(hits.length!==1){console.log(hits.length?'ambiguous: '+JSON.stringify(hits):'mcp.mjs not found');process.exit(1)}const mcpPath=p.join(hits[0],'mcp.mjs');cfg.mcpServers.flowagent={command:'node',args:[mcpPath]};fs.writeFileSync(cfgPath,JSON.stringify(cfg,null,2)+'\n');console.log('registered flowagent MCP at '+mcpPath)"
Tell the user to restart the agent (Copilot CLI: /restart, Claude Code:
restart the process). After restart, flowagent-* tools should appear.
If not found (plugin not installed at all): tell them to install the plugin first:
/plugin marketplace add microsoft/power-platform-skills
Then select power-automate and run /setup again.
Verify everything works end-to-end by listing the user's environments:
Preferred: call the list_environments tool.
If MCP tools aren't available: run node <path-to-plugin>/server/mcp.mjs
to confirm the bundled MCP server starts cleanly, then fix the plugin install
or .mcp.json wiring before retrying.
If it returns environments: Success! Tell them:
set_current_env tool, or ask "set my default
environment to ")./browse-flows — Browse your flows/create-flow — Create a new flow/debug-flow — Fix a broken flowIf it fails: Check the error. Common issues:
What SKILL.md sets; muted values are Claude Code's defaults
opusOther plugins' skills for the same job
10 skills in this plugin
/browse-flowsBrowse Power Automate environments and flows interactively. Use when the user wants to browse, list, or explore their flows and environments./build-flowAutonomously build a complete Power Automate flow from a description. Use when you need to generate a full flow definition and create it./create-flowGuided flow creation wizard. Use when the user wants to create a new flow interactively./debug-flowDebug a failed Power Automate flow run. Use when a flow failed, has errors, or the user wants to troubleshoot a run./diagnose-flowDeep autonomous diagnosis of a failed flow run. Provide environment, flow, and run IDs. Use when the user asks to diagnose or deeply investigate a specific failed flow run./manage-desktop-flowsManage and run Power Automate Desktop (RPA) flows and machine groups. Use when the user asks about desktop flows, RPA, or machine groups.2 plugins ship this exact skill · first indexed Aug 29, 2026
npx claudepluginhub scsant/pateste --plugin power-automate