clean-architecture-go
CommunityEnforce Go clean architecture in the toToogle project.
Authormanorfm
Version1.0.0
Installs0
System Documentation
What problem does it solve?
The Go backend often drifts away from clean architecture patterns, creating tangled code and slow maintenance. This skill codifies strict, repeatable rules to apply Clean Architecture within the toToogle project, ensuring proper boundaries between Entity, Repository Interface, Database (Gorm), Usecase, Handler, and Router.
Core Features & Use Cases
- Enforces layered boundaries and explicit data flow across Entity → Repository Interface → Database (Gorm) → Usecase → Handler → Router.
- Enforces dependency injection via constructors (e.g., NewXUsecase(repo)) and discourages global state to improve testability and maintainability.
- Guides ULID generation in the BeforeCreate hook for entities to ensure consistent ID patterns.
- Recommends unit testing with testify and standard Go testing practices to validate business rules.
- Documents ORM mappings with GORM tags and aligns with sqlite as the supported database in examples.
Quick Start
Apply these rules when implementing any Go backend component for the toToogle project to maintain strict clean-architecture compliance.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: clean-architecture-go Download link: https://github.com/manorfm/toToggles/archive/main.zip#clean-architecture-go Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.