/sf-compound-engineering:sf-review [mode:doc|polish|slds2|browser] [path, PR number, or depth fast|thorough|comprehensive]from sf-compound-engineering
Reviews Salesforce diffs and planning docs for governor limits, CRUD/FLS, sharing, LWC, and Flow. Supports multiple review modes including doc review, polish, SLDS migration, and browser testing.
Ships in sf-compound-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
First argument mode:<name> selects a mode; everything after it passes to that mode's guide. Load only the guide for the chosen mode.
| Mode | Use for | Guide |
|---|---|---|
(none) | Code review of a diff, path, or PR | this file |
doc | Review a plan, brainstorm, or requirements doc | references/doc/guide.md |
polish | UX, accessibility, and copy polish for UI surfaces | references/polish/guide.md |
slds2 | Migrate LWC/Aura from SLDS 1 to SLDS 2 | references/slds2/guide.md |
browser | Browser-test UI pages touched by the branch | references/browser/guide.md |
Principles enforced: 1 (preserve the quality ceiling), 3 (jagged intelligence), 5 (taste and oversight). See
PRINCIPLES.md.
Procedure lives in sibling files, not only in this orchestrator:
references/review-depth-levels.md before acting on this section.references/step-1-identify-and-classify-files.md before acting on this section.references/step-2-dispatch-review-personas-in-parallel.md before acting on this section.references/step-3-parallel-research-comprehensive-depth-only.md before acting on this section.references/step-4-consolidate-findings.md before acting on this section.references/output-format.md before acting on this section.Review Salesforce code by dispatching one subagent per review lens
(Apex / Security / Flow / LWC / Integration / Metadata / Tests / Architecture). Output findings categorized as
Critical / High / Medium / Low. Critical and High findings are non-negotiable
abort triggers — see "Non-Negotiable Gates" below. If the target isn't specified,
review the current git diff.
You are reviewing Salesforce code using parallel agent dispatch for speed and thoroughness.
Review the code at: $ARGUMENTS.target
If no target specified, review uncommitted changes (git diff).
The following findings are abort triggers, not warnings. They block the review from passing regardless of how minor the surrounding diff is. They exist because vibe coding does not exempt the diff from production-grade Salesforce constraints.
| Gate | What it catches | Owning lens |
|---|---|---|
| Security regression | CRUD/FLS bypass, SOQL injection, sharing-model violation, hardcoded credential, unsafe without sharing | security lens (+ integration for callout credentials) |
| Governor regression | SOQL/DML inside loops, missing bulkification, non-selective query on >100k-row object | apex and flow lenses |
| Test coverage regression | Production class without test class, test class with no assertEquals/assertTrue, bulk path untested at 200+ records | tests lens |
| Trigger context regression | Recursion guard missing, mixed-DML violation, handler bypassing the project's trigger framework | apex lens |
| Sharing regression | without sharing introduced without justification, sharing-recalculation skipped on owner change | security lens |
If any gate fires, the review output must include the gate name in the Critical section, and /sf-lfg must abort the pipeline. Do not route gate findings to "warnings."
Clearing a gate requires evidence, not a self-report. A gate is only cleared when the review output cites the proof — the pasted sf apex run test --result-format human coverage output, the specific file:line and the check that passed, or the Limits.get*() calculation — not "looks fine" or "no issues found." A gate marked clear without its underlying evidence is treated as unverified, and the finding stays open.
Pressure-test-pending hypotheses (see docs/pressure-tests/): guidance to pre-empt the excuses used to wave a gate through under deadline, not yet independently validated.
| Excuse | Reality |
|---|---|
| "This trigger only ever gets one record from the UI." | Data Loader, the REST/Bulk API, and Flow-triggered DML all pass collections on day one — and the org cannot stop them. Bulk safety is not optional. |
| "Governor limits don't matter in a scratch org, it's just for testing." | Scratch-org and sandbox limits mirror production Enterprise Edition. There is no test-only exemption. |
| "We'll fix sharing after it ships — it's admin-only for now." | Profile/permission-set assignment is a config change an admin makes without redeploying code. without sharing does not auto-correct when the audience widens. |
| "Coverage is at 75%, we're good." | 75% is a deploy gate, not a behavior check. Coverage counts lines executed, not assertions made — a test with no asserts hits coverage and proves nothing. |
| "It's just a config/Flow change, there's no code to review." | Flow, validation-rule, and formula changes still change behavior and can bypass CRUD/FLS or sharing. They get the same gate scrutiny as Apex. |
references/browser/guide.md (opens in a new tab)references/browser/references/agent-browser-driver.md (opens in a new tab)references/browser/references/browser-driver-policy.md (opens in a new tab)references/browser/references/browser-test-results.md (opens in a new tab)references/browser/references/driver-reference.md (opens in a new tab)references/browser/references/modes.md (opens in a new tab)references/browser/references/pipeline-orchestration.md (opens in a new tab)references/browser/references/quick-usage-examples.md (opens in a new tab)references/browser/references/workflow.md (opens in a new tab)references/browser/scripts/resolve-port.sh (opens in a new tab)references/defect-classes.md (opens in a new tab)references/doc/guide.md (opens in a new tab)references/lenses/apex.md (opens in a new tab)references/lenses/architecture.md (opens in a new tab)references/lenses/contract.md (opens in a new tab)references/lenses/doc.md (opens in a new tab)references/lenses/flow.md (opens in a new tab)references/lenses/integration.md (opens in a new tab)references/lenses/lwc.md (opens in a new tab)references/lenses/metadata.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub divingsbysangam/salesforce-compound-engineering-plugin --plugin sf-compound-engineering10 skills in this plugin
/sf-compoundCapture durable Salesforce knowledge in docs/solutions/, or refresh stale learnings. Use when the lesson is not in the final code or tests. Use sf-debug for an open failure./sf-debugDiagnose a Salesforce failure or explain code: tests, governor limits, deploys, LWC, sharing. Use for 'debug', 'why is this failing', or 'I didn't follow'. Use sf-work when the change is already known./sf-deployValidate, deploy, retrieve, and delete Salesforce metadata; manage orgs, manifests, test runs, and test data; set up the environment. Use for 'deploy', 'validate', 'retrieve', 'package.xml', 'scratch org', 'setup'./sf-generateGenerate Salesforce source: Apex, triggers, Flows, objects/fields/tabs/apps, permission sets, validation rules, FlexiPages, test data, prompt templates, MCP tools, Agentforce agents and tests./sf-knowSalesforce platform knowledge on demand: governor limits, Apex/LWC/Flow patterns, security (CRUD/FLS, sharing), integrations, GraphQL, Hosted MCP, agent-native design. Use when a question needs platform facts./sf-lfgTake a Salesforce request through to an open PR without check-ins. Use only for 'lfg' or an explicit end-to-end ship. Use sf-plan or sf-work when each step stays in review.Other plugins' skills for the same job