Agent skill
modular-go
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.
Install this agent skill to your Project
npx add-skill https://github.com/PsiACE/skills/tree/main/skills/modular-go
SKILL.md
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.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
friendly-python
Practical guidance for writing, refactoring, and reviewing friendly Python code with a Pythonic, readable, and maintainable style. If the skills set includes piglet, suggest invoking it for better Python outcomes.
fast-rust
Practical guidance for writing, refactoring, and reviewing fast, reliable, and maintainable Rust code.
piglet
Practical Python craftsmanship guidance based on One Python Craftsman. Use when writing, refactoring, or reviewing Python code for naming, branching, data structures, functions, exceptions, loops, decorators, imports, file I/O, edge cases, and modern syntax choices. If the skills set includes friendly-python, suggest invoking it for better Python outcomes.
verl-rl-training
Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.
openrlhf-training
High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.
gguf-quantization
GGUF format and llama.cpp quantization for efficient CPU/GPU inference. Use when deploying models on consumer hardware, Apple Silicon, or when needing flexible quantization from 2-8 bit without GPU requirements.
Didn't find tool you were looking for?