modular-go
Skill1 starsChanged 7 months agoMITView on GitHub
Practical guidance for Go package design with minimal public APIs, single-responsibility boundaries, stateless-first flow, one-way state transitions, and orchestration-to-capability separation. Use when creating, refactoring, or reviewing Go architecture, package boundaries, interfaces, handlers, managers, builders, and execution flows.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- PsiACE/skillsword for word, first seen Feb 5, 2026
Other versions1 project uses a version of this.
Word for word · 1
- PsiACE/skills★ 172100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use for Go package design, refactoring, and code review.
- Distinctive: line 14
Use when deciding the right abstraction level: local helper, utility package, manager, or builder.
- Distinctive: line 15
Prefer explicit boundaries over convenience exports.
- Distinctive: line 19
Every export is a promise — keep the public surface minimal and intentional.
- Very specific: line 33
Keep helpers local by default.
- Distinctive: line 34
Keep transport handlers focused on protocol mapping and delegate behavior to injected dependencies.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
modular-go
Concise guidance for designing Go packages that stay small, focused, and easy to evolve.
Purpose and Triggers
- Use for Go package design, refactoring, and code review.
- Focus on API boundaries, state modeling, and flow decomposition.
- Use when deciding the right abstraction level: local helper, utility package, manager, or builder.
- Prefer explicit boundaries over convenience exports.
Design Principles
- Every export is a promise — keep the public surface minimal and intentional.
- One package, one responsibility you can explain in one sentence.
- Depth over breadth — narrow interfaces that hide rich implementations outlast wide, shallow ones.
- Stateless by default — treat mutable state as liability that must justify its lifecycle cost.
- Split along responsibility seams, not file size — every new boundary must earn its indirection cost.
- Orchestration tells the story; capability methods do the work.
- Boundaries are translation layers — convert errors, types, and protocols at the edges, not in core logic.
- Choose the smallest abstraction that solves the real problem; resist premature generalization.
- Lifecycle is a first-class design concern — design shutdown paths alongside startup paths.
Workflow
- Define one package responsibility.
- Expose one obvious primary entry point (type, interface, or function).
- Keep helpers local by default; extract to
xxxutilonly for real cross-package reuse. - Keep transport handlers focused on protocol mapping and delegate behavior to injected dependencies.
- Compose orchestration from focused functions, with short stage-intent comments.
- Re-evaluate boundaries when a package can no longer be explained in one sentence.
- Re-check against the reference checklists before merge.
Topics
| Topic | Guidance | Reference |
| Module Boundary | Expose minimal API and separate deep vs wide interfaces | references/module-boundary.md |
| State Flow | Use stateless functions and one-shot state objects | references/state-flow.md |
| Orchestration | Use a single public executor and internal helpers | references/orchestration.md |
| gRPC Practices | Keep handlers as thin translators; isolate transport from domain | references/grpc-practices.md |
| Review Checklist | Run a fast architecture sanity check before merge | references/review-checklist.md |
References
- Reference files are intentionally short and task-focused.
- Source links are listed in each reference file frontmatter
urls.
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.

