Skip to content

Go Patterns Guide

Guides the agent to write idiomatic Go using common design, concurrency, error and testing patterns

Repository
affaan-m/ECC
Stars
295,127
Licence
MIT
Files
1 file

What it does

When you work on Go code, this skill tells the agent to follow Go-specific best practices. It covers patterns such as functional options for constructors, small interfaces defined where they are used, dependency injection through New* constructors, worker pools and context passing, error wrapping and sentinel errors, a standard project layout, and table-driven tests. It is a set of written guidance and code examples; it does not run anything by itself.

Great for

  • Go developers who want the agent's code to follow idiomatic conventions
  • Teams reviewing or refactoring Go APIs and packages
  • Developers new to Go who want examples of common patterns

Skip it if

  • Non-Go projects, since it is only triggered by Go files and gives Go-specific advice (it could mislead in other languages)
  • Projects that already have their own established Go style guide, where the generic advice may conflict with local rules

Try asking

  • “Refactor this Go service constructor to use functional options”
  • “Add table-driven tests for this validation function in Go”
  • “Review my Go worker pool for concurrency issues and context handling”
  • “Restructure this Go project into cmd, internal and pkg folders”
Step-by-step guide: how to use Go Patterns GuideInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    golang-patterns.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip golang-patterns.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip golang-patterns.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Mention your Go version and any existing conventions so the agent adapts the patterns rather than forcing them
  • Treat the examples as starting points and check them with go vet, the race detector and your test suite before merging
  • Ask for explanations of trade-offs when a pattern (such as a worker pool or sentinel errors) is not clearly needed

What's inside

  • SKILL.md

Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.