From dm-arch
Use when writing, reviewing, or refactoring code that involves structural decisions. Provides SOLID principles, composition patterns, module organization, and side-effect boundary guidelines.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dm-arch:solid-architectureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply these principles when writing or modifying code. Use them as tie-breakers when design decisions conflict.
Apply these principles when writing or modifying code. Use them as tie-breakers when design decisions conflict.
Favor small, focused types composed together rather than deep inheritance trees. When tempted to extend a class, first ask: "Can this be achieved through composition instead?"
Each module/type/function has one reason to change.
Violation signals:
Action: Split into focused modules with clear, singular purposes.
Extend via new implementations, not constant modification.
Violation signals:
Action: Add behavior through new modules and composition, not conditionals.
Subtypes must work anywhere their base type is expected.
Violation signals:
Action: Prefer interfaces over deep hierarchies. Ensure substitutability.
Depend only on the minimal surface needed.
Violation signals:
Action: Create small, specific interfaces. Split large ones.
Depend on abstractions, not concretions.
Violation signals:
Action: Inject dependencies. Use explicit context/environment objects passed to systems.
Establish clear dependency directions:
core → domain → application → UI
Rules:
Separate pure computation from side effects.
Pure (no side effects):
Impure (side effects):
Systems receive these via injection for deterministic testing:
Push I/O and external integrations to small, well-named boundary modules at system edges.
When refactoring: Bias toward making core logic purer and pushing side effects outward.
Before committing code changes:
npx claudepluginhub rbergman/dark-matter-marketplace --plugin dm-archApplies SOLID principles (SRP, OCP) with Elixir and TypeScript examples for designing maintainable modules, functions, and components.
SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) for object-oriented design.
Implements Clean Architecture layers, SOLID principles, dependency injection, DDD, hexagonal architecture, and code quality patterns. Use for new service design or refactoring legacy code.