Help us improve
Share bugs, ideas, or general feedback.
From vanguard-frontier-agentic
Diagnoses Salesforce Flow failures from pasted error messages or live Flow Interview logs via sf CLI. Identifies failing node, root cause, and fix recommendations including fault path design and null handling.
npx claudepluginhub raishin/vanguard-frontier-agentic --plugin vanguard-frontier-agenticHow this skill is triggered — by the user, by Claude, or both
Slash command
/vanguard-frontier-agentic:salesforce-flow-debugger-skillThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Hybrid T0/T1 skill that diagnoses Salesforce Flow failures. Works in two modes:
Reviews Salesforce Flow automation definitions for correctness, safety, and maintainability. Flags recursion, bypass flags, null handling, and missing fault paths.
Debugs failing Power Automate cloud flows via FlowStudio MCP server to access action-level inputs/outputs, uncovering root causes like timeouts, auth errors, and expression failures beyond Graph API limits.
Analyzes Salesforce debug logs for root-cause diagnosis: governor limits, stack traces, slow queries, CPU/heap pressure. Scores issues 1-100 and recommends fixes.
Share bugs, ideas, or general feedback.
Hybrid T0/T1 skill that diagnoses Salesforce Flow failures. Works in two modes:
sf org list metadata and queries FlowInterviewLog records via
sf data query to retrieve live failure context.Identifies the failing node, root cause, fix recommendation, and fault path design guidance. Outputs a structured diagnosis with an audit envelope.
Use salesforce-flow-debugger-skill when the work is to diagnose why
a Flow failed or is not working:
Delegate elsewhere when:
| Situation | Skill to use |
|---|---|
| Building a new Flow from scratch | generating-flow (sf-skills) or MCP pipeline |
| Static review of Flow configuration and best practices | salesforce-flow-automation-review-skill |
| Deploying a fixed Flow to another org | salesforce-deployment-validator-skill |
| Apex exception inside a Flow-invoked Apex action | salesforce-apex-log-analyzer-skill |
Before diagnosing, gather:
In T1 mode, additionally confirm:
sf org listExtract from the error text:
Apply redaction (see Redaction Rules) before continuing analysis.
sf org list metadata \
--metadata-type Flow \
--target-org <alias>
Filter for the failing Flow by API name. Use the result to confirm the Flow version deployed and retrieve the element count.
sf data query \
--query "SELECT Id, FlowApiName, InterviewLabel, CurrentElement, ErrorCode, ErrorMessage, StartTime, EndTime FROM FlowInterviewLog WHERE FlowApiName = '<FlowApiName>' AND Status = 'Fault' ORDER BY StartTime DESC LIMIT 10" \
--target-org <alias> \
--result-format json
Redact all record IDs and variable values before analysis.
Note: FlowInterviewLog and FlowInterviewLogEntry are available
in orgs with Flow Interview Logging enabled (must be activated in Setup →
Process Automation Settings).
Map the parsed error to a root cause pattern
(see references/flow-error-patterns.md):
| Error pattern | Root cause category |
|---|---|
UNHANDLED_FAULT on Action element | Missing fault connector on the action |
NullPointerException on Assignment | Variable used before being set; loop ran zero iterations |
DML Exception on Update Records | Validation rule blocked the save; trigger re-entry; locked record |
EXCEEDED_ID_LIMIT or TOO_MANY_SOQL_QUERIES | DML or SOQL inside a loop |
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY | Running user lacks object or record access |
FLOW_LOOP_COUNT_LIMIT | Recursive Flow invocation; self-trigger via record update |
INVALID_TYPE or WRONG_CONTROLLER_STATE | Merging incompatible variable types in an Assignment |
| Subflow not found | Subflow version not active or not deployed in this org |
For each root cause, generate:
references/fault-path-design.md)Produce the full output block per the Output Format section below.
Score every diagnosis before emitting. Threshold: 80+ ship, 60–79 ship with caveat, below 60 reject and request more context.
| Dimension | Points | What earns full marks |
|---|---|---|
| Root cause clarity | 30 | Specific error type identified; failing element named; cause-and-effect chain explained in plain language |
| Fix suggestion specificity | 25 | Tells admin which element to click, which property to change, and what value to set — not "check the data" |
| Fault path recommendation | 20 | Recommends adding fault connector where missing; describes where fault path should end (screen, log, email) |
| Data type analysis | 15 | Identifies mismatched variable types; names correct types and where to set them |
| Redaction quality | 10 | All record IDs, variable values, and user IDs masked in output and audit envelope |
Scoring penalties:
allowed-tools: Read Grep Glob only.sf CLI commands executed.api and refresh_token only.View Setup and Configuration, View Setup.ModifyAllData, ViewAllData, ViewEncryptedData,
ModifyMetadata, AuthorApex.Stop and decline if:
salesforce-deployment-validator-skill).Every T1 execution emits an audit envelope. T0 mode emits a reduced envelope (no org fields).
audit_envelope:
matter_id: "<caller-provided-or-generated-uuid>"
skill_id: "salesforce-flow-debugger-skill"
skill_version: "0.1.0"
mode: "<T0-static | T1-live>"
target_org_alias: "<alias or 'N/A for T0'>"
flow_api_name: "<FlowApiName>"
flow_type: "<RecordTriggered|Screen|AutoLaunched|Scheduled>"
run_as_user_id: "<user_id_placeholder>"
log_records_queried: <integer or 0 for T0>
redactions_applied:
- field: "<FieldOrVariableName>"
reason: "<record_id|user_id|variable_value|pii>"
timestamp: "<ISO-8601-UTC>"
org_type_verified: "<sandbox | production | N/A for T0>"
verdict: "diagnosis-complete | needs-more-context | reject"
quality_score: <0-100>
quality_notes: "<what drove the score>"
diagnosis:
flow_api_name: "<FlowApiName or 'unknown'>"
flow_type: "<type>"
error_type: "<UNHANDLED_FAULT|NullPointerException|DML Exception|Governor Limit|Type Mismatch|Recursive|Other>"
failing_element_name: "<ElementName or 'unknown'>"
failing_element_type: "<Action|Decision|Assignment|Loop|GetRecords|UpdateRecords|Screen|Subflow>"
root_cause_summary: "<1-2 sentence plain-language explanation>"
root_cause_detail: "<technical detail with element names and variable context>"
fix_recommendation:
immediate_fix: "<specific steps in Flow Builder>"
fault_path_required: <true|false>
fault_path_design: "<where to add it and where it should terminate>"
null_guard_required: <true|false>
null_guard_placement: "<before which element and what Decision logic>"
data_type_fix: "<if type mismatch: what types, where to add intermediate variable>"
governor_limit_fix: "<if governor limit: what to move outside the loop>"
fault_path_template:
trigger: "<which element needs the fault connector>"
fault_variable_capture: "<Fault Message variable assignment>"
fault_path_ends_at: "<Screen|Custom Notification|Log to Custom Object|Email>"
sample_fault_message_variable: "{!$Flow.FaultMessage}"
redaction_log:
- "<description of what was masked>"
audit_envelope:
<see Audit Envelope Schema>
escalation_triggers_fired:
- "<trigger name or 'none'>"
missing_evidence:
- "<what additional context would improve the diagnosis>"
assumptions:
- "<explicit list of assumptions made>"
Apply in order. Do not bypass for any reason.
<record_id_placeholder> anywhere they appear in error messages or
log entries.<user_id_placeholder>.<variable_value_redacted>.00D): Replace with
<org_id_placeholder>.<org_instance_placeholder>.Document each redaction in redaction_log.
| Situation | Hand off to |
|---|---|
| Fix requires Apex action code change | salesforce-apex-log-analyzer-skill |
| Fix requires Flow deployment to new org | salesforce-deployment-validator-skill |
| Flow passes but underlying permission is wrong | salesforce-permission-model-review-skill |
| Static quality review of the Flow design | salesforce-flow-automation-review-skill |
| Flow governs a business-critical process needing production change | salesforce-live-guard-agent |
salesforce-live-guard-agent.FlowInterviewLog only. No DML,
no metadata mutation, no Apex execution.| File | When to read |
|---|---|
references/flow-error-patterns.md | Common Flow errors and their root causes |
references/fault-path-design.md | When and how to add fault connectors |
references/interview-log-redaction.md | Sanitizing FlowInterviewLog output |