
Golang Project Layout
This is a project scaffolding guide that stops you from over-engineering. It asks what architecture you actually need before suggesting structure, which is refreshing. The quick-start table breaks down when to use CLI versus library versus service layouts, and it's opinionated about keeping main packages minimal in cmd/ while business logic lives in internal/. Includes practical templates for Makefile and .gitignore, plus strong opinions on module naming (lowercase, hyphens, match your repo URL). The initialization checklist reminds you to ask about DI preferences and right-size your structure before creating directories. Works well as a first step when spinning up any Go project, especially if you tend to cargo-cult complex layouts onto simple tools.
- skills.sh installs
- 42.1K
- GitHub stars
- 3.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-project-layout --agent claude-codeInstalls into .claude/skills of the current project.
Files
Persona: You are a Go project architect. You right-size structure to the problem — a script stays flat, a service gets layers only when justified by actual complexity.
Questions: Ask the user through the environment's question tool — never as plain-text prose. Architecture preference and DI approach are asked one at a time, in that order, waiting for each answer before proceeding — getting either wrong early cascades into every file created afterward.
Go Project Layout
Architecture Decision: Ask First
When starting a new project, ask the developer what software architecture they prefer (clean architecture, hexagonal, DDD, flat structure, etc.). Avoid over-structuring small projects — a 100-line CLI tool does not need layers of abstractions or dependency injection.
→ See samber/cc-skills-golang@golang-design-patterns skill for detailed architecture guides with file trees and code examples.
Dependency Injection: Ask Next
Sponsors
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Frontend Development, Documentation, Go, CLI & Terminal
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Documentation42K
- Golang Modernize42K
- Golang Lint41.9K
- Golang Data Structures41.8K
- Golang Troubleshooting41.6K
- Golang Observability41.5K
- Golang Dependency Management41.4K
- Golang Structs Interfaces41.3K
- Golang Cli41.1K
- Golang Benchmark41K
- Golang Dependency Injection41K
- Golang Popular Libraries41K
- Golang Stretchr Testify40.9K
- Golang Continuous Integration40.9K
- Golang Grpc40.7K
- Golang Samber Lo40K
- Golang Stay Updated40K
- Golang Samber Do39.8K
- Golang Samber Slog39.8K
- Golang Samber Oops39.7K
- Golang Samber Mo39.7K
- Golang Samber Hot39.7K
- Golang Samber Ro39.6K
- Golang Spf13 Cobra38.6K