go-clean-architecture

Organize Go backend services into a Clean Architecture multi-layer structure.

1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/kirklin/skills --skill go-clean-architecture-kirklin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-clean-architecture
Source: https://github.com/kirklin/skills/tree/main/skills/go-clean-architecture
Command: npx skills add https://github.com/kirklin/skills --skill go-clean-architecture-kirklin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go projects often suffer from tangled dependencies and brittle boundaries between business logic and infrastructure. This skill provides a clear, repeatable architecture template based on Clean Architecture to separate core domain rules from external concerns, enabling easier testing and evolution.

Core Features & Use Cases

  • Provides a multi-layer Go project structure: Entities, Use Cases, Interfaces/Adapters, and Frameworks & Drivers.
  • Includes guidelines for dependency direction, naming conventions, and testability.
  • Use Case: structure a new service to ensure testable domain logic and straightforward wiring to infrastructure.

Quick Start

Follow the template to scaffold a new Go project with a clean architecture layout.

Frequently Asked Questions about go-clean-architecture

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

FAQPage Schema
How do I structure a Go project using clean architecture?

Structure a Go project using clean architecture by organizing code into distinct layers: Entities, Use Cases, Interfaces/Adapters, and Frameworks & Drivers. This multi-layer structure separates core domain rules from infrastructure concerns, enabling easier testing and evolution.

What is the dependency direction guideline for a Go clean architecture service?

The dependency direction guideline for a Go clean architecture service mandates that dependencies point inward toward the domain. Infrastructure and frameworks depend on use cases and entities, ensuring core business logic remains isolated from external concerns and highly testable.

When do I need clean architecture for my Go backend service?

You need clean architecture for a Go backend service when the project suffers from tangled dependencies and brittle boundaries between business logic and infrastructure. It provides a repeatable template to ensure straightforward wiring to infrastructure and testable domain logic.

Can I use clean architecture to separate domain logic from infrastructure in Go?

Yes, you can use clean architecture to separate domain logic from infrastructure in Go. This approach applies clear boundaries and naming conventions between layers, ensuring your core domain rules remain independent of external frameworks and databases.

What's the best way to scaffold a new Go service with testable layers?

The best way to scaffold a new Go service with testable layers is following a clean architecture template. This provides a multi-layer structure with reference implementation alignment, ensuring your use cases and entities are isolated for straightforward testing.