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.

referencesreview-checklist.md

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

Modular Go Review Checklist

Use this checklist for a fast architecture sanity check before merge.

API and Boundaries

  • Is package responsibility explainable in one sentence?
  • Is there one obvious primary entry point?
  • Are exported symbols limited to stable contracts?
  • If a wide interface exists, is it defined at the package entry and are all methods documented?
  • Are helper packages domain-explicit (for example, sliceutil) and stateless?

State and Lifecycle

  • Can core logic be stateless functions instead of mutable objects?
  • If a manager exists (for example, SessionManager), are operations exposed by ID?
  • Are shared mutable registries synchronized with explicit, narrow lock scope?
  • Is every shared resource acquisition paired with a deterministic release path?
  • Is shutdown driven by context.Context instead of public Close() where possible?

Parameters and Construction

  • For simple optional parameters, are option functions sufficient and stable for call sites?
  • For complex or coupled parameter sets, is a dedicated Builder provided?

Orchestration and Shutdown

  • Is orchestration thin, with helper methods focused on one capability each?
  • Does each orchestration stage include a short intent comment?
  • Are dependencies, background loops, and shutdown callbacks wired in one constructor path?
  • Is every package boundary justified by a distinct responsibility, not file size?

Transport Handlers (gRPC/HTTP)

  • Do handlers follow unmarshal → delegate → marshal and nothing else?
  • Is business logic delegated to injected domain dependencies, not implemented in handlers?
  • Is error-to-status conversion centralized rather than scattered across handlers?
  • Are domain dependencies injected via constructor, not accessed through globals?

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