Engineering
go-api avatar

go-api

Generate a production-ready Go API service with boilerplate for observability, local development, and clean architecture.

Introduction

The go-api skill is an automated architectural scaffold designed for Go developers who need to rapidly bootstrap production-ready microservices. It enforces industry-standard project structures, including clean architecture patterns where HTTP handlers, business logic services, and data repositories are strictly decoupled. By automating the creation of the project hierarchy, it ensures consistency across distributed systems and reduces the time spent on initial boilerplate setup.

  • Generates a complete project directory structure including cmd, internal, docs, local, and scripts folders.

  • Integrates essential observability stacks, providing pre-configured docker-compose setups for Prometheus, Grafana, Tempo, and Loki.

  • Implements standard Go patterns such as structured logging with slog, context propagation, tracing with OpenTelemetry, and standardized error handling.

  • Configures robust HTTP middleware pipelines and includes template files for MySQL databases and Redis caching.

  • Supports automated project lifecycle tasks via a generated Makefile, covering build, linting, unit testing, and integration testing workflows.

  • Enforces strict package naming conventions (e.g., using the x suffix for standard library shadows) to maintain codebase readability.

  • Target users: Software engineers, backend developers, and DevOps practitioners building Go-based microservices.

  • Usage: Invoke the skill when initializing a new repository or service; the agent will prompt for the required service name (in kebab-case) and the module path.

  • Inputs: Requires a service name (e.g., user-service) and a Go module path (e.g., github.com/myorg/myservice).

  • Constraints: The generated code expects a Go environment with Docker installed for local infrastructure; intended for projects adopting a structured, test-driven development (TDD) approach.

Repository Stats

Stars
2
Forks
0
Open Issues
0
Language
Shell
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 09:07 PM
View on GitHub