/sf-compound-engineering:sf-generate type:<apex|trigger-refactor|flow|metadata|permission-set|validation-rule|lightning-page|test-data|prompt-template|mcp-tool|agent|agent-test> [what to build]from sf-compound-engineering
Generates Salesforce source code across Apex, triggers, Flows, metadata, permission sets, validation rules, FlexiPages, test data, prompt templates, MCP tools, and Agentforce agents, with validation.
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.
Principles enforced: 1 (quality ceiling), 2 (verifiability). See
PRINCIPLES.md.
First argument type:<name> (or mode:<name>) picks the generator. If absent, infer it from the request or the target file (*.cls → apex, *.trigger → trigger-refactor, *.flow-meta.xml → flow, other *-meta.xml → metadata). Load only that generator's guide.
| Type | Builds | Guide |
|---|---|---|
apex | Service, selector, domain, batch, queueable, invocable classes + tests | references/apex/guide.md |
trigger-refactor | Move logic out of legacy triggers into a handler | references/trigger-refactor/guide.md |
flow | Screen, autolaunched, record-triggered, scheduled Flows | references/flow/guide.md |
metadata | Custom objects, fields, apps, tabs, list views, Lightning types | references/metadata/guide.md |
permission-set | Permission sets with object, FLS, Apex, tab access | references/permission-set/guide.md |
validation-rule | Validation rules with correct formula XML | references/validation-rule/guide.md |
lightning-page | FlexiPages (record, app, home) and Lightning apps | references/lightning-page/guide.md |
test-data | Apex test data factory | references/test-data/guide.md |
prompt-template | Prompt Builder templates and their invocation | references/prompt-template/guide.md |
mcp-tool | Apex/Flow tools exposed through MCP | references/mcp-tool/guide.md |
agent | Agentforce agents in Agent Script (.agent) | references/agent/guide.md |
agent-test | Agentforce test specs and runs | references/agent-test/guide.md |
force-app/) as the pattern, and confirm uncertain field, object, or metadata-type names with the tools in ../sf-know/references/org-context/guide.md (Salesforce's schema and LSP tools when loaded, otherwise the sf CLI). Never invent API names.sf project deploy validate --dry-run (or /sf-deploy mode:validate) on the generated files and fix every error.../sf-know/references/<topic>/guide.md only when needed.references/agent-test/guide.md (opens in a new tab)references/agent-test/references/action-execution-mode-c.md (opens in a new tab)references/agent-test/references/capture-learnings-principle-7.md (opens in a new tab)references/agent-test/references/fix-loop-max-3-iterations.md (opens in a new tab)references/agent-test/references/inspiration.md (opens in a new tab)references/agent-test/references/mode-a-ad-hoc-preview-testing.md (opens in a new tab)references/agent-test/references/mode-b-testing-center-batch-testing.md (opens in a new tab)references/agent-test/references/modes.md (opens in a new tab)references/agent-test/references/safety-verdict-mandatory-after-any-run-principle-1.md (opens in a new tab)references/agent-test/references/step-0-plan-the-tests-always-before-running.md (opens in a new tab)references/agent-test/references/test-file-location-convention.md (opens in a new tab)references/agent-test/references/when-to-use-this-skill.md (opens in a new tab)references/agent/guide.md (opens in a new tab)references/agent/references/capture-learnings-principle-7.md (opens in a new tab)references/agent/references/deprecated-syntax-use-subagent-not-topic-april-2026.md (opens in a new tab)references/agent/references/inspiration.md (opens in a new tab)references/agent/references/rules-that-always-apply.md (opens in a new tab)references/agent/references/step-0-pre-implementation-research-parallel-principle-7.md (opens in a new tab)references/agent/references/step-1-design-the-agent-and-produce-an-agent-spec.md (opens in a new tab)references/agent/references/step-2-validate-environment-prerequisites.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-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./sf-planPlan Salesforce work before code: ideate, brainstorm, strategy, or an implementation plan. Use for 'plan this' or STRATEGY.md. Use sf-work to implement; use sf-debug when a test is already failing.Other plugins' skills for the same job