dx-packaging-convert-1gp-to-2gp-create
Installation
SKILL.md
Convert 1GP to 2GP
When to Use This Skill
Convert a managed-released 1GP package to 2GP with sf package convert when requested by an ISV. This workflow gathers and validates both Salesforce CLI org aliases, confirms the permanent Dev Hub association, runs conversion with --code-coverage, verifies the resulting 08c, 0Ho, 05i, and 04t records, and determines whether the converted beta version passed the code-coverage check required for promotion. After a successful conversion, it asks whether the customer wants to promote the verified version and, on an explicit yes, promotes and verifies it. It does not migrate subscriber orgs or finalize the irreversible Move-to-2GP development cutover.
Critical Constraints
Preconditions:
- The latest Salesforce CLI must be installed and the customer must be in a Salesforce DX project containing sfdx-project.json. (check:
SalesforceCliAndProjectAvailable) - The customer's Partner Business Org must have Dev Hub and second-generation managed packaging enabled, and its authenticated CLI alias must resolve successfully. (check:
DevHubOrgAuthenticated) - The 1GP packaging org must be authenticated with Salesforce CLI and its alias must resolve successfully. The namespace of the 1GP package must be linked to the selected Dev Hub. (check:
PackagingOrgAuthenticatedAndNamespaceLinked) - The source package must have at least one managed-released 1GP version. Source API-version eligibility is evaluated by the conversion command and is handled only if Salesforce returns that error. (check:
ManagedReleasedPackageVersionEligible) - The customer must choose either an installation key or installation-key bypass. Never ask the customer to paste an installation key into chat or store it in skill output. (check:
InstallationProtectionChoiceProvided)
Operational rules: