commerce-b2b-open-code…
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\",…
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
$ npx -y skills add forcedotcom/sf-skills --skill dx-org-devhub-configure --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dx-org-devhub-configureContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: dx-org-devhub-configure
description: "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)."
allowed-tools: Read, Bash(bash), Bash(sf api request rest), Bash(sf data query), Bash(sf org list), Bash(sf org login web), Bash(sf org login device), Bash(sf project deploy), Bash(sf config get), Bash(sf org display), Bash(sf org open), Bash(jq)
metadata:
version: "1.0"
domains: ["Developer Experience"]
# DevHubSettings metadata + the Tooling API DevHubSettings endpoint require
# API 47.0 or later (see scripts/devhub.sh SETTINGS_API_VERSION).
minApiVersion: "47.0"
relatedSkills:
- "dx-org-switch"
- "dx-org-trial-expiration-check"
# Enabling needs ModifyAllData OR ModifyMetadata (either suffices). accessCheck
# is a flat array with no OR operator, so declaring both would read as AND and
# could falsely gate an admin holding only one. Declare the canonical
# System-Administrator perm; the OR alternative stays documented in the
# description and body.
accessCheck:
- type: "userPerm"
value: "ModifyAllData"
cliTools:
- tool: ["jq"]
semver: ">=1.6.0"
- tool: ["sf"]
semver: ">=2.0.0"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**.
Trigger on requests like:
limit?" / "How many scratch orgs do I have left?"
"Enable scratch org snapshots" (Dev Hub sub-preferences).
Do **not** trigger this skill for:
`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.
`dx-org-trial-expiration-check`.
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.
> 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.
**`DevHubSettings.enableScratchOrgManagementPref`**. There is **no** `enableDevHub` field and **no** dedicated `sf` command to turn it on — deploying this setting is exactly what the Setup toggle does.
Administrator** has these). A user without them gets `INSUFFICIENT_ACCESS`.
namespace**.
editions.
1. **CRITICAL:** Run the bundled helper script, which handles Dev Hub detection, the enablement deploy (with a safe dry-run default), allocation math, and structured output, and works on macOS and Linux. Always invoke it by **absolute path** from the skill directory — never `./scripts/`, which resolves against the user's current directory and will either run the wrong script or fail. The script self-checks this: if `$0` is not absolute it exits with a usage error, so pass the full path to `<skill_dir>` (the directory containing this SKILL.md).
bash "<skill_dir>/scripts/devhub.sh" <alias-or-username> # status: on? + allocation bash "<skill_dir>/scripts/devhub.sh" # default org (target-org) bash "<skill_dir>/scripts/devhub.sh" <org> --allocation # allocation only bash "<skill_dir>/scripts/devhub.sh" <org> --enable # validate enabling (dry run) bash "<skill_dir>/scripts/devhub.sh" <org> --enable --apply # actually enable (irreversible) bash "<skill_dir>/scripts/devhub.sh" <org> --list-scratch # list active scratch orgs bash "<skill_dir>/scripts/devhub.sh" <alias> --instance-url <url> -
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\",…
Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code…
Use this skill to diagnose and resolve what blocks a DevOps Center promotion of a work item's feature branch: Git merge conflicts and deployment failures.…
Use this skill to manage the full lifecycle of a DevOps Center pipeline — list all pipelines, get a single pipeline's details, create a new pipeline linked to…
Analyzes DevOps Center test failures and Code Analyzer violations in plain language — failure category, offending file/class/method/line, rule violated, fix…
Configures DevOps Center pipeline testing infrastructure: enables a test provider so its suites become available, re-syncs a configured provider to pull in new…