
Dx Org Switch
This handles switching your default Salesforce org through the CLI, which is one of those things you do constantly when juggling multiple sandboxes, scratch orgs, or prod environments. It sets target-org locally by default (project-scoped) or globally if you ask for it, and includes a verification step since the CLI's JSON output won't tell you which scope actually took effect. The instructions are thorough about when to use local versus global scope and include a helpful reminder that SF_TARGET_ORG environment variables will override everything. Solid for teams that context-switch between orgs throughout the day.
- skills.sh installs
- 5.8K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add forcedotcom/sf-skills --skill dx-org-switch --agent claude-codeInstalls into .claude/skills of the current project.
Files
Steps
- Identify the org: the user provides a username or alias (
orgIdentifier). If not provided, runsf org listto show authenticated orgs and ask the user which one to use. - Set the default org:
- Local (default):
sf config set target-org <orgIdentifier>- Applies only within the current project directory. Use this for normal project work.
- Global (only if user explicitly requests):
sf config set target-org <orgIdentifier> --global- Applies system-wide across all directories. Use when working outside a project or when the user asks for global scope.
- If this fails, report the error and suggest running
sf org login webif the org may not be authorized.
- Local (default):
- Verify:
sf config get target-org --json- Note: the JSON output does not include a scope/location field — it cannot confirm whether the value is local or global. Confirm the value only, e.g.:
target-org is now set to: <value> - If it fails, report the error and advise running
sf config get target-org.
Notes
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/forcedotcom/sf-skills
- Categories
- DevOps & CI/CD, Sales & Marketing, CLI & Terminal
- First seen
- Jul 14, 2026
More from forcedotcom/sf-skills
All 158- Dx Org Permission Set Assign5.8K
- Platform Custom Lightning Type Generate5.8K
- Agentforce Test5.8K
- Agentforce Observe5.8K
- Platform Lightning App Coordinate5.7K
- Design Systems Slds2 Migrate5.7K
- External Diagram Mermaid Generate5.6K
- Integration Connectivity Connected App Configure5.5K
- Integration Connectivity Generate5.5K
- Agentforce D360 Analyze5.4K
- Experience Ui Bundle Frontend Generate5.3K
- Platform Tracing Configure5.3K
- Experience Ui Bundle Metadata Generate5.3K
- Experience Ui Bundle App Coordinate5.3K
- Experience Ui Bundle Deploy5.3K
- Experience Ui Bundle Salesforce Data Access5.3K
- Experience Ui Bundle Custom App Generate5.3K
- Dx App Analytics Query5.2K
- Platform Tracing Agentforce Configure5.2K
- Platform Value Set Generate5.2K
- Integration Eventing Cdc Configure5.2K
- Integration Eventing Subscription Configure5.2K
- Platform Trust Archive Manage5.2K
- Experience Ui Bundle File Upload Generate5.2K
Recommended
More DevOps & CI/CD1
frontend-design-deslopsamber/cc-skillsProduce distinctive, non-generic UI and design applications well, working strategy-first. Identify the project (landing page, SaaS app, dashboard, ecommerce, pr5.8Kskills.sh installs
2
vite-patternsaffaan-m/eccVite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activat5.8Kskills.sh installs
3
agentforce-testforcedotcom/sf-skillsWrite, run, and analyze structured test suites for Agentforce agents — functional AND security. TRIGGER when: user writes or modifies test spec YAML (AiEvaluati5.8Kskills.sh installs
4
design-sprintwondelai/skillsRun a structured 5-day process to prototype, test, and validate product ideas with real users. Use when the user mentions "design sprint", "validate before we b5.7Kskills.sh installs
5
copywriting-tone-of-voice-creatorsamber/cc-skillsBuild a brand tone of voice guide (TONE.md) via discovery, voice definition, and channel modulation. Outputs voice attributes with do's/don'ts, NN/g positioning5.7Kskills.sh installs
6
manim-videoaffaan-m/eccBuild reusable Manim explainers for technical concepts, graphs, system diagrams, and product walkthroughs, then hand off to the wider ECC video stack if needed.5.7Kskills.sh installs