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★ 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 (MetadataPackageIdfor queries,--packageforlist). - A token starting with
04t→ the target package version ID (--packageforschedule). - 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:
- Read the default from
sf config get target-dev-hub --json. If none is set, skip to step 3. - Probe that hub for the package — reuse Phase 1's resolution query against the given
033/04t(orSELECT Id, Name FROM MetadataPackageif 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. - Only if the probe fails (no matching rows, or an auth/permission error), fall back to asking:
run
sf org list --jsonand 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:
- 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.
- Dev Hub is authenticated —
sf org display --target-org <devhub> --json. If it fails, tell the user to runsf org login web --alias <devhub>and wait. - 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).
- 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>'" - Validate the target version is a legal push target:
ReleaseState = Released(notBeta) andIsDeprecated = 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).
- 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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- 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), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…