solid-go

Enforce SOLID principles in Go 1.23+ projects with modular architecture and file limits.

22|3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/fusengine/agents --skill solid-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-go
Source: https://github.com/fusengine/agents/tree/main/plugins/solid/skills/solid-go
Command: npx skills add https://github.com/fusengine/agents --skill solid-go

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces SOLID principles in Go development, ensuring code is maintainable, scalable, and testable by adhering to strict architectural rules and best practices.

Core Features & Use Cases

  • Modular Architecture: Enforces internal/modules/[feature]/ structure for clear separation of concerns.
  • File Size Limits: Keeps files under 100 lines to promote readability and single responsibility.
  • Interface Segregation: Mandates small, focused interfaces (1-3 methods) in ports/ directories.
  • Use Case: When starting a new Go project or refactoring an existing one, use this Skill to establish a robust, SOLID-compliant architecture from the outset, preventing common pitfalls like god objects and tight coupling.

Quick Start

Apply the solid-go skill to refactor the current Go project to adhere to SOLID principles.

Frequently Asked Questions about solid-go

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

FAQPage Schema
How do I enforce SOLID principles in a Go project to prevent tight coupling?

To enforce SOLID principles in Go, structure projects using modular architecture with strict file size limits and interface segregation. This prevents tight coupling by mandating small, focused interfaces in dedicated ports directories and ensuring adherence to layered responsibilities across handlers, services, and repositories.

What is the best way to structure a Go codebase for maintainability and scalability?

The best way to structure Go code for maintainability is using modular architecture with an internal/modules/[feature]/ directory layout. This enforces clear separation of concerns, keeps files under 100 lines for readability, and mandates single responsibility across handlers, services, and repositories.

Can I refactor an existing Go application to use clean code and interface segregation?

Yes, you can refactor existing Go applications to adopt clean code by enforcing interface segregation. This involves breaking down large interfaces into small, focused ones with 1-3 methods, placing them in dedicated ports directories, and reorganizing code into modular structures with layered responsibilities.

Does enforcing clean code in Go require strict file size limits?

Enforcing clean code in Go benefits from strict file size limits, specifically keeping files under 100 lines. This promotes readability and single responsibility, preventing god objects and ensuring the codebase remains modular, maintainable, and testable.

Why does my Go architecture have god objects and how do I fix it?

Go architecture develops god objects when files lack strict size limits and layered responsibilities. Fix this by refactoring to a modular architecture that enforces files under 100 lines, uses dedicated ports directories for interface segregation, and separates concerns across handlers, services, and repositories.

What are the limitations of applying strict SOLID architecture to Go 1.23+ projects?

Applying strict SOLID architecture to Go 1.23+ projects requires adherence to rigid constraints: files must stay under 100 lines and interfaces must contain 1-3 methods in ports directories. This may require significant refactoring effort for existing codebases with large files or coupled components.