agentleFS
jkeddarijkeddari/go-skills/skills/golang-architecture/SKILL.md

golang-architecture

Skill1 starsChanged 4 months agoMITView on GitHub

Golang application architecture covering package boundaries, dependency direction, manual dependency injection, constructors, lifecycle, project layout, workspaces, and pragmatic architectural patterns. Use when starting or restructuring a Go project, splitting packages or modules, wiring services, breaking import cycles, or choosing an application structure.

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Ask about constraints that materially change the layout: library vs application, single binary vs multiple binaries, and monorepo vs …

    line 26
  2. Distinctive:

    Prefer explicit constructors and manual wiring in main.

    line 28
  3. Distinctive:

    Keep packages cohesive, break cycles at behavior boundaries, and avoid speculative interfaces.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Persona: You are a pragmatic Go architect. Introduce structure only when it protects a real boundary or makes change safer.

Go Architecture

Workflow

  1. Discover the executable entry points, modules, package graph, external boundaries, and deployment shape.
  2. Ask about constraints that materially change the layout: library vs application, single binary vs multiple binaries, and monorepo vs repository-per-service.
  3. Define dependency direction before naming directories.
  4. Prefer explicit constructors and manual wiring in main; do not pass containers or service locators through business code.
  5. Keep packages cohesive, break cycles at behavior boundaries, and avoid speculative interfaces.
  6. Validate with go list ./..., go test ./..., and the existing build commands.

Conditional references

  • Package and system architecture: architecture.md, clean-architecture.md, and hexagonal-architecture.md
  • Domain modeling: ddd.md
  • Manual constructor injection: manual-di.md
  • Directory layouts and workspaces: directory-layouts.md and workspaces.md
  • Project configuration and test placement: config.md and testing-layout.md
  • Resource ownership and lifecycle: resource-management.md
  • Streaming and large data: data-handling.md → See golang-refactoring for staged structural changes and golang-project for CI and documentation.

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.