From power-automate
This skill should be used when the user asks to "deploy a flow", "publish a flow", "push a flow", "upload a flow", "deploy flow JSON", "deploy to Power Automate", "publish cloud flow", "push flow to environment", or wants to deploy an existing Power Automate cloud flow JSON file to a Dataverse environment.
How this skill is triggered — by the user, by Claude, or both
Slash command
/power-automate:deploy-flowsonnetThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Plugin check**: Run `node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"` — if it outputs a message, show it to the user before proceeding.
Plugin check: Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Deploy an existing Power Automate cloud flow JSON definition to a Dataverse environment using the Flow API. Optionally adds the flow to a Dataverse solution for ALM purposes.
Initial request: $ARGUMENTS
Goal: Ensure PAC CLI is installed and available
Actions:
Create todo list with all 6 phases (see Progress Tracking table).
Run pac help to check PAC CLI availability:
pac help
If PAC CLI is not installed: Tell the user to install it:
dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Also verify Azure CLI is available (needed for Flow API auth):
az version
If not installed, direct the user to install it.
Output: PAC CLI and Azure CLI verified
Goal: Ensure the user is authenticated with both PAC CLI and Azure CLI
Actions:
Run pac org who to check PAC CLI auth:
pac org who
Extract: Environment Name, Org URL, Environment ID, User Email.
If not authenticated: Guide through pac auth create --environment "<URL>".
Run az account show to verify Azure CLI auth:
az account show --query "{name:name, user:user.name}" -o table
If not authenticated: Run az login.
Output: Both PAC CLI and Azure CLI authenticated
Goal: Confirm the target environment and locate the flow JSON file
Actions:
Present the current environment and ask for confirmation via AskUserQuestion:
| Question | Options |
|---|---|
| You are connected to <ENV_NAME> (<ENV_URL>). Deploy to this environment? | Yes, use this environment; No, let me choose a different one |
If "No": Run pac org list, let user select, then switch.
Locate the flow JSON file:
If provided via $ARGUMENTS, use that path
Otherwise, search for flow JSON files:
find . -name "*.json" -path "*/flows/*" -o -name "flow-definition.json" 2>/dev/null
If multiple found, ask the user which to deploy via AskUserQuestion
If none found, ask the user to provide the path
Read and display the flow file's displayName for confirmation.
Output: Target environment confirmed and flow file located
Goal: Validate the flow JSON before deployment
Actions:
Run the validation script:
node "${CLAUDE_PLUGIN_ROOT}/scripts/validate-flow.js" --file "<path-to-flow.json>"
Parse the JSON output:
If valid: true: Present validation summary and proceed
If valid: false: Present errors to the user. Offer to fix them or abort:
| Question | Options |
|---|---|
| The flow has validation errors. Would you like me to fix them? | Yes, fix the errors; No, abort deployment |
If "Yes": Fix the errors in the JSON file and re-validate
If "No": Stop
Output: Flow JSON validated successfully
Goal: Deploy the flow to the target environment via the Flow API
Actions:
Run the deployment script:
node "${CLAUDE_PLUGIN_ROOT}/scripts/deploy-flow.js" --file "<path>" --environment-id "<env-id>"
Parse the JSON output:
If success: true:
If success: false:
InvalidRequestContent with description → Remove the description field from propertiesUnauthorized / 403 → Re-authenticate: az loginConnectionNotConfigured → The user needs to set up connection references in the Power Automate portalSolution packaging — Ask via AskUserQuestion:
| Question | Options |
|---|---|
| Would you like to add this flow to a Dataverse solution for ALM? | Yes, add to a solution; No, skip |
If "Yes":
Ask for the solution unique name (or list existing: pac solution list)
Re-run deployment with --solution-name:
node "${CLAUDE_PLUGIN_ROOT}/scripts/deploy-flow.js" --file "<path>" --environment-id "<env-id>" --solution-name "<name>"
Or add manually by running the export script:
node "${CLAUDE_PLUGIN_ROOT}/scripts/export-flow.js" --solution-name "<name>" --output "./solutions"
Output: Flow deployed to environment
Goal: Verify the deployment and present a summary
Actions:
Verify the flow exists in the environment:
node "${CLAUDE_PLUGIN_ROOT}/scripts/list-flows.js" --filter "<flow-display-name>"
Present the deployment summary:
Deployment Summary
Property Value Flow Name [displayName] Flow ID [flowId] State Started Environment [envName] ([envUrl]) Solution [solutionName or "Not in a solution"] Source File [file path]
Remind the user about connection references:
Important: If this is the first time deploying a flow with this connector to this environment, you may need to configure the connection reference in the Power Automate portal. Go to Power Automate > My flows > [flow name] > Edit and set up any missing connections.
Suggest next steps:
/create-flow — Create another flow/list-flows — View all flows in the environmentpac solution export --name <solution> --path <output.zip>Output: Deployment verified and summary presented
Before starting Phase 1, create a task list with all phases using TaskCreate:
| Task subject | activeForm | Description |
|---|---|---|
| Verify PAC CLI | Verifying PAC CLI | Check PAC CLI and Azure CLI installation |
| Verify authentication | Verifying authentication | Check auth status for PAC CLI and Azure CLI |
| Confirm environment and locate flow | Confirming environment | Confirm target environment and find flow JSON file |
| Validate the flow | Validating flow | Run validation script on the flow JSON |
| Deploy the flow | Deploying flow | Deploy via Flow API, optionally add to solution |
| Verify and summarize | Verifying deployment | Confirm deployment and present summary |
Mark each task in_progress when starting it and completed when done via TaskUpdate.
Begin with Phase 1: Verify PAC CLI
npx claudepluginhub jsl1995/power-automate-skill --plugin power-automateGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.