go_skill

This skill helps you implement idiomatic Go coding standards with explicit error handling, concurrency patterns, and thorough testing for production-ready code.
  • Python

13

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 williamzujkowski/standards --skill go

  • SKILL.md11.1 KB

Overview

This skill provides a production-ready set of Go coding standards focused on idiomatic patterns, robust error handling, safe concurrency, and modern tooling. It distills battle-tested practices used in real systems to help teams start projects quickly and maintain high code quality. Use it to enforce consistent style, testing, and performance practices across Go codebases.

How this skill works

The guide inspects and prescribes conventions for package layout, naming, error patterns, concurrency primitives, and testing strategies. It recommends concrete tools and commands (gofmt, goimports, golangci-lint, go test, go mod) and includes examples and templates for common patterns like worker pools, context-aware I/O, and buffer pools. Follow the checklists and templates to apply standards consistently in CI and local development.

When to use it

  • Bootstrapping a new Go service or CLI to enforce consistent structure from day one.
  • Hardening an existing codebase to follow idiomatic practices and reduce technical debt.
  • Creating CI pipelines that validate formatting, linting, tests, and coverage thresholds.
  • Onboarding engineers to shared conventions for naming, errors, and concurrency.
  • Preparing production releases that require robust testing, security checks, and performance tuning.

Best practices

  • Write idiomatic Go: short names in narrow scopes, MixedCaps for exported identifiers, simple abstractions.
  • Handle errors explicitly: wrap with context, use errors.Is/As, and avoid leaking internal details.
  • Design for cancellation: pass context.Context, set timeouts, and respect cancellations in goroutines.
  • Use table-driven tests and aim for >80% coverage; include benchmarks and edge-case tests.
  • Automate formatting and linting (gofmt, goimports, golangci-lint) and enforce via CI.
  • Keep secrets out of code, validate inputs, and run dependency vulnerability scans regularly.

Example use cases

  • Start a microservice repository with recommended package layout, Makefile, and linter config.
  • Implement an authentication service using interface-based repositories and clear sentinel errors.
  • Build a concurrent worker pool that respects context cancellation and returns results reliably.
  • Add table-driven unit tests and benchmarks for a performance-critical library.
  • Integrate linting, formatting, test coverage checks, and build steps into CI pipelines.

FAQ

No. It recommends a pragmatic layout (cmd/, internal/, pkg/) but encourages adapting structure to project size and domain.

How should I handle third-party dependencies?

Use go.mod with semantic versions, run go mod tidy regularly, and scan dependencies for vulnerabilities before production releases.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
go skill by williamzujkowski/standards | VeilStrat