agentforce-architectur…
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
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
Claude Code
$ npx -y skills add forcedotcom/sf-skills --skill dx-org-devhub-configure --agent claude-code
Codex
$ npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -a codex -y
Cursor
$ npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -a cursor -y
Gemini CLI
$ npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -a gemini-cli -y
GitHub Copilot
$ npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -a github-copilot -y
OpenCode
$ npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -a opencode -y
Windsurf
$ npx skills add forcedotcom/sf-skills --skill dx-org-devhub-configure -a windsurf -y
name: dx-org-devhub-configure
description: "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."
allowed-tools: Read, Bash(bash), Bash(sf api request rest), Bash(sf data query), Bash(sf org list), Bash(sf project deploy), Bash(sf config get), Bash(sf org display), Bash(sf org open), Bash(jq)
metadata:
version: "1.1"
domains: ["Developer Experience"]
# DevHubSettings metadata + the Tooling API DevHubSettings endpoint require
# DevHubSettings base fields need API 47.0+, but enableShapeExportPref needs
# 55.0+ and enableScratchOrgSnapshotPref needs 61.0+, so the script reads and
# deploys at 62.0 (see scripts/devhub.sh SETTINGS_API_VERSION).
minApiVersion: "62.0"
# 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: "UserPermissions.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, 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**.
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.
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**. The script checks the org's edition/sandbox facts before an `--enable --apply` and refuses (no deploy attempted) if the target is a sandbox; there's no reliable CLI signal for a registered namespace, so that stays a documented caveat rather than an enforced check.
editions — `status` and `--allocation` show the org's edition when known.
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? + edition + allocation bash "<skill_dir>/scripts/devhub.sh" # default org (target-org
This repository provides Salesforce agent skills, plugins, and sample apps for building applications.
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec…
Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific…
Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates,…
Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…
Use to design an AI agent persona — identity, voice, tone, behavioral style, guardrails — and encode it into Agent Script (.agent…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.