cmd-internal-refactor

Relocates bounded Go command domains from cmd/gormes to internal paths without behavior change.

9|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/TrebuchetDynamics/gormes-agent --skill cmd-internal-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cmd-internal-refactor
Source: https://github.com/TrebuchetDynamics/gormes-agent/tree/main/development-skills/cmd-internal-refactor
Command: npx skills add https://github.com/TrebuchetDynamics/gormes-agent --skill cmd-internal-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Move one bounded cmd/gormes command domain out of root files toward root main.go only. Use when thinning cmd/gormes, burning down loose root files, or preserving CLI behavior during cmd refactors.

Core Features & Use Cases

  • Consolidates a single bounded domain under the internal app structure to simplify root CLI wiring.
  • Preserves the existing command interface while relocating Cobra wiring to the CLI facade and behavior to domain-specific packages.
  • Facilitates maintainability and clearer separation between root wiring and domain logic.

Quick Start

Move exactly one bounded cmd/gormes command domain from root files into the new structured topology and ensure CLI behavior remains unchanged.

Frequently Asked Questions about cmd-internal-refactor

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

FAQPage Schema
How do I refactor a Golang CLI to move command domains into internal packages?

Refactoring a Golang CLI involves relocating bounded command domains from root files into internal/app paths while preserving command behavior. This thins the root Cobra surface area, moving wiring to internal facades and behavior to domain-specific packages for better maintainability.

What is the best way to thin out a large Cobra command structure in Go?

The best way to thin a large Cobra command structure is to move bounded domains out of root files into a standardized internal topology. This keeps main.go as an executable shim, places CLI wiring in internal platform paths, and isolates domain logic in internal app packages.

Does refactoring Go CLI commands into internal paths change application behavior?

Refactoring Go CLI commands into internal paths does not change application behavior. The reorganization strictly relocates Cobra wiring and domain logic to internal packages, preserving the existing command interface and execution flow throughout the process.

When do I need to restructure my Golang CLI architecture to use internal domain boundaries?

You need to restructure your Golang CLI architecture when the root command surface area becomes too complex to maintain. Moving bounded domains to internal paths standardizes boundaries, reduces root file clutter, and improves long-term code maintainability.