Agent skill · software engineering · pedronauck
golang-master
Write or review production Go: errors, concurrency, context, types, generics, safety, tests, benchmarks, profiling, modernization, and module structure. Project/framework conventions and third-party API lookup have separate owners.
Why this skill is useful
Adds comprehensive Go engineering standards and practices, including error handling, concurrency patterns, and testing methodologies that are not commonly known.
What it needs
About 3k tokens when loaded. Last updated 2026-08-01. 564 stars on the source repository.
What this skill does
Golang Master Language-level doctrine for Go 1.21+ (1.22–1.26 features flagged inline) in any Go codebase. This skill is the generic floor; a project's own guidelines skill overrides it wherever the two conflict, and this skill owns everything the project leaves unsaid. Use the matching reference sections for a concrete Go concern. Reuse current context; do not load every reference merely because Go appears in the task. Project conventions and supported Go versions govern applicability. The floor Non-negotiables for every line of Go, regardless of branch: 1. Every error is handled or carries a written justification at the discard site — never a bare . 2. Errors wrap with fmt.Errorf("context: %w", err) and are matched with errors.Is/errors.As — never by string comparison. 3. ctx context.Context is the first parameter of any function that does I/O, blocks, or crosses an API boundary, and the caller's ctx is propagated — never a fresh context.Background() mid-path. 4. Every goroutine has an owner, an exit path, and a way to be waited on. 5. panic is reserved for impossible states; expected failures return errors. 6. Check uncertain type assertions. Initialize maps before writes; use nil/zero-value slices when their semantics fit the contract. 7. Use compile-time interface assertions for an intentional implementation contract; do not invent interfaces just to add an assertion. 8. Tests prove the owning invariant. Use tables for multiple cases and race checks for concurrency or when the project requires them. 9. Apply gofmt and the project's owning lint/test gates; reuse current evidence instead of running repository-wide vet for every edit. 10. Operational values (timeouts, limits, addresses) come from configuration or options — never hardcoded. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills pedronauck/golang-master