Software design principles and patterns. This skill should be used when making architectural decisions, designing classes or modules, or evaluating code structure. Use proactively when discussing SOLID principles, coupling, cohesion, connascence, refactoring structure, class design, module boundaries, dependency injection, or the Four Rules of Simple Design. (user)
This skill provides guidance on software design principles, emphasizing simplicity, maintainability, and clean architecture.
These rules, in priority order, guide all design decisions:
Rules 2 and 3 are closely related and reinforce each other. When they appear to conflict, favor revealing intention — clarity for the reader takes precedence.
The rules are applied in order: never sacrifice correctness for clarity, never sacrifice clarity for DRY, and never add elements just to reduce duplication.
A module should have one, and only one, reason to change.
This means a module should be responsible to one, and only one, actor or stakeholder. When multiple actors depend on the same module, changes for one actor risk breaking functionality for another.
Signs of SRP violations:
UserValidatorAndNotifier)Software entities should be open for extension but closed for modification.
Design modules so new functionality can be added without changing existing code.
Subtypes must be substitutable for their base types.
Any code that works with a base type should work correctly with any subtype.
Clients should not be forced to depend on interfaces they do not use.
Prefer many small, specific interfaces over one large, general interface.
High-level modules should not depend on low-level modules. Both should depend on abstractions.
Abstractions should not depend on details. Details should depend on abstractions.
Maximize cohesion, minimize coupling.
Cohesion measures how strongly related the responsibilities of a module are. High cohesion means a module does one thing well.
Signs of low cohesion:
Coupling measures the degree of interdependence between modules. Low coupling means modules can change independently.
Connascence provides a framework for understanding and measuring coupling. Two components are connascent if a change to one requires a change to the other.
Connascence of Name (CoN): Components agree on names
Connascence of Type (CoT): Components agree on types
Connascence of Meaning (CoM): Components agree on value meanings
Connascence of Position (CoP): Components agree on order
Connascence of Algorithm (CoA): Components agree on algorithm
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer