/salesforce:sf-deploy-testfrom salesforce
CLI fallback that deploys Salesforce Apex/metadata to an org and returns a compact TWO-LINE pass/fail summary (deploy: Succeeded / tests: X/Y passed) via a bash wrapper over `sf project deploy` + `sf apex run test` — no MCP dependency. PREFER the salesforce-dx MCP (`mcp__salesforce-dx__deploy_metadata` + `mcp__salesforce-dx__run_apex_test`, per the `dx_mcp` skill) for programmatic deploy/test when the project has it — structured, resumable results, no shell/path friction. Reach for THIS skill instead when: you want a terse one-line pass/fail without parsing MCP JSON; the salesforce-dx MCP is unavailable (headless / cron / MCP server not connected); or you need combined deploy-then-test in a single call. If the project's CLAUDE.md names the dx MCP as the default deploy+test harness, follow that and treat this as the fallback. Still covers interpreting a failed deploy (source-tracking, unsafe-path, cross-repo shared-object errors). Don't use for anonymous Apex snippets, ad-hoc SOQL, listing orgs, code review, or UI work with no deploy.
Trending skills
7-day visitors to each skill page
Ships in salesforce. 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.
In: a project dir with an sf-authed org (default myOrg) · what to deploy — --source-dir
or --metadata, repeatable · optional --tests <ClassA,ClassB> · the colocated sf-deploy-test.sh.
Out: a two-line summary instead of parsed CLI or MCP JSON — deploy: Succeeded /
deploy: Failed — <problems> / deploy: ERROR — <message>, and, only when --tests was given,
tests: X/Y passed (with — FAIL: <names> when any failed).
A colocated script (sf-deploy-test.sh, in this skill's directory) wraps
sf project deploy start (+ optional sf apex run test) and prints a two-line summary.
This skill is the CLI fallback, not the default. When the project provides the salesforce-dx
MCP — and especially when its CLAUDE.md names it as the deploy+test harness — use
mcp__salesforce-dx__deploy_metadata + mcp__salesforce-dx__run_apex_test instead: structured
results, resumable long operations, no shell/path-resolution friction. Reach for this skill for a
terse one-line pass/fail, a single combined deploy+test call, or when the MCP is unavailable
(headless / cron, MCP not connected).
bash "<this-skill-dir>/sf-deploy-test.sh" --project-dir /path/to/repo \
--source-dir force-app/main/default/classes/Foo.cls --tests FooTest
bash "<this-skill-dir>/sf-deploy-test.sh" --metadata "ApexClass:Foo" --tests "FooTest,BarTest"
--org <alias> — default myOrg.--project-dir <path> — where to run sf from (default: current dir).--source-dir <path> (repeatable) OR --metadata <Type:Name> (repeatable).--tests <ClassA,ClassB> — optional; comma-separated test classes/methods.--ignore-conflicts.deploy: Succeeded / deploy: Failed — <problems> / deploy: ERROR — <message>.tests: X/Y passed / tests: X/Y passed — FAIL: <names> (only when --tests given).If a deploy fails with The filepath "../<other-repo>/…" contains unsafe character sequences,
the CLI is resolving a shared object across sibling repos. This is an environment/source-tracking
issue, not a code problem — it will show up as deploy: ERROR — …. Deploy that shared object
from its owning repo, or resolve the cross-repo source-tracking state before retrying.
deploy: line first, the tests: line only if you passed
--tests.deploy: Succeeded is the ONLY pass. Failed and ERROR both mean the org did NOT take the
code — a green tests: line under a failed deploy is testing the OLD deployed code, not yours.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/dx_mcpSalesforce DX MCP — Use It For Org InteractionsInteract with a Salesforce org through the salesforce-dx MCP tools instead of the raw `sf` CLI. Use for any org-touching task: running SOQL or Tooling queries against an org, running or resuming Apex tests, deploying/pushing or retrieving/pulling metadata and Apex classes to/from an org (scratch, sandbox, or prod), resuming a long-running deploy or test job by id, and resolving which org alias or username to target. Triggers on requests like "query the org", "push/deploy these classes to the org", "run the Apex tests on <org>", "resume the deploy job", or "which org alias should I use". If the action reaches out to a live org — data, tests, metadata, or org/alias selection — reach for this first./lwc_developmentSalesforce LWC DevelopmentHouse rules for developing Salesforce Lightning Web Components (LWC) and Aura — the .js controller, .html template, .js-meta.xml, and CSS of a bundle, plus every LWC authoring idiom. Use whenever creating or editing an LWC/Aura bundle or writing any Salesforce-side frontend JS — including adding an @api or @track property, wiring an @wire to an Apex class, emitting or handling a custom event, a lifecycle hook, DOM access (querySelector), styling a component (CSS custom properties, scss→css conversion), or writing the js-meta.xml targets / isExposed config./security_review-rulesSecurity Review RulesSecurity rules for reviewing changes or writing security-sensitive code — secret/API-key leakage, BFF route auth, client token boundary, SOQL injection, XSS in Aura/LWC output, WITH USER_MODE / FLS enforcement, and the Salesforce Security Review bar for Apex. Activate when auditing a diff for security (hardcoded secrets, injection, missing auth, token leaks, unescaped output) or writing a BFF route, Apex REST resource, or any auth/SOQL-touching code./sf-runsf-run — org anonymous-Apex / SOQL runnerRun anonymous Apex or a SOQL query against a Salesforce org and get a terse pass/fail result. Use whenever you need to execute anonymous Apex, reproduce an org-side error, or run a quick SOQL check against a dev/scratch org — instead of hand-rolling `sf org display` + curl to the Tooling API. Do NOT use to deploy or retrieve metadata (use `sf-deploy-test`), to describe an object schema or field names (use `dx_mcp`/`as_mcp`), or to build UI — this only runs anon Apex and SOQL.npx claudepluginhub aquivalabs/bladeforge --plugin salesforce