1. Habit
  2. Skills
  3. Golang Design Patterns skill
samber · 42K installs

Golang Design Patterns skill
Runs by itself, weekly design review.

Go code stays idiomatic and bounded.

Install the Golang Design Patterns skill and make it a habit: follow https://gethabit.dev/skills/samber/golang-design-patterns.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

42K installs4K starsMIT licenceSource on GitHub ↗

Golang Design Patterns

by samber · 42K installs

The skill

The golang design patterns skill guides agents to idiomatic Go: functional options, no init() or global state, safe enums, timeouts, retries, streaming and a fitting architecture.

Only when you ask.

The habit

Go code stays idiomatic and bounded.

↻ Runs by itselfweekly design review

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after ten findings per run.

  1. 01

    Read the board

    Load open issues and the architecture the developer chose last time.

  2. 02

    Scan the code

    Look for init() misuse, mutable globals, unbounded pools and external calls without a timeout.

  3. 03

    Check the idioms

    Compare against the best practices list, such as functional options and enums that start at 1.

  4. 04

    Report first

    List findings before any refactor is suggested.

  5. 05

    Ask on architecture

    Ask the developer which architecture they prefer before proposing clean, hexagonal, DDD or flat layout.

  6. 06

    Hand off details

    Send error handling, context and interface questions to the matching samber golang skills.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Golang Design Patterns skill helps.

Use it when

  • ✓ You design a new Go package or API
  • ✓ You set up graceful shutdown or retries
  • ✓ You review Go code for design issues

Skip it when

  • – You need a DI container comparison
  • – You only fix error wrapping

Questions

Golang Design Patterns skill, answered.

Will it impose clean architecture?

No. It asks which style you prefer and avoids heavy architecture on small projects.

Does it change code without asking?

In review mode it reports findings first and suggests refactors after.

How do I install the Golang Design Patterns skill?

Copy the prompt at the top into your agent. It installs the skill from samber/cc-skills-golang and sets up the habit. Or run npx skills add samber/cc-skills-golang --skill golang-design-patterns.

Is the Golang Design Patterns skill free?

Yes. It is published under MIT. Habit is free too.

Golang Design Patterns. Now as a habit.

Install the Golang Design Patterns skill and make it a habit: follow https://gethabit.dev/skills/samber/golang-design-patterns.md

  • Free
  • No account
  • Undo in one line

All samber skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by samber, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.