/sf-compound-engineering:sf-work [mode:simplify|optimize|worktree|todos|handoff] [plan path or feature description]from sf-compound-engineering
Implements Salesforce work from a plan or prompt, covering Apex, LWC, Flow, and metadata. Supports modes for simplify, optimize, worktree, todos, and handoff.
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) | Implement against a plan or prompt, test-first | this file |
simplify | Simplify recently changed code | references/simplify/guide.md |
optimize | Metric-driven optimization loop (CPU, SOQL, heap) | references/optimize/guide.md |
worktree | Create or manage isolated git worktrees | references/worktree/guide.md |
todos | File-based task tracking in todos/ | references/todos/guide.md |
handoff | Write or resume a session handoff | references/handoff/guide.md |
dispatch | Reference: how skills dispatch personas/lenses as subagents | references/dispatch/guide.md |
Persona dispatch. This skill dispatches personas as isolated subagents — see
references/dispatch/guide.mdfor the mechanics (isolated subagents, same-response parallelism, same-file-conflict check). Review personas are referenced from../sf-review/references/personas/, research personas from../sf-plan/references/personas/.
Principles enforced: 1 (preserve the quality ceiling), 2 (verifiability), 3 (jagged intelligence). See
PRINCIPLES.md.
Classify a bare prompt before the research reads. When the tier is uncertain, take the fuller route. A prompt this session's sf-plan already sized is implemented, not re-planned. A decision the user would weigh stops before the write and asks; it does not by itself route back to sf-plan.
sf-plan and honor the choice. When proceeding, build the task list and continue.Procedure lives in sibling files, not only in this orchestrator:
references/step-0-pre-implementation-research-parallel.md before acting on this section.references/step-1-route-via-indexes.md before acting on this section.references/step-2-internal-first-implementation.md before acting on this section.references/step-2-5-test-first-red-green-refactor.md before acting on this section.references/step-3-implementation-standards.md before acting on this section.references/step-4-system-wide-test-check.md before acting on this section.references/step-5-incremental-commits.md before acting on this section.references/output.md before acting on this section.references/after-implementation.md before acting on this section.Implement a Salesforce feature against an existing plan. Before writing code, dispatch
sf-learnings-researcher and sf-repo-research-analyst in parallel. Then write code AND tests
together — verification is not a follow-up. Before declaring complete, answer all five
System-Wide Test Check questions: trigger contexts, bulk at 200+, governor limits, sharing,
integration mocks. If the plan has a Verification Strategy section, the implementation must
satisfy every field; do not relax it.
<feature_description> #$ARGUMENTS </feature_description>
When asking the user a question, use the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in that list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, load its schema with the host's tool-discovery primitive, then call it. Fall back to numbered options in chat only when no blocking tool is listed or the call errors. Never silently skip the question.
Ask one question at a time. Prefer a concise single-select choice when natural options exist.
You are implementing a Salesforce feature with parallel persona support and built-in quality checks.
Implement the feature described in: $ARGUMENTS.plan
If a plan file path is provided, read it first. Implement when the contents name the change, the scope, and how to verify it, and no launch-blocking question remains. An old readiness label is not permission. A requirements-only or approach-only document goes back to sf-plan. If a description is provided, implement directly. Confirm a prerequisite the plan says already exists in the repo before relying on it. A file the plan says you will add does not have to exist yet.
Bundled reference loading is fail-closed. Resolve every path under this skill's references/ from this SKILL.md directory. If a required file cannot be read, stop and report the missing reference instead of approximating.
Writable checkout. Repo-local implementation writes need a git checkout you can edit. If this session has no writable checkout, but the user named a repository and the harness exposes a remote repo-work surface, run the work on that surface. Otherwise skip repo-local writes and report that no writable checkout is available.
Do not ask which branch to start on when already on a meaningful feature branch. After implementation, invoke /sf-review. Critical/High security findings abort /sf-lfg (Principle 1) — they are not warnings.
Branch and pre-work scope. If you are on the default branch, detached, or on a generated name, create a feature branch from the work and continue. Do not ask. Before the first edit, record git status --short --untracked-files=all. Later commits stay path-limited and leave those pre-existing dirty paths out unless a unit must edit one of them; then ask once, covering those files together.
references/after-implementation.md (opens in a new tab)references/dispatch/guide.md (opens in a new tab)references/handoff/guide.md (opens in a new tab)references/handoff/references/create.md (opens in a new tab)references/handoff/references/resume.md (opens in a new tab)references/handoff/references/route-the-invocation.md (opens in a new tab)references/optimize/guide.md (opens in a new tab)references/output.md (opens in a new tab)references/simplify/guide.md (opens in a new tab)references/step-0-pre-implementation-research-parallel.md (opens in a new tab)references/step-1-route-via-indexes.md (opens in a new tab)references/step-2-5-test-first-red-green-refactor.md (opens in a new tab)references/step-2-internal-first-implementation.md (opens in a new tab)references/step-3-implementation-standards.md (opens in a new tab)references/step-4-system-wide-test-check.md (opens in a new tab)references/step-5-incremental-commits.md (opens in a new tab)references/todos/assets/todo-template.md (opens in a new tab)references/todos/guide.md (opens in a new tab)references/worktree/guide.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
10 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'.npx claudepluginhub divingsbysangam/salesforce-compound-engineering-plugin --plugin sf-compound-engineeringOther plugins' skills for the same job