Finalizes the irreversible Move-to-2GP cutover for a converted 1GP managed package via the packaging Connect API. Requires eligibility checks, subscriber migration testing, and three explicit affirmations.
Ships in sf-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Finalize the irreversible, one-way Move-to-2GP cutover for a converted 1GP managed package — afterward, new major/minor 1GP versions can NEVER be created. Use when an ISV admin asks to move a 1GP package to 2GP development. The agent dispatches the finalize directly via the packaging Connect API (POST /connect/packaging/package/{packageId}/finalize-move-to-2gp, shipped 266) after clearing the eligibility + conversion/subscriber-migration-testing gates and obtaining the three explicit affirmations the endpoint requires; it then wire-verifies the result against PackageConversion.EndDate (read-only Tooling exposure, shipped 264).
BACKEND / VERSIONING MECHANICS (relocated from the discover card — describe-only, never shown on the card):
/udd/AllPackage/viewAllPackage.apexp (any authenticated browser session to the packaging org reaches it), which hosts the "Move to Second-Generation Managed Packaging" dialog and its Proceed action. This remains the fallback for orgs on a pre-266 release.sf package1 version create nor via the major/minor upload flow on viewAllPackage.apexp; all new major/minor innovation must use 2GP via sf package version create. Customers running on prior 1GP versions are unaffected.sf package version create, so their absence immediately post-finalize is expected, not a failure signal (i.e. there is no Package2Version-based wire-verify; EndDate is the reliable signal). verify-finalize-by-user-confirmation remains available as an optional human cross-check but is no longer the only verification surface.sf-specific): only the 1GP DE (packaging) org is genuinely required — it backs the 266 Connect finalize endpoint, the read-only PackageConversion wire-verify (264), the 1GP-side eligibility query (MetadataPackageVersion), and the browser Setup page for the pre-266 fallback. Reachability can come from an sf alias OR any valid bearer token for the org (raw REST); the skill is not coupled to the sf CLI. The DevHub org (Package2 / Package2Version) is OPTIONAL — it only enables the proactive eligibility pre-check; when it is absent the finalize endpoint still validates eligibility server-side (a not-yet-converted/not-promoted package → 400), so the skill can proceed DevHub-less. This also sidesteps the multi-org-auth burden of skills that hard-require two authenticated orgs.Preconditions:
sf alias is the convenient way to authenticate, but the skill is NOT coupled to the sf CLI: any caller that can present a valid bearer token for this org (e.g. a raw REST call) works equally. The 1GP DE org hosts MetadataPackageVersion (the authoritative highest-Released 1GP version for the eligibility gate), is the org the finalize Connect API endpoint (266) runs against, hosts the read-only PackageConversion Tooling exposure (264) the wire-verify queries, and is the org the pre-266 manual browser fallback opens. (check: PackagingOrgAuthenticated)DevHubOrgAuthenticated)ConversionTestingComplete)sf package version retrieve --package 04tXXX --output-dir my-folder --target-dev-hub <devhub> to retrieve, then edits sfdx-project.json's versionName, versionNumber, and ancestorVersion. Retrieval needs the Download Package Version Zip Files user permission on the DevHub user; if retrieve fails with DeveloperUsePkgZipFieldUnavailableError, the user's DevHub admin must grant that permission (for example in a permission set) before retrying. This is preparatory work for ongoing 2GP development AFTER finalize, but the doc places it in the workflow sequence — the agent should remind the user. (check: PackageSourceRetrievedAndProjectFileUpdated)Operational rules:
sf CLI: an sf alias is convenient, but any valid bearer token for the org works for a raw REST call. Ask the user for the packaging-org alias (and, if they want the eligibility pre-check, the DevHub alias) at the start if not already provided; sf org list --json confirms what's authed. If the packaging org is missing, instruct the user to make it reachable (e.g. sf org login web --alias <name>) and wait. If only DevHub is missing you may still finalize — skip the DevHub-side eligibility queries and rely on the endpoint's server-side validation (a not-yet-converted/not-promoted package returns a 400 with a specific reason), and tell the user the proactive pre-check was skipped.
MULTI-ORG DISPATCH (read once, important): this workflow spans two orgs — the 1GP DE (packaging) org and the DevHub org. Each step's invocation block carries a target_org field naming which org the call must hit ({packaging_org_alias} vs {devhub_alias}); route each call to the org its target_org names rather than assuming a single org for the whole workflow. Route to the DevHub org: discover-package-on-devhub, check-eligibility-2gp-converted-released, and check-already-done. Route to the packaging org: check-eligibility-1gp-released, finalize-move-to-2gp, and verify-finalize-on-packaging-org (its PackageConversion query also runs before confirm-affirmations, with or without DevHub, on orgs at release 264 or later). If your execution channel can only reach one connected org at a time, run each off-target read-only step against the org named in its target_org before dispatching the finalize against the packaging org; a CLI-driven runner can map that routing onto its own tooling. A step sent to the wrong org returns empty or misleading results.
TWO ROOT INTENTS — pick by user phrasing.
INTENT A — "tell me how to move my package to 2GP" (planning /
education): walk the user through the full sequence —
discover-package-on-devhub → check-eligibility-1gp-released →
check-eligibility-2gp-converted-released → check-already-done →
remind-of-prerequisites (testing, source retrieval) → describe the finalize step (Connect API POST on 266+; the Setup dialog only for pre-266 orgs). Treat this as a planning
conversation, NOT a dispatch action.$(...) and backticks still run); if an alias contains a newline, ;, |, &, $, or a backtick, ask the customer to confirm or re-enter it (pkgA; sf org list is not shortened to pkgA). Never trim, split, extract a matching substring, or otherwise rewrite it to make it pass (e.g. 033xx0000004Fpd ; sf org list is rejected, not shortened to 033xx0000004Fpd); on mismatch, stop and ask for the exact value. Also check values returned by earlier steps before substituting them into later queries (package2_id must match the 0Ho Id pattern; MajorVersion / MinorVersion must be non-negative integers).Package2.ConvertedFromPackageId = '<1GP 033 Id>'. Never look it up by Package2.SubscriberPackageId — a converted Package2 has its own, different 033 SubscriberPackageId, so that query returns 0 rows.
READ COMMANDS: Package2, Package2Version, MetadataPackage, MetadataPackageVersion and PackageConversion are Tooling API objects; the standard API returns INVALID_TYPE for them. Every read uses sf data query --use-tooling-api. Run each step's exact Command from the operations reference, with the single-quoted alias and only Ids that already passed validation.
ID FORMAT CHECKS: an Id is valid if it is exactly 15 or 18 letters and digits and starts with its prefix. Count the characters with a tool when one is available rather than by eye, and give one final verdict: never say a value is invalid and then correct yourself in the same answer.
EARLY EXIT if EITHER (a) check-already-done returns ≥1 row (a Package2Version exists with ConvertedFromVersionId = NULL): the move-to-2GP has ALREADY been completed, or the package was 2GP-native to start with; OR (b) PackageConversion.EndDate on the packaging org is set. A finalize creates no native version, so ALWAYS run (b), the verify-finalize-on-packaging-org Tooling API query, before confirm-affirmations, even when (a) returns 0 rows or DevHub is not available. The one exception is an org on a release before 264, where the query fails with INVALID_TYPE because PackageConversion doesn't exist there (only when run with --use-tooling-api; without it the same error means the command is wrong): don't fix or retry it; rely on (a), which needs DevHub, and on the Setup page (before any affirmation, ask the user, as one question, whether the package detail page still shows the Move to 2GP button; if it doesn't, the move is done). If (b) returns 0 rows, this org has no conversion record for the package (not converted yet, or wrong packaging org): stop before the questions and route the user to the conversion process. If EndDate is set, the move is already done. Report this to the user and stop. Do NOT proceed to affirmations or finalize.
ELIGIBILITY GATING: if check-eligibility-1gp-released returns no Released 1GP version, OR if check-eligibility-2gp-converted-released returns no matching Released 2GP-converted version at the same major.minor.patch, or the highest Released 1GP version is a patch, the user is NOT eligible to Move to 2GP. Surface the specific missing piece and what to do — typically "you need to promote the converted 2GP version X.Y.Z (its 04t) to Released before you can move-to-2GP." If DevHub is not authenticated, skip the proactive 2GP eligibility query and rely on the endpoint's server-side validation instead — the finalize call returns a 400 with a specific reason (e.g. version mismatch) when the latest released version has not been converted + promoted; relay that message to the user.
RELEASE HISTORY (both milestones now shipped — describe-only, not an ongoing constraint): 264 shipped the read-only PackageConversion Tooling exposure, lighting up verify-finalize-on-packaging-org (EndDate-based wire-verify). 266 shipped the finalize Connect API — finalize-move-to-2gp now dispatches POST /services/data/v69.0/connect/packaging/package/{packageId}/finalize-move-to-2gp against the 1GP DE org (invocation.kind: rest, operationId finalizeMoveTo2gp, MCP-enabled). The endpoint requires the three affirmation flags (acknowledgedIrrevocable / acknowledgedTestingComplete / acknowledgedSourceRetrieved) all true in the request body, mirroring the Setup dialog's checkboxes — this is the load-bearing safety gate, so the confirm-affirmations step remains mandatory. For orgs still on a pre-266 release, the manual browser fallback applies.
Only the 1GP DE (packaging) org is required for the finalize dispatch + wire-verify. The DevHub org is optional — used only for the proactive eligibility pre-check; the endpoint validates eligibility server-side regardless.After every write operation, confirm the effect by re-reading state:
finalize-move-to-2gp: call verify-finalize-on-packaging-org directly (normal 266+ path) OR, on the pre-266 manual fallback, verify-finalize-by-user-confirmation, then verify-finalize-on-packaging-org only on release 264-265 (before 264 the user's report is the only verification).Read Operations reference before executing this workflow. It contains the original operation definitions, dependencies, inputs, and verification instructions.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
266 skills in this plugin
/afcc-setup-coordinateOrchestrates end-to-end headless setup of Agentforce Contact Center (AFCC) on a Salesforce org. Scans the org first, presents a delta plan for approval, then sequentially provisions demo users, Omni-Channel base settings, a human queue with routing config and members, presence statuses, permission sets, a PSTN voice number, and an active PstnVoice MessagingChannel wired to the queue. Interactive at key decision points — never assumes country, number type, queue names, or user counts. TRIGGER: set up AFCC, configure Agentforce Contact Center, stand up voice contact center, AFCC migration setup, provision AFCC org headlessly./agentforce-architecture-analyzeDeclared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable architecture document and Mermaid invocation graph from design-time metadata (not runtime audit rows). TRIGGER when user asks to describe, diagram, inventory, audit, document, or diff (e.g. v3 vs v5) the architecture / action tree / topic structure / tool inventory of a specific agent by agent API name in a specific org. DO NOT TRIGGER for runtime session traces, conversation transcripts, generation timings, or gateway audit chains — this skill reads design-time metadata only (use agentforce-d360-analyze for session traces)./sf-skills:dx-packaging-move-to-2gp-migratefrom sf-skills
sf-skills@sf-skills-plugin is listed by ccmalcom/sf-skills-plugin — review the source before installing
npx claudepluginhub ccmalcom/sf-skills-plugin --plugin sf-skillsOther plugins' skills for the same job