Skip to content
Development
Skill

/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

From plugin
sf-skills
1.2k200 skills6 agents15 commands4 MCP

Claude Code

$ npx -y skills add forcedotcom/sf-skills --skill dx-packaging-push-upgrade-configure --agent claude-code

SKILL.md

dx-packaging-push-upgrade-configure.SKILL.md
name: dx-packaging-push-upgrade-configure
description: "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."
metadata:
  version: "1.0"
  domains: ["Developer Experience"]
  relatedSkills:
    - "dx-pkg-post-install-configure"
  cliTools:
    - tool: ["sf"]
      semver: ">=2.0.0"
  accessCheck: "UserPermissions.PermissionsPackaging2"

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`

Read more
@forcedotcom
Ships withsf-skills

This repository provides Salesforce agent skills, plugins, and sample apps for building applications.

1.2k200 skills6 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.2k
Star history of forcedotcom/sf-skills on GitHub, a chart by star-history.com

Other skills on sf-skills.

agentforce-observe

agentforce-observe

Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about dx-packaging-push-upgrade-configure.

Which coding agents can use dx-packaging-push-upgrade-configure?
dx-packaging-push-upgrade-configure installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.