What problem does it solve?
This Skill prevents messy Go codebases by guiding you to choose the right project layout for the kind of application or library you are building, so code stays maintainable as it grows.
Core Features & Use Cases
- Right-sized Go layouts: Select between CLI tools, libraries, services, monorepos, and workspaces based on scope and ownership boundaries.
- Correct
cmd/ conventions: Keep all main packages inside cmd/{name}/ with minimal wiring logic, while placing business logic in internal/ or pkg/ appropriately.
- Go module and package naming rules: Ensure
go.mod module paths match the repository URL and that packages are lowercase, singular, and aligned with directory names.
- Practical starter checklist: Cover initialization steps including
go mod init, gofmt, and adding standard root files like Makefile, .gitignore, and golangci-lint config.
- Testing and fixtures guidance: Co-locate
_test.go files with the code they test and use testdata/ for fixtures.
Quick Start
Ask an AI coding agent to organize your new Go project using the golang-project-layout Skill, tailored to your planned structure (CLI, service, or library) and constraints.