solid
SOLID Principles
Before Applying
If .agents/stack-context.md exists, read it first. Apply this principle using idiomatic patterns for the detected stack. For framework-specific details, use context7 MCP or web search — don't guess.
Principle
Five design principles that produce modular, testable, and resilient systems. While originally framed for object-oriented design, the underlying ideas apply to any paradigm — functions, modules, services, or components.
Why This Matters in Production
SOLID code is change-friendly code. Production systems change constantly — new features, bug fixes, integrations, scaling. Systems designed with SOLID principles absorb change locally rather than requiring cascading modifications. This means fewer regressions, faster feature delivery, and smaller blast radius when things go wrong.
S — Single Responsibility Principle
A module should have one, and only one, reason to change.
More from jordancoin/codingskills
kiss
When writing or reviewing code to reduce complexity and improve readability. Use when the user says "simplify this," "too complex," "hard to read," "clean up," "what does this do," or "can't follow this code." For over-engineering concerns, see yagni. For structural clarity, see separation-of-concerns.
19yagni
When writing or reviewing code to prevent over-engineering and speculative features. Use when the user says "is this over-engineered," "do we need this," "should I add," "future-proof," or "just in case." For simplicity concerns, see kiss. For abstraction design, see solid.
16dry
When writing or reviewing code to eliminate duplicated knowledge and business logic. Use when the user says "this is duplicated," "we have this in two places," "single source of truth," "DRY this up," or "shotgun surgery." For premature abstraction concerns, see yagni.
10law-of-demeter
When reviewing code for excessive coupling and deep object chains. Use when the user says "too coupled," "train wreck," "chained calls," "feature envy," "mocking is painful," or "this reaches too deep." For broader structural coupling, see solid.
9detect-stack
Analyze a codebase to detect its language, framework, conventions, and CI gates. Run this on first use in a project to generate stack context that all coding principle skills reference. Use when the user says "detect stack," "analyze this project," or "what's this codebase using.
9boy-scout-rule
When touching existing code and wanting to leave it better. Use when the user says "clean this up while I'm here," "should I fix this," "tech debt," "while I'm in this file," or "incremental improvement." For full refactoring, see solid or separation-of-concerns.
9