skills/mine/golang-master/SKILL.md
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.
npx skillsauth add pedronauck/skills golang-masterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Non-negotiables for every line of Go, regardless of branch:
_.fmt.Errorf("context: %w", err) and are matched with errors.Is/errors.As — never by string comparison.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.panic is reserved for impossible states; expected failures return errors.| When the task involves… | Read |
| --- | --- |
| Creating, wrapping, matching, logging, or joining errors; panic/recover policy | references/errors.md |
| Goroutines, channels, select, sync primitives, errgroup, worker pools, races | references/concurrency.md |
| Cancellation, timeouts, deadlines, context values, detached background work | references/context.md |
| Nil traps, append aliasing, map access, numeric conversion, defer-in-loop, zero values | references/safety.md |
| Designing structs, interfaces, embedding, receivers, field tags, generics | references/interfaces-generics.md |
| Naming anything, control-flow shape, constructors, functional options, init() | references/style-naming.md |
| Writing or reviewing tests, benchmarks, fuzzing, integration build tags | references/testing.md |
| Profiling, allocation hunting, GC tuning, benchmark comparison | references/performance.md |
| Old-style patterns, deprecated APIs, Go version upgrades | references/modernize.md |
| New module, directory layout, cmd/internal/pkg, workspaces | references/layout.md |
Concurrency work that cancels anything reads both concurrency.md and context.md. A review reads the relevant sections needed to assess the changed behavior.
Investigate these signals when they occur in the changed path; they are not categorical defects:
ctx.Done(), channel close, or WaitGroup path — it outlives its caller.time.After inside a loop — a timer allocation per iteration; use time.NewTimer + Reset.!= nil.append result kept alongside the original slice — shared backing array, silent co-mutation.defer inside a loop body — resources accumulate until function exit; extract the body.any where a type parameter or concrete type is known.testing
Assess DDD fit; discover domains with EventStorming, define language and bounded contexts, and design aggregates, value objects, events, and repositories. Excludes architecture-only audits, product specs, and CQRS/Event Sourcing catalogs.
development
Build terminal UIs with ratatui following 2026 Rust best practices. Use when: (1) Creating new TUI apps, (2) Adding widgets/layouts, (3) Keyboard navigation/state management, (4) Image integration via ratatui-image, (5) Async event handling, (6) Release optimization. Covers v0.30.0+ API, Elm Architecture, StatefulWidget, color-eyre.
development
Find 10x product opportunities and high-leverage improvements. Use when user wants strategic product thinking, mentions '10x', wants to find high-impact features, or says 'what would make this 10x better', 'product strategy', or 'what should we build next'.
development
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.