cxuu/golang-skills▌
16 approved skills in this repository
go-code-review
Backend
Systematic Go code review against community style standards and best practices. \n \n Covers 15+ review categories: formatting, documentation, error handling, naming, concurrency, interfaces, data structures, security, declarations, functions, style, logging, imports, generics, and testing \n Includes automated pre-review checks via gofmt , go vet , and golangci-lint to catch mechanical issues before manual review \n Organizes findings by severity (must-fix, should-fix, nit) using a consistent t
go-data-structures
Backend
When this skill does NOT apply: For concurrent access to data structures (mutexes, atomic operations), see go-concurrency. For defensive copying at API boundaries, see go-defensive. For pre-sizing capacity for performance, see go-performance.
go-context
Backend
Functions that use a Context should accept it as their first parameter:
go-packages
Backend
When this skill does NOT apply: For naming individual identifiers within a package, see go-naming. For organizing functions within a single file, see go-functions. For configuring linters that enforce import rules, see go-linting.
go-functional-options
Backend
Functional options is a pattern where you declare an opaque Option type that records information in an internal struct. The constructor accepts a variadic number of these options and applies them to configure the result.
go-control-flow
Backend
Read references/SWITCH-PATTERNS.md when using switch statements, type switches, or break with labels
go-defensive
Backend
When hardening code at API boundaries, check in this order:
go-error-handling
Backend
In Go, errors are values — they are created by code and consumed by code.
go-performance
Backend
Performance-specific guidelines apply only to the hot path. Don't prematurely optimize—focus these patterns where they matter most.
go-concurrency
Backend
Normative: When you spawn goroutines, make it clear when or whether they exit.
go-naming
Backend
Names should:
go-testing
Backend
Normative: Test failures must be diagnosable without reading the test source.
go-linting
Backend
More important than any "blessed" set of linters: lint consistently across a codebase.
go-style-core
Backend
When writing readable Go code, apply these principles in order of importance:
go-documentation
Backend
See assets/doc-template.go when writing doc comments for a new package or exported type and need a complete reference of all documentation conventions.
go-interfaces
Backend
Interfaces belong in the package that consumes values, not the package that implements them. Return concrete (usually pointer or struct) types from constructors so new methods can be added without refactoring.