/set-default
Set the project's target-org (the org that all sf commands run against by default). If no org is named, lists the authenticated orgs for the user to pick.
> /plugin marketplace add forcedotcom/sf-skills > /plugin install salesforce-development@salesforce
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/set-default
Context preview
What this command does when you run it.
Set the project's target-org (the org that all sf commands run against by default). If no org is named, lists the authenticated orgs for the user to pick.
Command definition
set-default.mddescription: Set the project's target-org (the org that all sf commands run against by default). If no org is named, lists the authenticated orgs for the user to pick.
allowed-tools:
- Bash
argument-hint: "[alias-or-username] [--global]"
Set the active target-org for the current project (or globally).
Workflow:
1. **Parse arguments** ($ARGUMENTS):
- `<alias-or-username>` (optional) — which org to make the default. If omitted (e.g. the user said "connect an org" with no name), help them pick in step 2.
- `--global` (optional) — write to user-level config instead of project-level
2. **List the authenticated orgs:**
sf org list --json
- **If no org was named:** present the authenticated orgs as a short numbered list (alias · username · status) and ask which one to set as the default. Use the org they choose as `<alias>` below. If the list is empty, tell the user to authenticate first via `/salesforce-development:login --alias <name>` (a browser login), then stop.
- **If an org was named:** confirm the alias/username appears in the list. If not, tell the user to authenticate first via `/salesforce-development:login --alias <name>`.
3. **Set the target-org:**
# Project-local (default)
sf config set target-org <alias>
# User-global
sf config set target-org <alias> --global
4. **Verify the change:**
sf org display --target-org <alias> --json
Rules:
- Default is project-local (`.sf/config.json`) which is what most users want
- Use `--global` only when the user is working outside any specific project
- If the alias/username can't be found in `sf org list`, do not silently proceed
Read more
description: Set the project's target-org (the org that all sf commands run against by default). If no org is named, lists the authenticated orgs for the user to pick. allowed-tools: - Bash argument-hint: "[alias-or-username] [--global]"
Set the active target-org for the current project (or globally).
Workflow:
1. **Parse arguments** ($ARGUMENTS):
- `<alias-or-username>` (optional) — which org to make the default. If omitted (e.g. the user said "connect an org" with no name), help them pick in step 2.
- `--global` (optional) — write to user-level config instead of project-level
2. **List the authenticated orgs:**
sf org list --json
- **If no org was named:** present the authenticated orgs as a short numbered list (alias · username · status) and ask which one to set as the default. Use the org they choose as `<alias>` below. If the list is empty, tell the user to authenticate first via `/salesforce-development:login --alias <name>` (a browser login), then stop.
- **If an org was named:** confirm the alias/username appears in the list. If not, tell the user to authenticate first via `/salesforce-development:login --alias <name>`.
3. **Set the target-org:**
# Project-local (default) sf config set target-org <alias> # User-global sf config set target-org <alias> --global
4. **Verify the change:**
sf org display --target-org <alias> --json
Rules:
- Default is project-local (`.sf/config.json`) which is what most users want
- Use `--global` only when the user is working outside any specific project
- If the alias/username can't be found in `sf org list`, do not silently proceed
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Other commands on sf-skills.
- /discovery
Discover installed and available Salesforce capabilities, drill into a domain or skill, or explicitly add one catalog-authorized project skill.
Open command - /login
Authenticate to a new Salesforce org via the browser (sf org login web). Optionally set the org as the project's default target.
Open command - /logout
Sign out of one or all Salesforce orgs (sf org logout). Confirms before destructive action.
Open command - /org
Show just the connected Salesforce org details — alias, edition, API version, instance URL, username.
Open command - /project
Show just the local SFDX project metadata stats — Apex/triggers/LWC/Aura/objects/perm sets/flows counts and git status.
Open command - /reset-source-tracking
Reset source tracking for the target org — tells the CLI to forget all tracked changes so the next push/pull treats the full org as new state. Destructive on shared sandboxes. Requires explicit confirmation before executing.
Open command

