/salesforce:sf-runfrom salesforce
Run 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.
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 alias reachable via sf CLI auth (default myOrg) · exactly one of --apex '<code>'
· --apex-file <path> · --soql '<query>' · the colocated sf-run.sh.
Out: one terse line instead of raw Tooling-API JSON — Apex → OK, FAIL(compile): <problem> @ line N, or FAIL: <message> @ <first stack frame>; SOQL → <N> rows then up to 5 compact records
with attributes stripped. --debug additionally prints the raw JSON.
A colocated script (sf-run.sh, in this skill's directory) resolves the org access token via the
sf CLI and hits the Tooling executeAnonymous endpoint (or the query endpoint), returning a
terse result instead of raw JSON. Prefer it over hand-writing the token+curl recipe.
bash "<this-skill-dir>/sf-run.sh" --apex 'System.debug(1+1);'
bash "<this-skill-dir>/sf-run.sh" --org myScratch --soql 'SELECT Id FROM Account LIMIT 5'
bash "<this-skill-dir>/sf-run.sh" --apex-file /tmp/snippet.apex --debug
--org <alias> — default myOrg.--apex '<code>' · --apex-file <path> · --soql '<query>'.--debug — also print the full raw JSON response.OK, or FAIL(compile): <problem> @ line N, or FAIL: <exceptionMessage> @ <first stack frame>.<N> rows then up to 5 records (compact JSON, attributes stripped).Anonymous Apex can run DML — that is intentional; treat it like any org-mutating action.
sf-run.sh, not a hand-rolled sf org display + curl recipe.OK or a FAIL… with a location; SOQL → <N> rows then the records. If you
got raw JSON, you forgot the script or you asked for --debug on purpose.--debug to see the raw payload, fix the call, and repeat from 1.What SKILL.md sets; muted values are Claude Code's defaults
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.Other plugins' skills for the same job
npx claudepluginhub aquivalabs/bladeforge --plugin salesforce