Sf flow

From Jaganpro/sf-skills · View interactive version

Sf flow is an AI agent skill from the GitHub repository Jaganpro/sf-skills. Creates and validates Salesforce Flows with 110-point scoring. TRIGGER when: user builds or edits record-triggered, screen, autolaunched, or scheduled flows, or touches .flow-meta.xml files. DO NOT TRIGGER when: Apex automation (use sf-apex), process builder migration questions only, or non-Flow dec

How to use this skill

Skill file

sf-flow: Salesforce Flow Creation and Validation

Use this skill when the user needs Flow design or Flow XML work: record-triggered, screen, autolaunched, scheduled, or platform-event Flows, including validation, architecture choices, and safe deployment sequencing.

When This Skill Owns the Task

Use sf-flow when the work involves:

Delegate elsewhere when the user is:


Required Context to Gather First

Ask for or infer:


Recommended Workflow

1. Choose the right automation tool

Before building, confirm Flow is the right answer rather than:

2. Choose the right Flow type

| Need | Default flow type |

|---|---|

| same-record update before save | before-save record-triggered |

| related-record work / emails / callouts | after-save record-triggered |

| guided UI | screen flow |

| reusable background logic | autolaunched / subflow |

| scheduled processing | scheduled flow |

| event-driven declarative response | platform-event flow |

| AI-evaluated routing (sentiment, intent, tone) | autolaunched with AI Decision element |

3. Start from a template

Prefer the provided assets:

4. Validate against Flow guardrails

Focus on:

5. Hand off deployment and testing

Use:


High-Signal Rules

Flow architecture

Bulk safety

Error handling


Output Format

When finishing, report in this order:

  1. Flow type and goal
  2. Files created or updated
  3. Architecture choices
  4. Bulk/error-handling notes
  5. Deploy/testing next steps

Suggested shape:

Flow: <name>
Type: <flow type>
Files: <paths>
Design: <trigger choice, subflows, key decisions>
Risks: <bulk safety, fault paths, dependencies>
Next step: <dry-run deploy, activate, or test>

Flow Testing (CLI)

Run Flow tests from the command line without VS Code:

# Run all flow tests
sf flow run test --target-org <alias> --json

# Run tests for a specific flow
sf flow run test --class-names MyFlow --target-org <alias> --json

# Get results for an asynchronous run
sf flow get test --test-run-id <id> --target-org <alias> --json

Flow tests execute in the org and can take 1-5 minutes. sf flow run test returns a test run ID for asynchronous runs; use sf flow get test to retrieve results later. Always run with --json and use background execution for longer runs.


Cross-Skill Integration

| Need | Delegate to | Reason |

|---|---|---|

| create objects / fields first | sf-metadata | schema readiness |

| deploy / activate flow | sf-deploy | safe deployment sequence |

| create realistic bulk test data | sf-data | post-deploy verification |

| create Apex actions / invocables | sf-apex | imperative logic |

| embed LWC in a screen flow | sf-lwc | custom UI components |

| expose Flow to Agentforce | sf-ai-agentscript | agent action orchestration |


Reference Map

Start here

Design / orchestration

AI Decision

Screen / integration / troubleshooting


Score Guide

| Score | Meaning |

|---|---|

| 88+ | production-ready Flow |

| 75–87 | good Flow with some review items |

| 60–74 | functional but needs stronger guardrails |

| < 60 | unsafe / incomplete for deployment |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.