sf-flow

Creates and validates Salesforce Flow XML with 110-point scoring across six quality categories.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/amanpraaj/sf-skill-hub --skill sf-flow-amanpraaj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sf-flow
Source: https://github.com/amanpraaj/sf-skill-hub/tree/main/skills/salesforce/sf-flow
Command: npx skills add https://github.com/amanpraaj/sf-skill-hub --skill sf-flow-amanpraaj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Building Salesforce Flows by hand often leads to unbulkified logic, missing fault paths, and deployment failures. This Skill generates production-grade Flow XML for record-triggered, screen, autolaunched, scheduled, and platform-event flows, then validates the result against a 110-point scoring rubric covering bulkification, entry criteria, naming, fault handling, performance, and documentation. ## Core Features & Use Cases - Flow XML Generation: Produces complete .flow-meta.xml files from templates for before-save, after-save, screen, autolaunched, scheduled, platform-event, and AI Decision flows. - 110-Point Validation: Scores flows across six categories with an 88-point minimum for deployment readiness, checking for DML in loops, missing fault connectors, and unsafe entry conditions. - Architecture Guidance: Enforces before-save vs after-save selection, Transform vs Loop decisions, subflow orchestration, and Agentforce Action Definition registration. - Use Case: Ask for a before-save flow that auto-populates Account fields, and receive validated Flow XML with proper entry conditions, fault paths, and a deployment handoff plan. ## Quick Start Ask the agent to create a before-save record-triggered flow on Account that auto-populates fields, then review the generated Flow XML and its validation score.

Frequently Asked Questions about sf-flow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a record-triggered flow in Salesforce with XML?▼

Start from the before-save or after-save template, define the trigger object and entry conditions, then generate the .flow-meta.xml with alphabetically ordered elements and fault connectors. Use before-save for same-record field updates and after-save for related records, emails, or callouts.

When should I use Transform vs Loop in a Salesforce Flow?▼

Use Transform when the job is data mapping or reshaping collections, since it runs 30-50% faster than loops. Use a Loop only when you need per-record decision logic or branching that Transform cannot express.

What is the difference between before-save and after-save flows?▼

Before-save flows update fields on the triggering record without DML and run fastest. After-save flows handle related record updates, emails, and callouts but consume more resources because they run after the record commits.

Why does my Salesforce Flow fail on bulk record updates?▼

Failures usually come from DML statements or Get Records inside loops, which hit governor limits past 200 records. Move DML outside loops, use collection variables, and test with 251 or more records to cross the batch boundary.

Can a Flow be used as an Agentforce agent action?▼

Yes, but deploying the Flow alone is not enough. You must register it under Setup > Agentforce > Action Definitions, map input and output variables, and ensure variable API names match the Agent Script exactly.

How do I run Salesforce Flow tests from the command line?▼

Use sf flow run test --target-org <alias> --json to execute all flow tests, or pass --class-names for a specific flow. Retrieve asynchronous results with sf flow get test --test-run-id <id>.