What problem does it solve?
This Skill helps you organize Go code into clear, maintainable packages, with sane imports, minimal startup side effects, and project layouts that scale without becoming tangled.
Core Features & Use Cases
- Package Naming: Choose concrete package names that describe what the package provides, not vague catch-all names like util or common.
- Import Hygiene: Keep imports grouped correctly, handle renames sparingly, and avoid dot imports and most blank imports.
- Startup and Globals: Apply the run pattern, keep os.Exit and log.Fatal in main only, avoid unsafe init logic, and prefer dependency injection over mutable globals.
- Project Structure: Decide when to split or combine packages, and use cmd and internal layouts appropriately for libraries and multi-command tools.
- Use Case: A growing Go CLI can use this Skill to refactor a bloated package tree into a cleaner module with predictable startup behavior and testable boundaries.
Quick Start
Ask the skill to review your Go project structure, package names, imports, and main startup flow, then recommend the safest refactor plan.