Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dx-org-devhub-configure

БесплатноЗапускает вложенные скриптыНе проверен

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)…

forcedotcomот forcedotcom★ 1 200 звёзд на GitHub

Об этом скилле

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.

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 enabling works (important)

  • The Dev Hub master switch is the deployable Metadata API field 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.
  • Enabling is irreversible — once on, Dev Hub cannot be turned off.
  • Requires a user with ModifyAllData or ModifyMetadata (a System Administrator has these). A user without them gets INSUFFICIENT_ACCESS.
  • Cannot be enabled in a sandbox, or in an org that has a registered 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.
  • Available in Developer, Enterprise, Performance, Unlimited, and trial editions — status and --allocation show the org's edition when known.

Steps

  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)
    bash "<skill_dir>/scripts/devhub.sh" <org> --allocation           # allocation + pre-flight warnings
    bash "<skill_dir>/scripts/devhub.sh" <org> --show-settings        # current DevHubSettings preferences
    bash "<skill_dir>/scripts/devhub.sh" --list-orgs                  # authenticated orgs (no org needed)
    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
    

    <skill_dir> is the absolute path to the directory containing this SKILL.md.

  2. For enablement, default to a dry run first. Run --enable (no --apply) to validate the deploy, then relay the result. Because enabling is irreversible, only run --enable --apply when the user has clearly asked to actually enable Dev H

Полный SKILL.md на GitHub

Установить dx-org-devhub-configure в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

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)

Вложенные файлы

examples/status-output.mdscripts/devhub.shscripts/test-devhub.sh

FAQ

Что делает скилл dx-org-devhub-configure?

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.

Как установить скилл dx-org-devhub-configure?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dx-org-devhub-configure запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить dx-org-devhub-configure с