golang-mastery-skill_skill

This skill helps architects and developers apply senior Go playbooks to design, review, test, and productionize services for reliability and security.
  • Python

2

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill modra40/claude-codex-skills-directory --skill golang-mastery-skill

  • SKILL.md7.9 KB

Overview

This skill is a principal/senior-level Go (Golang) playbook that guides architecture, idiomatic code, concurrency, testing, performance, security, observability, and production readiness. It favors small, reviewable changes, standard-library-first choices, and concrete validation steps to move code from “works locally” to “survives production.” It focuses on clear tradeoffs, operability, and low operational cost.

How this skill works

The skill inspects design and implementation tradeoffs, enforces default Go standards (package cohesion, minimal exported APIs, context propagation), and provides concrete workflows for features, refactors, and bugs. It supplies validation commands (formatting, tests, race detector, benchmarks, linters, vuln checks), recommended project layouts, tooling defaults, and production checklists for timeouts, shutdown, logging, metrics, and security.

When to use it

  • Designing services, APIs, CLIs, and package boundaries
  • Planning or executing large refactors and API stabilizations
  • Running or preparing code reviews for production readiness
  • Debugging races, memory leaks, or concurrency issues
  • Tuning performance or adding benchmarks and pprof workflows
  • Hardening security, observability, and release pipelines before shipping

Best practices

  • Confirm goal, scope, constraints, non-functional requirements, and definition of done before coding
  • Prefer stdlib and minimal dependencies; add libraries only when constraints justify them
  • Keep packages cohesive and export only what consumers need; avoid grab-bag util packages
  • Always accept context.Context at boundaries; handle cancellation and graceful shutdown
  • Return errors and wrap with %w; log once at the boundary, don’t log-and-return
  • Validate with gofmt, go test(-race), bench/benchmem, linters, and govulncheck when available

Example use cases

  • Sketch an HTTP service: define public API, package boundaries, timeouts, and health/metrics hooks before implementing a handler
  • Refactor a mixed util package into cohesive responsibilities, add tests and preserve stable public APIs
  • Investigate a data race: add targeted tests, run go test -race, and apply channel/mutex refactors with cancellation
  • Improve performance hotspot: add benchmarks, use pprof, eliminate allocations with builders/buffers where proven
  • Harden an outbound HTTP client: add timeouts, transport-level limits, SSRF allowlist, and correlated traces/logs

FAQ

Run gofmt, go vet, go test (and go test -race for concurrent code), bench if needed, golangci-lint when available, and govulncheck before release.

When should I add interfaces?

Prefer concrete types until you need to mock or swap implementations; introduce interfaces at consumer boundaries rather than preemptively.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational