clean-architecture

Guides software architecture design, audits, and refactoring using Clean Architecture and SOLID principles.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/hoonsubin/scrum-master-mcp-server --skill clean-architecture-hoonsubin
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/hoonsubin/scrum-master-mcp-server/tree/main/.roo/skills/clean-architecture
Command: npx skills add https://github.com/hoonsubin/scrum-master-mcp-server --skill clean-architecture-hoonsubin

SYSTEM DOCUMENTATION & REQUIREMENTS

šŸ’” This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Software systems decay into fragile, hard-to-change codebases when architecture is left to frameworks or chance. This Skill provides structured guidance for designing new systems, auditing existing ones, and recovering big balls of mud using Robert C. Martin's Clean Architecture, SOLID, and component principles. ## Core Features & Use Cases - Four Situation-Specific Workflows: Dedicated playbooks for greenfield design, architecture audits, messy codebase cleanup, and incremental strangler-fig migration. - Principle Reference Library: In-depth references covering SOLID, component cohesion/coupling (REP/CCP/CRP, ADP/SDP/SAP), the Dependency Rule, Humble Object pattern, and boundary design with I/A/D metrics. - Concrete Assets: A printable architecture audit checklist and a package-by-component project skeleton adaptable to any language. - Use Case: A team inherits a fragile monolith where every change breaks something distant. Use the cleanup workflow to establish a safety net, triage change hotspots, introduce anti-corruption seams, and incrementally restore clean boundaries. ## Quick Start Ask the assistant to audit your project's architecture or advise where a piece of code should live, and it will load the matching workflow and reference files.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
How do I structure a new project with Clean Architecture?ā–¼

Start with use cases written in business language, identify entities and their rules, then sketch interactors with input/output DTOs and ports. Defer database and framework decisions, and organize directories by business component rather than by layer.

How do I fix a circular dependency between components?ā–¼

Break cycles using the Acyclic Dependencies Principle: either apply dependency inversion by introducing an interface in the more stable component, or extract a third component both sides depend on. Add cycle detection to CI to prevent recurrence.

Should I use microservices or a monolith for a new system?ā–¼

Start with source-level decoupling inside a well-structured monolith. Promote individual boundaries to deployment units, processes, or services only when operational pressure justifies it, since tightly coupled services are worse than a clean monolith.

Does Clean Architecture apply to languages like Python or JavaScript?ā–¼

Yes, the principles are language-agnostic. The skill includes enforcement tooling per ecosystem, such as import-linter for Python, dependency-cruiser and madge for JavaScript, ArchUnit for Java, and cargo-modules for Rust.

How do I refactor a big ball of mud without a rewrite?ā–¼

Establish a test safety net first, triage hotspots by change frequency, then draw a seam around the worst module using a Facade or Strategy interface. Add characterization tests at the seam and refactor incrementally inside it, one hotspot at a time.

What are the I, A, and D metrics in component design?ā–¼

I measures instability as fan-out over total coupling, A measures abstractness as abstract types over total types, and D measures distance from the ideal Main Sequence as |A+Iāˆ’1|. Components with D above 0.1 are drifting toward the Zone of Pain or Zone of Uselessness.