Skip to content
Development
Skill

/dx-packaging-convert-1gp-to-2gp-create

Use this skill when users want to convert a managed-released 1GP package to a 2GP package with `sf package convert`, verify the converted package version and its code coverage, and optionally promote it to released. TRIGGER when: the user asks to convert a 1GP managed package to

From plugin
sf-skills
1.2k200 skills6 agents15 commands4 MCP

Claude Code

$ npx -y skills add forcedotcom/sf-skills --skill dx-packaging-convert-1gp-to-2gp-create --agent claude-code

SKILL.md

dx-packaging-convert-1gp-to-2gp-create.SKILL.md
name: dx-packaging-convert-1gp-to-2gp-create
description: "Use this skill when users want to convert a managed-released 1GP package to a 2GP package with `sf package convert`, verify the converted package version and its code coverage, and optionally promote it to released. TRIGGER when: the user asks to convert a 1GP managed package to 2GP, create a converted 2GP package version from a released 1GP version, check whether a converted version passed code coverage, or troubleshoot an `sf package convert` failure. DO NOT TRIGGER for: migrating subscriber orgs from 1GP to 2GP, finalizing the irreversible move to 2GP development (use dx-packaging-move-to-2gp-migrate), creating or promoting native 2GP package versions that were not converted from 1GP, or enabling Dev Hub (use dx-org-devhub-configure)."
metadata:
  relatedSkills:
  - dx-org-devhub-configure
  - dx-packaging-move-to-2gp-migrate
  version: "1.0.0"
  accessCheck: "UserPermissions.CreatePackaging"
  cliTools:
  - tool:
    - "sf"
    semver: ">=2.0.0"
  domains:
  - "Developer Experience"

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:**

  • CONVERSATION RULE: ask exactly one question per turn and wait for the customer's answer before asking the next question. Never combine a confirmation, a command request, and a list of additional inputs in one message. When the customer must run a command, provide only that command and ask for its sanitized result; continue after they respond.

Start with collect-conversion-details and gather only the identity and package inputs sequentially: Dev Hub alias, 1GP packaging-org alias, 033 package ID, and package namespace. Do not ask about project, version mode, installation protection, wait time, definition file, seed metadata, unpackaged metadata, or apexTestAccess yet. Then run validate-salesforce-cli → validate-devhub-alias → validate-packaging-org-alias → validate-source-package → collect-conversion-options → validate-project-and-namespace → collect-conversion-settings → confirm-conversion-preflight → convert-package → verify-conversion-request → verify-code-coverage. After an explicit yes to the promotion question, continue to promote-converted-version → verify-promoted-version. OPTION QUESTIONS: after identifying the package and released source version, ask every configurable option separately, exactly one question per turn. Show that question's default in brackets and accept either a specific answer or the word `default`. A `default` response applies only to the current question; never apply a bundle of defaults or skip later questions. Ask separately for: source version, DX project, installation protection, wait time, definition file changes, seed-metadata availability, unpackaged-metadata availability, and apexTestAccess permission sets. Ask for a seed-metadata directory path only when the customer says seed metadata exists, and for an unpackaged-metadata directory path only when the customer says packaged Apex tests need unpackaged metadata. The option defaults are latest released major.minor; create a new `<namespace>-conversion` project in the current working directory; installation-key bypass; wait 20 minutes; no changes to the project's default definition file; no seed metadata; no unpackaged metadata; and no apexTestAccess permission sets. Before creating a project, state the exact target path. Never silently reuse an existing project from an earlier conversation or run. The permanent Dev Hub association has no default and must be confirmed separately. Do not ask the customer which API version created the source 1GP version. PROJECT DEFINITION FILE: create or validate the selected DX project before asking the remaining conversion-setting questions. Resolve and show the exact `<project-directory>/config/project-scratch-def.json` path and its current non-secret contents. Then ask: "Would you like to add or update anything in this definition file for conversion? [default: no changes]" Do not ask the customer to provide a definition-file path. Include `--definition-file` only when the customer confirms the file is required for conversion. SEED METADATA: first ask: "Do you have seed metadata to include in the conve

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-convert-1gp-to-2gp-create.

Which coding agents can use dx-packaging-convert-1gp-to-2gp-create?
dx-packaging-convert-1gp-to-2gp-create 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.