Command Palette

Search for a command to run...

Назад к скиллам
скилл № 21602

dx-packaging-push-upgrade-configure

Use this skill to plan, schedule, and monitor Salesforce package push upgrades from a Dev Hub. Finds subscriber orgs via the PackageSubscriber object…

БесплатноБез исполняемых скриптов
forcedotcomот forcedotcom★ 1 200 звёзд на GitHub

Установить dx-packaging-push-upgrade-configure в Claude Code и Claude Desktop

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

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

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

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

Plan and drive a Salesforce package push upgrade end-to-end: find subscriber orgs, resolve the target version, batch a schedule per best practices, generate the org CSV, run the sf CLI push-upgrade commands after explicit confirmation, and monitor the results.

Push upgrades change a package in the customer's org without their action. This is outward-facing and hard to reverse. The default posture of this skill is generate → preview → confirm → run: never call push-upgrade schedule or push-upgrade abort until the user has seen the batch plan and the org list and said go. See references/best-practices.md before scheduling anything to production.

Inputs

Gather these from the user's request; parse identifiers loosely wherever they appear:

  • A token starting with 033 → the package ID (MetadataPackageId for queries, --package for list).
  • A token starting with 04t → the target package version ID (--package for schedule).
  • A token starting with 0DV → an existing push request ID (jump straight to Phase 5, monitoring).
  • A Dev Hub alias or username → the org the push-upgrade objects and commands run against.

If the Dev Hub is not given, assume the default Dev Hub owns the package and verify by querying rather than prompting up front:

  1. Read the default from sf config get target-dev-hub --json. If none is set, skip to step 3.
  2. Probe that hub for the package — reuse Phase 1's resolution query against the given 033/04t (or SELECT Id, Name FROM MetadataPackage if only a name is known). If it returns the package, you've confirmed ownership and done Phase 1 in one step — proceed, naming the resolved Dev Hub.
  3. Only if the probe fails (no matching rows, or an auth/permission error), fall back to asking: run sf org list --json and ask the user which Dev Hub owns the package, then re-probe.

This keeps the happy path unattended while still catching a wrong/empty hub before any subscriber query or plan. Push upgrade objects and commands run against the Dev Hub / package-owning org, not a subscriber org.


Phase 0 — Confirm scope and prerequisites

Establish these before doing anything else; ask only for what you can't infer:

  1. Package type — 2GP managed, unlocked, or a 1GP→2GP migration (--migrate-to-2gp).
    • 2GP managed push upgrades require the package to have passed AppExchange security review, and the feature must be enabled via a Salesforce Partner Support case. Unlocked packages have push upgrades enabled by default.
  2. Dev Hub is authenticated — sf org display --target-org <devhub> --json. If it fails, tell the user to run sf org login web --alias <devhub> and wait.
  3. Permission — scheduling needs the Create and Update Second-Generation Packages user permission on the Dev Hub. If a later command fails with an auth/permission error, surface that as the likely cause.

Do not assume security-review/enablement status — if the user hasn't confirmed it, note it as a prerequisite they must verify, and continue building the plan (it's still valid).


Phase 1 — Resolve the package and target version

Goal: end with a confirmed 033 package ID and a 04t target version ID that is a valid push target.

If the Dev Hub was resolved via the default-hub probe in Inputs above, that probe already ran this resolution query — you may already have the package/version in hand. Don't re-query; pick up at validation (step 2).

  1. If only the 04t is known, resolve its package and version number:
    sf data query --target-org <devhub> \
      --query "SELECT Id, MetadataPackageId, Name, MajorVersion, MinorVersion, PatchVersion, BuildNumber, ReleaseState, IsDeprecated FROM MetadataPackageVersion WHERE Id = '<04t>'"
    
  2. Validate the target version is a legal push target:
    • ReleaseState = Released (not Beta) and IsDeprecated = false. The CLI requires an active, non-beta version.
    • It must be higher than the versions subscribers currently run (Phase 2 confirms this).
    • Push upgrades follow the same manageability rules as customer-initiated upgrades — you can't push a change a normal upgrade couldn't make (e.g. deleting components, deprecated-then-removed).
  3. If the user only gave a 033, list candidate versions so they can pick the target:
    sf data query --target-org <devhub> \
      --query "SELECT Id, Name, MajorVersion, MinorVersion, PatchVersion, BuildNumber, ReleaseState FROM MetadataPackageVersion WHERE MetadataPackageId = '<033>' AND ReleaseState = 'Released' ORDER BY MajorVersion DESC, MinorVersion DESC, PatchVersion DESC, BuildNumber DESC"
    

See references/objects.md for full field lists.


Phase 2 — Find subscriber orgs (PackageSubscriber)

Query PackageSubscriber on the Dev Hub / License Management Org to discover who has the package installed and at what version. OrgKey is the org

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

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

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

Без ограничений — скилл может использовать любой инструмент.

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

  • README.md
  • references/best-practices.md
  • references/cli-reference.md
  • references/objects.md
  • references/soql-recipes.md

FAQ

Что делает скилл dx-packaging-push-upgrade-configure?

Use this skill to plan, schedule, and monitor Salesforce package push upgrades from a Dev Hub. Finds subscriber orgs via the PackageSubscriber object, resolves and validates the target package version, builds a best-practice batched schedule (pilot sandboxes, then staggered off-peak production batches), generates the per-batch org-ID CSV, and — only after explicit confirmation — runs the sf package push-upgrade CLI commands, then monitors PackagePushRequest, PackagePushJob, and PackagePushError. Supports 2GP managed, unlocked, and 1GP-to-2GP push migrations. TRIGGER when the user wants to push a package upgrade to subscribers, find who has a package installed and at what version, batch a rollout by region, or schedule, monitor, or abort a push upgrade. DO NOT TRIGGER for post-install configuration of an installed package (use dx-pkg-post-install-configure), creating or versioning a package, or installing a package into one org.

Как установить скилл dx-packaging-push-upgrade-configure?

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

Скилл dx-packaging-push-upgrade-configure запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить dx-packaging-push-upgrade-configure с