agentsclimarketplace

Go architecture

Skill fusengine/agents/plugins/go-expert/skills/go-architecture

Structure Go 1.22+ services — standard cmd/internal layout, constructor-based dependency injection, HTTP routing (net/http ServeMux vs chi vs echo/gin/fiber), and type-safe database access with sqlc + pgx. Use when laying out a new Go project, choosing a router or DB layer, or wiring dependencies. Do NOT use for goroutines/channels patterns (go-concurrency) or language idioms (go-core-idioms).From its SKILL.md

Install
npx -y skills add fusengine/agents --skill go-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.7 KB, 806 tokens by cl100k_base, as published. Nobody here has run it

Go Architecture

Opinionated, 2026-current guidance for structuring Go backend services. Favors the standard library and small, composable libraries over heavy frameworks.

Use when:

  • Laying out a new Go module or service (directory structure, cmd/, internal/)
  • Choosing an HTTP router (stdlib net/http ServeMux, chi, echo/gin/fiber)
  • Choosing a database layer (sqlc + pgx, GORM) or wiring queries
  • Wiring dependencies (constructors, DI without a framework)
  • Reviewing an existing Go service for structural / architectural issues

Do NOT use for:

  • Writing tests, benchmarks, fuzzing, coverage — use go-testing-quality
  • SOLID line-limit / interface-placement enforcement — use fuse-solid:solid-go
  • Non-Go backends (Laravel, Next.js, Rust) — use the matching expert
  • Frontend / UI work — use fuse-design or a framework expert

Decision Map

QuestionLoad
Where do files/packages go?project-layout.md
Which HTTP router? How do I route?http-routing.md
How do I talk to the database?database-access.md
How do I wire dependencies?dependency-injection.md
I need a full working exampletemplates/rest-service.md

Core Principles (2026)

  1. Standard library first. Since Go 1.22 the net/http.ServeMux supports method matching and path wildcards (GET /posts/{id}, req.PathValue("id")). Most services no longer need a routing framework. Source: https://go.dev/blog/routing-enhancements
  2. internal/ is the default home for service logic. A server binary is self-contained; keep packages under internal/ and binaries under cmd/. There is no official pkg/ requirement — do not cargo-cult it. Source: https://go.dev/doc/modules/layout
  3. Constructor injection, no DI framework by default. Pass dependencies as interface parameters to New… constructors; wire them in main.
  4. Type-safe SQL is the 2026 default. sqlc generates idiomatic Go from raw SQL; run it on top of the pgx driver for PostgreSQL. GORM still works but is in relative decline for new services — see database-access.md for the nuance. Sources: https://docs.sqlc.dev + https://pkg.go.dev/github.com/jackc/pgx/v5

Workflow

  1. Explore the existing tree first (do not assume layout).
  2. Load the relevant reference from the Decision Map above.
  3. Cross-check the version-sensitive claims (router, sqlc/pgx) against the source URLs before writing code — APIs move.
  4. Scaffold from templates/rest-service.md when starting fresh.
  5. Keep files small and interfaces separated (defer to fuse-solid:solid-go).
  6. Validate with go-testing-quality + sniper after any code change.

Boundaries (cross-referenced, not copied)

The community skill set at github.com/samber/cc-skills-golang covers overlapping Go territory. This skill deliberately scopes to architecture / structure / routing / DB wiring and hands testing off to go-testing-quality. When in doubt about which skill owns a topic, prefer the more specific one.

What ships with it: 6 files

19.3 KB alongside SKILL.md

Gives 0 of the 12 instructions most architecture codebase skills give in 806 tokens

Counted across 811 of the 1,134 authors here whose files we hold, read 2026-08-07

  • Ask the user which candidate to explorein 45 of 811, across 15 files
  • Apply the deletion test to suspected shallow modulesin 43 of 811, across 15 files
  • Read any relevant architecture decision records firstin 31 of 811, across 8 files
  • Use exact glossary terms in every suggestionin 30 of 811, across 10 files
  • Accept dependencies instead of creating themin 24 of 811, across 5 files
  • Include before and after visualisations for each candidatein 24 of 811, across 5 files
  • Read the domain glossary before exploringin 24 of 811, across 6 files
  • Return results instead of producing side effectsin 23 of 811, across 4 files
  • Explore the codebase for shallow modules and frictionin 23 of 811, across 3 files
  • Introduce seams only where things varyin 22 of 811, across 3 files
  • Reduce the number of methodsin 21 of 811, across 2 files
  • Design deep modules with small interfacesin 21 of 811, across 3 files

Said here and by no other author read

  • Use the standard library first
  • Use sqlc with pgx for database access
  • Explore the existing tree before scaffolding
  • Load the relevant reference from the decision map
  • Cross-check version-sensitive claims against sources
  • Scaffold from the template when starting fresh

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.