All skills
psiace avatar

/modular-go

@f80ef5a
by Chojan Shangpsiace/skills172 stars
7

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

This session only. Nothing lands on disk.

referencesorchestration.md

≈388 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Orchestration

Goals

  • Keep complex flows readable and testable.
  • Separate sequencing from implementation details.

Guidance

  • For a complex flow, expose one obvious executor entry point.
  • Use either a package-level function (Run/Execute) or an object method, based on package style.
  • Keep constructor-time wiring in one place (dependencies, background loops, shutdown callbacks).
  • In orchestration flows, add one short comment line for each stage to state intent and improve scanability.
  • Keep all helper methods unexported and focused on one operation each.
  • Keep orchestration thin: handle order, branching, and error mapping only.
  • Keep capability methods single-purpose and testable.
  • When a package mixes distinct responsibilities, split along domain seams rather than by file size.
  • Convert errors at HTTP/GRPC boundaries, not in core logic.

Review Bullets

  • Is there exactly one obvious entry point for this flow?
  • Are helper operations small enough to test independently?
  • Is constructor-time wiring explicit for background workers and shutdown paths?
  • Does each orchestration stage include a short intent comment?
  • Does the executor only coordinate, instead of doing all details itself?
  • Can you read the primary Run/Execute flow top-to-bottom as a story?
  • Is every package boundary justified by a distinct responsibility, not file size?
  • Is error conversion happening at request boundaries only?

Source: SKILL.md on GitHub

No alerts8d4 checks · Risk SAFE
  • Gen Agent Trust Hub8d

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

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

  • Runlayer6mo

    6 files scanned · No issues

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

Last checked against GitHub last month.

Activeupdated 7 months ago

README badge

README badge for psiace/skills/modular-go