Flow Explainer

Flow and automation v1.0.0 Updated License: MIT

Quick answer

This skill teaches an AI assistant to read a Salesforce Flow, from a flow-meta.xml file or one retrieved with the sf CLI, and explain it in plain language. It reports the trigger, the step-by-step path, the objects and fields it reads and writes, fault handling and risks. It never edits or activates a flow.

What this skill does

  • Retrieves a flow with sf project retrieve start --metadata Flow:<ApiName>, or reads a flow-meta.xml you provide or your project already holds.
  • Classifies the trigger and entry conditions: record-triggered before or after save, scheduled, platform event, or an invoked flow.
  • Walks the elements in execution order, including decisions, assignments, record operations, loops, subflows, Apex and other actions, and screens.
  • Lists every object and field the flow reads, creates, updates or deletes.
  • Flags risks it can see in the XML: data elements inside loops, missing fault paths, hard-coded IDs, no entry filter and run context.

When to use it

  • You inherited an org and need to know what a Flow actually does before changing it.
  • A record is changing unexpectedly and you want to know whether a Flow could be the cause.
  • You want a risk review of a record-triggered Flow before it goes to production.
  • You need a plain-language description of a Flow for documentation or a hand-off.

What you need

  • Connection: A flow-meta.xml file, or the Salesforce CLI logged in to an org inside an SFDX project so the flow can be retrieved. A Salesforce MCP server can help describe objects and fields. Without a connection, paste the XML.
  • Permissions: Permission to retrieve metadata from the org (the Customize Application or View Setup access your admin grants for metadata retrieval). A sandbox is recommended. The skill only reads.

How it works

  1. It identifies the flow by API name and gets the XML from your project, your paste, or an sf project retrieve start call.
  2. It reads the header and start element to determine the flow type, status, trigger and entry conditions.
  3. It follows every connector and fault connector from the start element and numbers the steps in execution order.
  4. It collects the objects, fields and filters used by Get, Create, Update and Delete Records elements.
  5. It checks fault handling and applies a risk checklist to the elements it found.
  6. It returns a summary, a numbered walkthrough, a risks list and a list of unknowns.

Safety rules built into the skill

  • Read-only: it never edits the flow file and never runs deploy, activate, deactivate or delete commands.
  • It explains only what the XML shows and marks called Apex and subflows as unread unless it read them.
  • It does not present order-of-execution interactions as fact; it lists them as items to check.
  • It reports that hard-coded IDs or sensitive values exist without pasting personal data.
  • It states what it could not verify instead of guessing.

Try asking

  • Retrieve the flow Opportunity_After_Save_Update and explain what it does.
  • Explain force-app/main/default/flows/Case_Escalation.flow-meta.xml and list the risks.
  • Does any record-triggered flow in my project update Account.Rating? Explain the ones that do.
  • Walk me through this flow XML step by step: (paste XML).

How to install a skill

A skill is a folder with a SKILL.md file: YAML frontmatter with a name and a description, then plain Markdown instructions. An assistant reads the description to decide when the skill applies and loads the rest only then. The format is the open Agent Skills specification.

  • Claude Code: unzip the download so the folder lands in ~/.claude/skills/flow-explainer/ for all projects, or .claude/skills/flow-explainer/ inside one project. Start a new session.
  • Claude app (web and desktop): upload the zip in the Skills section of your settings. Availability depends on your plan, and the menu names change, so check Anthropic's current help pages.
  • Other assistants that support Agent Skills: copy the folder into the skills directory that assistant documents.
  • Any other LLM: open SKILL.md and paste its contents into the system prompt, custom instructions or project instructions. You lose automatic loading, but the guidance works the same.

Skills that work with your org need a connection: a Salesforce MCP server added to your assistant, or the Salesforce CLI logged in to an org. Start with a sandbox or scratch org, and give the connection the least access that does the job.

The skill file (SKILL.md)

This is the exact file in the download. Read it before you install it.

---
name: flow-explainer
description: Explains a Salesforce Flow in plain language by reading its metadata (retrieved with the sf CLI or supplied as flow-meta.xml). Covers trigger, entry conditions, element-by-element path, data read and written, fault handling and risks. Use when asked what a Flow does, why it fires, or whether it is safe. Read-only.
license: MIT
metadata:
  version: "1.0.0"
  publisher: SFDX Talk (sfdxtalk.com)
---

# Flow Explainer

Read a Salesforce Flow definition and explain what it does, what it touches and where it could go wrong. This skill never edits, deploys, activates or deactivates a Flow.

## Connection

Use the first source that works:

