
Dx Org Devhub Configure
Enable Dev Hub on a Salesforce org, view its status and scratch org allocation, or read...
Install
npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -g -a claude-code -y- Repository
- forcedotcom/sf-skills1.1k
- Category
- Engineering
- Updated
- 5d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- Yes, review before use
What it does
Enable Dev Hub on a Salesforce org, view its status and scratch org allocation, or read its current DevHubSettings preferences, using the Salesforce CLI (sf). Use when someone wants to turn on or enable Dev Hub, set up an org for scratch orgs or 2GP/unlocked packages, check whether Dev Hub is already enabled, see scratch org allocation (Active/Daily limits, remaining, and a pre-flight warning near the limit), see which Dev Hub preferences (packaging, org shape export, scratch org snapshots) are on or off, configure those preferences, list active scratch orgs, or list authenticated orgs when none is specified. Enabling deploys enableScratchOrgManagementPref, is irreversible, needs a System Administrator (ModifyAllData or ModifyMetadata), and does not work in sandboxes. DO NOT TRIGGER for creating or deleting individual scratch orgs.
Enable Dev Hub & View Scratch Org Allocation
Enable Dev Hub on a Salesforce org, verify whether it is already on, and see the org's scratch org allocation (Active and Daily limits, how many remain, and a pre-flight warning when close to the limit), for the default org or a named org. The skill can also read the org's current DevHubSettings preferences, configure Dev Hub sub-preferences (packaging, org shape export, scratch org snapshots), list the active scratch orgs created from a Dev Hub, and list which orgs are authenticated when none is specified.
Dev Hub is the org feature that lets you create and manage scratch orgs and second-generation (2GP) / unlocked packages.
When to use
Trigger on requests like:
- "Enable Dev Hub" / "Turn on Dev Hub" / "Set up this org for scratch orgs."
- "Is Dev Hub enabled on my org?" / "Check if Dev Hub is on."
- "How many scratch orgs can I create?" / "What's my scratch org allocation / limit?" / "How many scratch orgs do I have left?"
- "Turn on packaging / 2GP / unlocked packages" / "Enable org shape export" / "Enable scratch org snapshots" (Dev Hub sub-preferences).
- "Which Dev Hub preferences are turned on?" / "Show my current DevHubSettings."
- "List the scratch orgs on my Dev Hub."
- "What orgs do I have authenticated?" / "I didn't pass an org, what's available?"
When NOT to use
Do not trigger this skill for:
- Creating or deleting an individual scratch org, that is
sf org create scratch/sf org delete scratch, a different workflow. This skill enables the Dev Hub feature and reports allocation; it does not create scratch orgs.
How Dev Hub enablement is determined
The standard object ScratchOrgInfo is provisioned and becomes queryable
only when Dev Hub is enabled. So a successful SELECT COUNT() FROM ScratchOrgInfo means Dev Hub is ON; an INVALID_TYPE error means it is
OFF. This is the reliable signal.
