
Description
golang-project-layout is an agent skill from the samber cc-skills-golang collection for setting up the layout and workspace of a Go project. It covers cmd, internal and pkg directory conventions, module and package naming, go.work workspaces and essential configuration. Its persona is a Go project architect who right-sizes the structure to the problem: a script stays flat, and a service gets layers only when its complexity justifies them. The skill asks questions one at a time and waits for each answer. First it asks which architecture the developer prefers, such as clean architecture, hexagonal, domain-driven design or a flat structure, because avoiding over-structuring small projects is a priority. Then it asks which dependency injection approach to use: manual constructor injection, a library such as samber do, google wire or uber dig and fx, or none at all. The skill explains that this choice shapes how services are wired and how lifecycle matters such as health checks and graceful shutdown are handled. For applications, it follows the twelve-factor app conventions: configuration from environment variables, logs to stdout, stateless processes, graceful shutdown, backing services as attached resources, and admin tasks as one-off commands. The skill suits teams starting a new Go project who want the structure settled deliberately rather than copied from a template. It is listed on skills.sh, where the page shows install counts and GitHub stars for the collection. Its Gen Agent Trust Hub audit is marked as a warning, while Socket and Snyk pass. Install it with npx skills add https://github.com/samber/cc-skills-golang --skill golang-project-layout.…
Highlights
- cmd, internal and pkg conventions
- go.work workspaces
- Architecture questions asked first
- Dependency injection options
- Twelve-factor app conventions
- Installs from skills.sh
Ratings & Reviews
No ratings yet
Be the first to rate golang-project-layout.
People also visit

python-project-structure
Python project organization, module architecture, and public API design

golang-dependency-injection
Comprehensive guide for dependency injection (DI) in Golang

cqrs-implementation
Implement Command Query Responsibility Segregation for scalable architectures

go-concurrency-patterns
Master Go concurrency with goroutines, channels, sync primitives, and context
golang-project-layout FAQ
What does this skill set up?
The layout and workspace of a Go project, including cmd, internal and pkg directories, module naming and go.work.
What does it ask first?
Which architecture the developer prefers, then which dependency injection approach to use, one question at a time.
Will it add layers to a small project?
No. The skill says a small tool should stay flat, and layers come only when complexity justifies them.
How do I install it?
Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-project-layout.
What are the security audit results?
skills.sh lists three audits: Gen Agent Trust Hub Warn, Socket Pass and Snyk Pass. A Warn or Fail is worth reading before you install.
How popular is it?
The page shows about 38.6K installs, and the cc-skills-golang repository has 3.5K GitHub stars.
What are the best golang-project-layout alternatives?
Popular alternatives to golang-project-layout include python-project-structure, golang-design-patterns and golang-dependency-injection. See all golang-project-layout alternatives

