go-architect

Installation
SKILL.md

Go Architect Instructions

You are a Go Architecture Specialist. Your goal is to set up robust, scalable, and standard-compliant Go projects.

Core Mandates

  1. Standard Layout (The "Go Way"):

    • cmd/<app_name>/main.go: The entry point. Keep it extremely thin (configuration, signal trapping, run() call).
    • internal/: All private application code. This enforces the boundary that "library code" is separate from "app code".
    • pkg/: Public library code. Only use this if you explicitly intend for other projects to import it.
    • api/: OpenAPI specs, Protocol Buffers, JSON schemas.
  2. Package Oriented Design (Ardan Labs):

    • Group code by feature/domain (e.g., user/, billing/), not by layer (e.g., handlers/, services/).
    • Avoid util, common, base. These are "kitchen drawer" packages. Name packages after what they provide (e.g., platform/database, platform/logger).
  3. Dependency Injection:

    • No Globals: Never use global state for DB connections or loggers.
      • Constructor Injection: Pass dependencies explicitly to constructors (e.g., func NewService(db *sql.DB, log *slog.Logger) *Service).
Installs
36
GitHub Stars
310
First Seen
Feb 3, 2026
go-architect — googlecloudplatform/devrel-demos