agentleFS
OwnOpticOwnOptic/power-automate-mcp/.claude/skills/build-flow/SKILL.md

build-flow

Skill0 starsChanged 13 days agoMITView on GitHub

Create or modify a Power Automate flow headlessly with the power-platform MCP tools. Use when asked to create a flow, add or change an action, bind a connector, or start a flow that will not start. Encodes the definition rules and the create-bind-start sequence that make headless authoring work.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. microsoft/power-platform-skills★ 1.2ksame name
    2. crewAIInc/skills★ 45same name
    3. nitrosend/claude★ 3same name
    4. ian-lawrence423/Claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never guess them - a guessed operationId saves fine and fails at runtime.

    line 22
  2. Distinctive:

    If the Learn server is not connected, say so rather than guessing.

    line 32
  3. Very specific:

    Keep previous_definition from the result until the change is verified.

    line 60
  4. Very specific:

    If a flow will not start after a change, set_flow_state reports ok: false rather than pretending: an unbound connector is the usual cause, …

    line 76

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build or modify a Power Automate flow

Definition rules (violating any of these produces a misleading failure)

  1. Always declare the magic parameters at top level next to triggers and actions:
    "parameters": {
      "$connections":    {"defaultValue": {}, "type": "Object"},
      "$authentication": {"defaultValue": {}, "type": "SecureObject"}
    }
    Without them, connector flows 400 with an error blaming the trigger, which sends you hunting in the wrong place. Harmless on connector-free flows, so always include them.
  2. Look up connector operationIds and parameter keys on Microsoft Learn. Never guess them - a guessed operationId saves fine and fails at runtime. Use the Microsoft Learn MCP server (microsoft_docs_search, microsoft_docs_fetch):
    • Fetch https://learn.microsoft.com/connectors/<connector>/ once you know the connector (shared_teams -> teams). Searching the bare operationId tends to land on SDK pages instead.
    • Connector pages are large (Teams is ~157k characters). Search first; fetch only when the excerpt is not enough.
    • Skip anything marked [DEPRECATED] and use the replacement it names.
    • A parameter typed dynamic (e.g. Teams body) stops at the top-level key. Take the nested shape from get_flow on a working flow - rule 4. If the Learn server is not connected, say so rather than guessing.
  3. Never inline a secret in a definition. It is stored in plaintext on the flow artifact. Use a Power Platform environment variable or a Key Vault reference.
  4. Start from a working example. get_flow on an existing similar flow and adapt its definition rather than writing one from scratch.

Create

  • Connector-free (Recurrence, Request, Compose, HTTP actions): create_flow(display_name, definition) - it starts immediately.
  • Connector flow: create_flow(..., start=False), then bind_connection(flow_id, connector). Creating never binds connections; a 201 still leaves the flow unstartable ("CannotStartUnpublishedSolutionFlow"). bind_connection resolves the connectionName, PATCHes definition + reference, and starts the flow in one call.
    • status: "ambiguous" - re-call with one of the listed connection_names.
    • status: "not_found" - the connection must first be created and authenticated in the maker portal. No API reachable here can do that.

Modify

  • get_flow -> edit the returned definition -> update_flow_definition with the COMPLETE definition. There is no patch semantics; partial definitions delete what they omit.
  • Connector flows: leave connection_references out. The tool reads the flow's live bindings and carries them over; get_flow shows {} for them, so there is nothing to copy. Pass it only to change a binding.
  • Keep previous_definition from the result until the change is verified. There is no undo endpoint; that is the undo.
  • Solution flows cannot be updated through this API (their connections are Dataverse connection references). With extras.py connected, use get_solution_flow_clientdata -> edit -> update_solution_flow_definition; without it, edit them in the portal. list_solutions says whether a flow's solution is managed - managed means read-only here, change the source instead. Flows built in the portal under My flows are NOT solution flows and update fine.

Verify (close the loop after every change)

run_flow -> list_runs -> explain_run if it failed. Remember run_flow sends no body, so @triggerBody() is null; flows that depend on their payload need their real HTTP trigger URL called instead (get_trigger_url in extras.py), or, to retest on data that already failed, resubmit_run.

If a flow will not start after a change, set_flow_state reports ok: false rather than pretending: an unbound connector is the usual cause, and bind_connection is the fix.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.