v0.x-to-binary-shared

Migrate multi-service Forge projects to a shared binary with cobra subcommands.

4|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/reliant-labs/forge --skill v0-x-to-binary-shared
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: v0.x-to-binary-shared
Source: https://github.com/reliant-labs/forge/tree/main/internal/templates/project/skills/forge/migration/v0.x-to-binary-shared
Command: npx skills add https://github.com/reliant-labs/forge --skill v0-x-to-binary-shared

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams migrate a multi-service Forge project from building one image per service to building a single shared Go binary with cobra subcommands, reducing CI/deploy time and improving operational consistency.

Core Features & Use Cases

  • Shared-binary migration guidance: Explains how to switch Forge project shape by opting into binary: shared in forge.yaml and regenerating tier-1 artifacts.
  • Runtime boot optimization: Updates BootstrapOnly behavior so starting the shared binary with a specific subcommand constructs only that service’s dependency graph.
  • KCL deploy model update: Replaces per-service Application blocks with a MultiServiceApplication shape that references one shared image while preserving per-service Deployment/Service/RBAC scope.

Quick Start

Use this skill to migrate your project by updating forge.yaml to set binary: shared and then running forge generate to rewrite the shared-binary entrypoints and deploy manifests.

Frequently Asked Questions about v0.x-to-binary-shared

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I consolidate multiple Docker image builds in a Forge project into a single shared binary?

To consolidate multi-service Docker image builds in a Forge project, opt into binary: shared in your forge.yaml file and run forge generate to rewrite the shared-binary entrypoints and deploy manifests. This reduces CI image build and push time by producing one shared image.

What is a MultiServiceApplication KCL deploy shape and when do I need it?

A MultiServiceApplication KCL deploy shape replaces per-service Application blocks by referencing one shared Docker image while preserving per-service Deployment, Service, and RBAC scope. You need it when migrating to a shared binary model with 3 or more services.

Can I use cobra subcommands to boot only one service from a shared Go binary?

Yes, you can use cobra subcommands to boot a specific service from a shared Go binary. The migration updates BootstrapOnly behavior so starting with a specific subcommand constructs only that service’s dependency graph, optimizing runtime boot.

Does migrating to a shared binary model work for projects with near-identical Application blocks?

Migrating to a shared binary model works well for Forge projects with 3 or more services, shared internal libraries, and deploy manifests containing many near-identical Application blocks where CI image build dominates cycle time. Validate that one distinct Docker image is produced.

What are the limitations of switching a Forge project to a shared binary deployment?

Switching a Forge project to a shared binary deployment requires explicit opt-in via forge.yaml and regeneration with forge generate. You must validate that exactly one distinct Docker image is referenced and N deployments are produced to ensure operational consistency.