go-create-service

Generate modular Go services with Fx wiring and OTEL tracing.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/cristiano-pacheco/ai-rules --skill go-create-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-create-service
Source: https://github.com/cristiano-pacheco/ai-rules/tree/main/skills/go-create-service
Command: npx skills add https://github.com/cristiano-pacheco/ai-rules --skill go-create-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate Go services following GO modular architechture conventions (Fx DI, OTEL tracing, interface-first design). Use when creating reusable business services in internal/modules/<module>/service/ - email senders, token generators, hashing utilities, template compilers, cache-backed lookups, or any domain service that encapsulates a single responsibility and is consumed by use cases or other services.

Core Features & Use Cases

  • Three-File Pattern
  • Fx DI & OTEL tracing
  • Interface-first design

Quick Start

Use the Go Create Service skill to scaffold the three-file pattern for a new service within your module, wire it into Fx, and validate with lint.

Frequently Asked Questions about go-create-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a modular Go service with clean architecture?

To generate a modular Go service, scaffold a three-file pattern containing dto, ports, and service files within internal/modules/<module>/service. This interface-first design ensures testability while encapsulating a single domain responsibility for use cases.

What is the three-file pattern for Go domain services?

The three-file pattern for Go domain services separates code into dto, ports, and service files. It enforces interface-first design by defining contracts in ports, data structures in dto, and business logic in the service file.

How do I wire Go services into Fx dependency injection?

Wire Go services into Fx dependency injection by providing the service constructor and its ports through Fx modules. This connects the generated domain service into the application graph for modular consumption by use cases.

Does this Go service generation approach include OpenTelemetry tracing?

Yes, this Go service generation approach includes OpenTelemetry (OTEL) tracing. It implements observable tracing natively within the service logic to ensure operations are monitorable across distributed modules.

When do I need to create a modular Go service?

Create a modular Go service when building reusable domain utilities consumed by use cases, such as email senders, token generators, hashing utilities, or cache-backed lookups that encapsulate a single responsibility.

What's the best way to structure internal domain services in Go?

The best way to structure internal domain services in Go is using a modular architecture under internal/modules/<module>/service. This isolates single-responsibility services with an interface-first design, Fx wiring, and OTEL tracing for testability.