facta-dev/beautiful-go
Write, review, port, and enforce idiomatic Go: three skills distilled from Effective Go, the Go Code Review Comments wiki, the Google Go Style Guide, Go Concurrency Patterns, and the facta backend-go handbook, plus a drop-in golangci-lint v2 config with the depguard architecture law.
Write idiomatic Go on the hexagonal, vertical-slice stack. Use this skill whenever you write, refactor, debug, or explain Go code: new packages, files, functions, structs, interfaces, error types, goroutines, channels, context, generics, go.mod, or table-driven tests. Trigger on any mention of Go, golang, .go files, gofmt, go vet, golangci-lint, pgx, pgxpool, sqlc, golang-migrate, goose, river, chi, wire, redis, validator, slog, net/http, ServeMux, context, goroutines, or channels, even when the user does not say "best practices" or "idiomatic" code. Synthesized from Effective Go, the Go Code Review Comments wiki, the Google Go Style Guide, Rob Pike's Go Concurrency Patterns, and the backend-go handbook. For auditing existing code use go-review; for translating C, Python, or JavaScript into Go use go-port.
Port code from C, C++, Python, Java, JavaScript, TypeScript, Rust, or legacy Go into idiomatic Go that keeps the original behavior: error values instead of error codes and exceptions, nil instead of NULL, slices instead of pointer arithmetic, context.Context instead of sleeps and torn-down threads, and table-driven tests that prove the port matches. Use this whenever the user asks to port, translate, convert, migrate, or rewrite code in Go ("rewrite this in Go", "what would this look like in Go", "move this module to Go"), or to modernize old Go — even if they don't say "port" — for .go files, go.mod, gofmt, go vet, and golangci-lint. Pairs with the go-best-practices skill, which covers the target code's style.
Review existing Go code for idiom, API design, error handling, concurrency, and hexagonal architecture, and produce a prioritized report where every finding cites the rule it breaks, its file:line location, and the smallest concrete fix. Use whenever the user asks to review, audit, critique, grade, check, or explain what is wrong with Go code - a .go file, a package, a module (go.mod), a diff, a pull request, or golangci-lint, go vet, or gofmt output - including pgx, sqlc, goose, chi, river, wire, redis, slog, net/http ServeMux, context, goroutines, channels, and table-driven tests, even when the user does not say "best practices". Pairs with the go-best-practices skill, which covers writing new Go code.