agentleFS
bmcszkbmcszk/agent-skills/skills/go-dev/SKILL.md

go-dev

Skill1 starsChanged 2 months agoMITView on GitHub

Go development best practices, coding patterns, and code standards for production-ready Go applications. Use when writing new Go code, reviewing Go code, refactoring, implementing concurrency, or designing interfaces and generics. Covers inline interfaces, error handling, errgroup concurrency, generics, testing excellence. Keywords: go development, golang best practices, go code review, go concurrency, go generics, go interfaces.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

What I do

I enforce Go development best practices including:

  • Inline Interface Definition
  • Error handling standards
  • Concurrency patterns with errgroup
  • Interface design
  • Generics usage
  • Performance optimization
  • Testing excellence

When to use me

Use this skill when:

  • Writing new Go code
  • Reviewing Go code
  • Refactoring existing code
  • Implementing concurrent operations
  • Designing interfaces and generics

Related Skills

  • go-setup - Project initialization and library selection
  • go-fluent-testing - Unit/integration/E2E testing (fluent Given/When/Then)

References

Deep-dive topics are split into focused reference files:

  • Interfaces — Inline interface definition, small focused interfaces, functional options
  • Error Handling — Golden rules, wrapping, sentinel errors, multi-error handling
  • Concurrency — errgroup, worker pools, channel patterns
  • Generics — Type parameters, constraints, data structures, decision framework
  • Testing — Table-driven tests, mocks, benchmarks, fuzzing
  • Performance & Footguns — Pre-allocation, sync primitives, common pitfalls

Quick Reference Tables

Error Handling

✅ Do This❌ Never This
errors.Is(err, ErrX)err == ErrX
errors.As(err, &target)err.(*Type)
fmt.Errorf("...: %w", err)fmt.Errorf("...: %v", err)
errors.Join(errs...)Manual error collection

Concurrency

✅ Do This❌ Never This
errgroup.WithContext(ctx)Bare sync.WaitGroup
g.SetLimit(n)Unbounded goroutines
Loop variable captureRange variable in goroutine
Context for cancellationGlobal done channels

Testing

CommandDescription
go test -vVerbose output
go test -raceRun race detector
go test -coverShow coverage
go test -bench .Run benchmarks
go test -fuzz FuzzRun fuzzing

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.