Agent skill · forcedotcom
dx-org-devhub-configure
Enable Dev Hub on a Salesforce org and view its scratch org allocation, using the Salesforce CLI (sf). Use when someone wants to turn on or enable Dev Hub, set up an org to create scratch orgs or second-generation (2GP) and unlocked packages, check whether Dev Hub is already enabled, see how many scratch orgs they can create (Active and Daily scratch org limits, remaining allocation), configure Dev Hub preferences such as packaging, org shape export, or scratch org snapshots, or list the active scratch orgs created from a Dev Hub. Enabling deploys the enableScratchOrgManagementPref setting, 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, for switching the default org (use dx-org-switch), or for trial or org expiration dates (use dx-org-trial-expiration-check).
What it needs
About 8k tokens when loaded.
What this skill does
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 and how many remain) — for the default org or a named org. The skill can also configure Dev Hub sub-preferences (packaging, org shape export, scratch org snapshots) and list the active scratch orgs created from a Dev Hub. 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). "List the scratch orgs on my Dev Hub." 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. Switching the default/active org — use dx-org-switch. Trial or org expiration dates ("when does my org expire") — use dx-org-trial-expiration-check. 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 INVALIDTYPE error means it is OFF. This is the reliable signal. Do not infer enablement from sf org list limits alone: it reports ActiveScratchOrgs / DailyScratchOrgs rows even on orgs where Dev Hub is off, so limits show allocation but not enablement. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills forcedotcom/dx-org-devhub-configure--76c1af