Index of every page on this site: llms.txt
All skills
psiace avatar

/modular-go

@2265aed
by Chojan Shangpsiace/skills173 stars
7
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/psiace/skills/modular-go

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈88 tokens for metadata: the name and description. ≈676 when used: this file. ≈2.4k more on demand in 6 files.

Description uses 4.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈351 characters, or 4.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

  1. Every export is a promise — keep the public surface minimal and intentional.
  2. One package, one responsibility you can explain in one sentence.
  3. Depth over breadth — narrow interfaces that hide rich implementations outlast wide, shallow ones.
  4. Stateless by default — treat mutable state as liability that must justify its lifecycle cost.
  5. Split along responsibility seams, not file size — every new boundary must earn its indirection cost.
  6. Orchestration tells the story; capability methods do the work.
  7. Boundaries are translation layers — convert errors, types, and protocols at the edges, not in core logic.
  8. Choose the smallest abstraction that solves the real problem; resist premature generalization.
  9. Lifecycle is a first-class design concern — design shutdown paths alongside startup paths.

Workflow

  1. Define one package responsibility.
  2. Expose one obvious primary entry point (type, interface, or function).
  3. Keep helpers local by default; extract to xxxutil only for real cross-package reuse.
  4. Keep transport handlers focused on protocol mapping and delegate behavior to injected dependencies.
  5. Compose orchestration from focused functions, with short stage-intent comments.
  6. Re-evaluate boundaries when a package can no longer be explained in one sentence.
  7. 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.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo4 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides architectural guidance for Go package design and does not contain any executable code or security risks.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    6 files scanned · No issues

Signed by skilld at 2265aed. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 9 months ago

README badge

README badge for psiace/skills/modular-go