golang-design-patterns
Skill2 starsChanged 15 days agoNo licenceView on GitHub
Idiomatic Golang design patterns — functional options, constructor APIs, `init()` and global-state avoidance, enums, panic vs error decisions, resource management and lifecycle, graceful shutdown, timeouts and retries, streaming and iterators, and architecture styles (clean, hexagonal, DDD, flat). Apply when choosing between architectural patterns, implementing functional options, designing constructor APIs, setting up graceful shutdown, applying resilience patterns, or asking which idiomatic Go pattern fits a specific problem. Not for wiring a DI container or comparing DI libraries (→ See `samber/cc-skills-golang@golang-dependency-injection` skill), nor for error wrapping, `errors.Is`/`As`, or logging mechanics (→ See `samber/cc-skills-golang@golang-error-handling` skill).
- Installs packages
16 other projects use a version of this, 10 of them edited.
Adopted by
Most recently taken up by
- aiproxer/aiproxertheir own version, first seen Nov 8, 2026
- TeddyAlbina/skillsedited, first seen Nov 1, 2026
- samber/cc-skills-golangword for word, first seen Nov 1, 2026
- poizoncoded/skillsedited, first seen Nov 1, 2026
- klawisha012/agentsyncedited, first seen Oct 25, 2026
- rockcookies/skillsedited, first seen Oct 13, 2026
Used with
Projects with it also use golang-data-structures, golang-stretchr-testify and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
guynhsichngeodiecSkillgolang-data-structures
Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container/ packages, unsafe or weak pointers, or questioning slice/map internals.
Also in 9 projects that use this
guynhsichngeodiecSkillgolang-stretchr-testify
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use whenever writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Essential for testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Trigger on any Go test file importing testify.
Also in 9 projects that use this
tquangkhai98Skillgolang-safety
Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use whenever writing or reviewing Go code that involves nil-prone types (pointers, interfaces, maps, slices, channels), numeric conversions, resource lifecycle (defer in loops), or defensive copying. Also triggers on questions about nil panics, append aliasing, map concurrent access, float comparison, or zero-value design.
Also in 10 projects that use this
alexastrumSkillgolang-google-wire
Compile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.InterfaceValue, wire.FieldsOf, cleanup functions, //go:build wireinject injector files, and generated wire_gen.go. Apply when using or adopting google/wire, when the codebase imports `github.com/google/wire`, or when wiring an application graph at compile time via `wire.Build`. For runtime DI with reflection, see `samber/cc-skills-golang@golang-uber-dig` skill.
Also in 6 projects that use this
alexastrumSkillgolang-graphql
Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports `github.com/99designs/gqlgen` or `github.com/graph-gophers/graphql-go`.
Also in 6 projects that use this
- +6 more from guynhsichngeodiec
- +1 more from alexastrum
Other versions16 projects use a version of this.
Word for word · 3
- samber/cc-skills-golang★ 3.8k100% same
- unxed/f4★ 261100% same
- rzisso/golang-skills★ 0100% same
Edited · 10
- klawisha012/agentsync★ 1897% same
- alexastrum/skl★ 1197% same
- tstapler/dotfiles★ 897% same
- tquangkhai98/browser-profiles-manager★ 594% same
- poizoncoded/skills★ 295% same
- TeddyAlbina/skills★ 297% same
- rockcookies/skills★ 193% same
- VerifiedOrganic/onboard★ 197% same
- gccli/skills★ 095% same
- guynhsichngeodiec/cc-skills-golang★ 095% same
Wrote their own version · 3
- aiproxer/aiproxer★ 22same name
- saifoelloh/golang-best-practices-skill★ 15same name
- reagin/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository77 other files it gives its agents.
- accessibilitySkill
- accounting-syncSkill
- adaptive-model-routingSkill
- alert-investigatorSkill
- best-practicesSkill
- challengeSkill
- chef-custom-resourcesSkill
- cli-designSkill
- code-quality-reviewSkill
- context7-mcpSkill
- core-web-vitalsSkill
- doc-coauthoringSkill
- explainSkill
- failing-deploymentsSkill
- find-skillsSkill
- fish-shellSkill
- frontend-designSkill
- gh-address-commentsSkill
- github-composite-actionsSkill
- github-prSkill
- golang-code-styleSkill
- golang-patternsSkill
- google-material-designSkill
- go-optimizerSkill
- grillingSkill
- grill-meSkill
- hard-newsSkill
- appkit-swiftui-bridgeSkill
- app-plannerSkill
- architecture-patternsSkill
- coding-best-practicesSkill
- macos-capabilitiesSkill
- macos-tahoe-apisSkill
- macos-developmentSkill
- swiftdata-architectureSkill
- ui-review-tahoeSkill
- medtracker-rustSkill
- migrateSkill
- modernizeSkill
- offboardSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- pdfSkill
- performanceSkill
- plain-technical-writingSkill
- playwright-cliSkill
- prior-artSkill
- progress-reportSkill
- retroSkill
- rubber-duckSkill
- rubySkill
- rust-strict-clippySkill
- rust-testingSkill
- security-maintenanceSkill
- security-reviewerSkill
- skill-creatorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 4 are common, 0 are distinctive, and 1 is very specific to this project.
4
Common
Most of the 13 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
No licence file, so all rights are reserved — read it at the source. We count its rules but don't quote them. Read them on GitHub.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
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
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.

