greenfield-go-stacklisted
Install: claude install-skill lawzava/megapowers
# Greenfield Go Stack
Scope: greenfield Go repositories and projects with `go.mod`.
For a non-trivial new project, run megapowers:brainstorming and
megapowers:writing-plans first (if installed) — this skill supplies the stack,
not the process.
One predictable, opinionated, secure-by-default stack for new Go projects.
**Pick only the layers the project needs from the fixed menu below — do not
substitute unfamiliar libraries for these defaults.** Performance and security
come from the baseline middleware and minimal images, not bolted on later.
## Core principles
- **SSR by default** — templ + templui. Add client JS only where SSR genuinely
can't do it (HTMX-style partials before reaching for a SPA).
- **gRPC for internal/service-to-service APIs**, HTTP (Fiber) for the
browser-facing edge. Prefer gRPC over hand-rolled REST between services.
- **Pure-Go everything** so binaries stay static (CGO off → tiny, secure Wolfi
images, no glibc).
- **Consult current official docs before wiring each library** using the docs or
browser tools available in the active harness. Use Context7 if it is installed.
## The stack (fixed menu — include only what's needed)
| Layer | Default | Notes |
|---|---|---|
| Language / layout | Go + golang-standards/project-layout | `cmd/ internal/ pkg/` |
| Web edge | GoFiber | fasthttp; SSR + REST |
| RPC | gRPC (grpc-go + buf) | internal & service-to-service |
| Templating | templ (`github.com/a-h/templ`) | typed, compiled SSR components |
| C