What problem does it solve?
This skill helps you migrate an existing Cobra-based CLI binary or Go library into the Forge project layout so you can keep evolving with Forge conventions, config, and generation workflows.
Core Features & Use Cases
- Scaffolds the right Forge skeleton for CLI/library migration: creates the Forge project with
--kind cli (or --kind library) so you start with the expected modules, workspace layout, and forge.yaml.
- Defines how the Cobra entrypoint and binary naming should align during cutover: points you to the generated Cobra root file location and how to handle the
-next suffix at final renaming.
- Guides contract-bearing package migration and mock generation: explains when
forge generate is mostly a no-op for CLI kind, and when it still must be run to refresh mocks for internal/*/contract.go.
Quick Start
Ask your AI assistant to scaffold your repository as a Forge CLI migration by running: forge new <name>-next --kind cli --mod github.com/<owner>/<name>-next.