1. A Flow file already available: the user pastes the XML, gives a path, or the local SFDX project holds it at `force-app/main/default/flows/<ApiName>.flow-meta.xml`. Read it directly.
2. The Salesforce CLI, run inside an SFDX project and logged in to an org: `sf project retrieve start --metadata Flow:<ApiName> --target-org <alias>`. The file lands in the project's `flows` folder. Run `sf project retrieve start --help` if the flags differ in the installed version. Retrieval only reads from the org and writes a local file.
3. A Salesforce MCP server that can run queries: use it only to look up the flow's API name and active version, and to describe objects and fields the flow touches. Describe tools by what they do; names vary by server.
4. No connection: ask the user to paste the XML, and say what you could not check.

If `Flow:<ApiName>` returns nothing, check the exact API name in the org (Setup, Flows) and the file name in the `flows` folder. A retrieve returns the version the org's metadata API provides; confirm the status (`<status>`) in the XML so you know whether you are reading the active version.

## Workflow

1. **Identify the flow.** Get the API name, or list the `flows` folder. Ask one short question if several flows match.
2. **Obtain the XML.** Read the local file, or retrieve it (see Connection). Never modify it. If a flow has many versions, say which one you read.
3. **Read the header.** Note `label`, `processType`, `status`, `apiVersion`, `runInMode` if present, and the `start` element. Use `references/flow-xml-elements.md` to map element names to plain terms.
4. **Classify the trigger.** From `start`: `triggerType` (before save, after save, scheduled, platform event), `object`, `recordTriggerType`, `filters` or `filterFormula`, and any `scheduledPaths`. No `triggerType` means a screen, autolaunched or other invoked flow: say what calls it if you can tell (a subflow reference, an Apex invocation, a button) and mark it unknown otherwise.
5. **Walk the path.** Starting at the `start` element's `connector`, follow every `connector` and `faultConnector` and each decision outcome. Number the steps in execution order, branch by branch. Say in one line what each element does, quoting the label.
6. **Record data access.** List every object and field read (`recordLookups`), created, updated or deleted (`recordCreates`, `recordUpdates`, `recordDeletes`), with the filters used. Note fields set by `assignments` on the triggering record in a before-save flow.
7. **Check fault handling.** For each element that can fail (data elements, Apex and other actions, subflows), say whether a `faultConnector` exists and where it goes.
8. **Check risks.** Apply `references/flow-xml-elements.md` section "Risk patterns". Report only risks you can see in the XML, each with the element label.
9. **Resolve names.** If the user wants field meaning or object context, describe the objects through the connection. Do not guess what a custom field means.
10. **List unknowns.** Anything not visible in the XML: other flows, triggers and validation rules on the same object, who runs the flow, volume, called Apex behavior.

## Rules

- Read-only. Never run a deploy, activate, deactivate or delete command, and never write to the flow file.
- Explain only what the XML shows. Do not invent behavior of Apex classes, subflows or invocable actions you have not read; name them and mark them unread.
- Do not state order-of-execution interactions as fact. Flag them as risks to check against other automation on the object.
- Quote element labels and API names exactly. Do not rename them.
- Treat record data and hard-coded values in the flow as sensitive. Report that a hard-coded ID exists; do not paste personal data.
- If the XML is truncated or invalid, say so and stop short of conclusions.

## Output format

1. **Summary**: 2 to 4 sentences: what the flow is, when it runs, what it changes.
2. **Trigger and entry conditions**: type, object, timing, filters, run mode.
3. **Walkthrough**: a numbered list in execution order, with branches shown as sub-items and the fault path noted.
4. **Reads and writes**: a short table of object, fields, operation, element label.
5. **Risks**: a list, each with element label and a one-line reason.
6. **Unknowns**: what you could not verify and how the user can check it.

Files in the download: flow-explainer/SKILL.md, flow-explainer/references/flow-xml-elements.md

Frequently asked questions

Can this skill change or activate a Flow?

No. The skill instructs the assistant to only read the flow. It retrieves metadata to a local file and never runs deploy, activate or delete commands. Use a sandbox and a read-only connection if you want a stronger guarantee, because instructions are not a security control.

How does it get the Flow?

It reads a flow-meta.xml you paste or that sits in your SFDX project, or it runs sf project retrieve start --metadata Flow:<ApiName> inside the project. If the retrieve returns nothing, it asks you to check the exact API name.

Does it explain Process Builder processes too?

It can read the XML of any flow-type metadata and describe the elements it recognizes, but the Process Builder to Flow Migration skill is built for planning a move to Flow and mapping criteria and actions.

Will it find every risk?

No. It reports risks visible in the XML, such as data elements in loops or missing fault paths. It cannot see other triggers, flows or validation rules on the same object, so it lists order-of-execution interactions as things for you to check.

Does it work with assistants other than Claude?

Yes. Assistants that support the Agent Skills format can load the folder. For any other LLM, paste the contents of SKILL.md into the system prompt and give it the flow XML.

Related prompts

Related tools

Related guides

Official sources

SFDX Talk is unofficial documentation. It is not affiliated with, endorsed by, or sponsored by Salesforce, Inc. Skills are provided as is, under the MIT license. Review what a skill does and test it in a sandbox before you rely on it. All skills