dx-org-switch
SkillProductivityLets your agent switch which Salesforce org its CLI commands run against.
Use dx-org-switch in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add dx-org-switch and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the dx-org-switch skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Switches the active Salesforce org (default target-org) using the Salesforce CLI. Use whenever someone wants to change which org CLI commands run against, whether they say \"switch org\", \"change default org\", \"set my org to\", \"use alias\", \"point to\", or describe wanting to work against a s
What this skill tells your AI
The instructions your AI receives, as published by forcedotcom/sf-skills in skills/dx-org-switch/SKILL.md and read by ahel’s review.
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
- Unified CLI uses keys like
target-organdtarget-dev-hub. Legacy sfdx keys (defaultusername,defaultdevhubusername) are deprecated in this context. - The sf CLI does not have
--localor--scopeflags for config set. Local scope is the default behavior. - If the org does not change after setting the config, check whether
SF_TARGET_ORGis set — environment variables override config values. - Salesforce CLI config (unified) reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_config_commands_unified.htm#cli_reference_config_set_unified
Signals
- GitHub stars
- 1k
- Forks
- 351
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
dx-org-switch- Source
- github.com/forcedotcom/sf-skills
github.com/forcedotcom/sf-skills
More in Productivity
Skill · coreyhaines31
More in Productivitygws-calendar
Skill · googleworkspace
More in Productivitylark-workflow-standup-report
Skill · larksuite
More in Productivitywriting-plans
Skill · obra
More in Productivityenergy-procurement
Skill · affaan-m
More in Productivityhomelab-pihole-dns
Skill · affaan-m
More in Productivity