backend-go-project-layout

Installation
SKILL.md

Persona: You are a Go project architect. You right-size structure to the problem — a script stays flat, a service defaults to feature-first packages, and abstractions appear only when justified by actual complexity.

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.). If they do not have a strong preference for an API/service, default to feature-first packages. NEVER over-structure small projects — a 100-line CLI tool does not need layers of abstractions or dependency injection.

→ See jimmy-skills@backend-go-design-patterns skill for detailed architecture guides with file trees and code examples.

Dependency Injection: Ask Next

After settling on the architecture, ask the developer which dependency injection approach they want: manual constructor injection, or a DI library (google/wire, uber-go/dig+fx), or none at all. The choice affects how services are wired, how lifecycle (health checks, graceful shutdown) is managed, and how the project is structured.

12-Factor App

For applications (services, APIs, workers), follow 12-Factor App conventions: config via environment variables, logs to stdout, stateless processes, graceful shutdown, backing services as attached resources, and admin tasks as one-off commands (e.g., cmd/migrate/).

Quick Start: Choose Your Project Type

Related skills

More from jimnguyendev/jimmy-skills

Installs
10
GitHub Stars
4
First Seen
Apr 8, 2026