Architecture
SKILL.md
Golang Architecture Standards
Priority: P0 (CRITICAL)
Principles
- Clean Architecture: Separate concerns. Inner layers (Domain) rely on nothing. Outer layers (Adapters) rely on Inner.
- Project Layout: Follow standard Go project layout (
cmd,internal,pkg). - Dependency Injection: Explicitly pass dependencies via constructors. Avoid global singletons.
- Package Oriented Design: Organize by feature/domain, not by layer (avoid
controllers/,services/at root). - Interface Segregation: Define interfaces where they are used (Consumer implementation).
Standard Project Layout
See Standard Project Layout for directory tree.
Layer Rules
- Domain: Inner-most. No deps.
- UseCase: Depends on Domain.
- Adapter: Outer-most. Depends on UseCase/Domain.
Guidelines
- Use Constructors:
NewService(repo Repository) *Service. - Inversion of Control: Service depends on
Repositoryinterface, notSQLRepositorystruct. - Wire up in Main: Main function composes the dependency graph.
References
Weekly Installs
11
Repository
mte90/dotfilesGitHub Stars
45
First Seen
Feb 28, 2026
Security Audits
Installed on
gemini-cli11
claude-code11
github-copilot11
codex11
kimi-cli11
amp11