/salesforce:dx_mcpfrom salesforce
Interact 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.
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: an org-touching task in any project — a SOQL/Tooling query, an Apex-test run or resume, a metadata deploy/retrieve, a long-running job to resume, or an org/alias to resolve · the salesforce-dx MCP available in the session.
Out: the action runs through the mcp__salesforce-dx__* tools (never the sf CLI), with the
org resolved via get_username, an absolute directory on every call, and useToolingApi: true
on metadata/Apex/*__mdt queries — structured, resumable results instead of parsed shell text.
This overrides any sf CLI example in a project's docs or CLAUDE.md (sf data query,
sf apex run test, sf project retrieve start, …). Reach for the MCP first; fall back to sf via
Bash only when an MCP tool genuinely cannot do the job — sf org login, scratch-org creation, an
interactive flag.
sf Bashrun_apex_test returns a testRunId you can
resume; run_soql_query toggles Tooling API with one flag.The mcp__salesforce-dx__* tools are not loaded by default. Before the first
call in a session, fetch the schemas you need:
ToolSearch query: "select:mcp__salesforce-dx__run_apex_test,mcp__salesforce-dx__run_soql_query,mcp__salesforce-dx__deploy_metadata,mcp__salesforce-dx__retrieve_metadata,mcp__salesforce-dx__get_username"
After they appear in a <functions> block they are callable like any other tool.
directory is required and must be a FULL pathEvery tool takes a directory param. Use the absolute path of the repo whose
org/config you're working against. Keep using the same directory across calls
unless the task moves to another repo.
Run get_username (with defaultTargetOrg: true) once to confirm the target
org, then pass its value as usernameOrAlias on every later call. NEVER invent
an alias.
For ApexClass, CustomMetadata / *__mdt, ApexTestResult, and similar
metadata objects, set useToolingApi: true on run_soql_query.
| Tool | Use for |
|---|---|
run_apex_test | Run Apex tests. testLevel: "RunSpecifiedTests" + classNames (and/or methodNames) for specific classes; RunLocalTests to skip managed pkgs; RunAllTestsInOrg for everything. Add codeCoverage: true for coverage, verbose: true for passing/failure detail, async: true to get a testRunId and read results later. |
run_soql_query | SOQL against the org. useToolingApi: true for metadata objects. |
deploy_metadata | Push local metadata. Leave sourceDir/manifest empty for "deploy my changes". Can run tests inline via apexTests or apexTestLevel. |
retrieve_metadata | Pull metadata to local. Same vague-input rule as deploy. |
resume_tool_operation | Resume a long-running deploy/test/scratch job by jobId. |
get_username / list_all_orgs | Resolve the target org / list configured orgs. |
run_agent_test | Agentforce tests only — not for Apex. |
deploy_metadata the changed classes (or deploy with apexTests to test in one shot).run_apex_test — testLevel: "RunSpecifiedTests", classNames: [...],
codeCoverage: true.verbose: true to read the failing assertion/stack.For discovery (existing test patterns, custom metadata rows), use
run_soql_query with useToolingApi: true.
mcp__salesforce-dx__*, not sf via Bash. If you shelled out, an MCP
tool genuinely could not do it (login, scratch-org create, an interactive flag).get_username resolved the target and its
value rode on every call as usernameOrAlias; directory was absolute; metadata/Apex/*__mdt
queries set useToolingApi: true.What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/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.Other plugins' skills for the same job
npx claudepluginhub aquivalabs/bladeforge --plugin salesforce