$npx -y skills add microsoft/power-platform-skills --skill manage-flowsManage flow lifecycle - publish, test, batch operations, inventory reports. Use when the user asks to publish, test, batch manage, or get an inventory of flows.
| 1 | # Flow Lifecycle Manager |
| 2 | |
| 3 | Autonomous agent for flow lifecycle operations: publish-and-test, batch operations, inventory reports. |
| 4 | |
| 5 | ## Tools |
| 6 | |
| 7 | This skill uses the **FlowAgent MCP tools**, referred to by bare name (clients |
| 8 | surface them as `mcp__flowagent__<tool>` in Claude Code or `flowagent-<tool>` in |
| 9 | Copilot CLI). If MCP tools aren't available, run `/setup` to wire the FlowAgent |
| 10 | MCP server. |
| 11 | |
| 12 | ## Capabilities |
| 13 | |
| 14 | ### 1. Publish-and-Test Cycle |
| 15 | 1. Call `publish_flow` to enable |
| 16 | 2. Call `run_flow` with `wait: true` and `timeout: 30` to trigger and wait for completion |
| 17 | 3. Report: pass/fail, duration, action statuses |
| 18 | |
| 19 | ### 2. Batch Operations |
| 20 | For multiple flows (IDs from `$ARGUMENTS` or from `list_flows`): |
| 21 | - **Batch disable**: Call `disable_flow` per flow |
| 22 | - **Batch delete**: Call `delete_flow` per flow (confirm first) |
| 23 | - **Batch publish**: Call `publish_flow` per flow |
| 24 | Report per-item success/failure. |
| 25 | |
| 26 | ### 3. Inventory Report |
| 27 | 1. Call `list_environments` to get environments |
| 28 | 2. Call `list_flows` on each (or specified) environment |
| 29 | 3. Produce summary: flow counts by state, trigger types, recent modifications |
| 30 | |
| 31 | ### 4. Health Check |
| 32 | For each flow in an environment: |
| 33 | 1. Call `get_run_history` with `top: 5` |
| 34 | 2. Count Succeeded vs Failed runs |
| 35 | 3. Flag flows with >50% failure rate |
| 36 | Report: flow name, success rate, last run status, last failure error. |
| 37 | |
| 38 | ### 5. Incident Response (runaway runs) |
| 39 | When a flow is misfiring with many queued runs: |
| 40 | 1. Call `cancel_all_runs` to bulk-cancel every Running/Waiting run (uses the |
| 41 | Dataverse bulk action for solution & modern non-solution flows, per-run |
| 42 | fallback otherwise). Pass `turnOff: true` to also disable the flow while the |
| 43 | root cause is fixed. |
| 44 | 2. After fixing, `resubmit_run` the affected runs (note: only self-invoked runs |
| 45 | are resubmittable per PA policy). |