design-principles

Translate design principles into maintainable refactoring and code review strategies.

Updated May 10, 2026
One-click install
npx skills add https://github.com/rob-broadley/ai-airbase --skill design-principles-rob-broadley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-principles
Source: https://github.com/rob-broadley/ai-airbase/tree/main/cadre/skills/design-principles
Command: npx skills add https://github.com/rob-broadley/ai-airbase --skill design-principles-rob-broadley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Confusing or inconsistent code structure slows down refactoring and code review, leading to fragile changes and repeated design mistakes.

Core Features & Use Cases

  • Principle-first refactoring guidance: Covers SOLID, GRASP, DRY, KISS, YAGNI, Law of Demeter, plus additional design tenets like CQS, composition over inheritance, encapsulation, and immutability.
  • Decision support for code review: Helps reviewers spot principle violations and translate them into maintainability concerns.
  • Actionable refactoring mapping: Provides principle-to-refactoring quick maps (e.g., SRP → Extract Class/Method/Move Method, OCP → Replace Conditional with Polymorphism).

Quick Start

Load the design-principles skill text before performing any refactor or code review work to align decisions with SOLID/GRASP/DRY/KISS/YAGNI and the Law of Demeter.

Frequently Asked Questions about design-principles

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

FAQPage Schema
What design principles should I apply when refactoring code?

Refactoring code relies on design principles like SOLID, GRASP, DRY, KISS, and YAGNI to translate structural rules into actionable change strategies. These principles resolve tension between correctness and simplicity by mapping specific violations, such as SRP issues, directly to refactoring methods like Extract Class.

How do I spot SOLID and DRY violations during a code review?

Spotting SOLID and DRY violations during code review involves identifying high coupling and low cohesion. Reviewers translate these structural principle violations into maintainability concerns by applying quick maps, such as replacing conditionals with polymorphism for OCP breaches or extracting methods for Law of Demeter infractions.

How do I resolve conflicts between SOLID, DRY, and KISS principles?

Resolving conflicts between SOLID, DRY, and KISS principles requires applying a practical prioritization order to maintainable change strategies. This approach evaluates the tension between low coupling and simplicity, ensuring that design tenets like composition over inheritance and immutability are balanced effectively.

What is the best way to map SOLID violations to specific refactoring techniques?

The best way to map SOLID violations to refactoring techniques is using a principle-to-refactoring quick map. For example, SRP maps to Extract Class or Move Method, while OCP maps to Replace Conditional with Polymorphism, directly translating design flaws into maintainable code changes.

When should I use the Law of Demeter versus GRASP in software design?

Use the Law of Demeter to reduce tight coupling by limiting method chaining, while applying GRASP patterns guides overall responsibility assignment in software design. Both principles support low coupling and encapsulation, but the Law of Demeter specifically targets object interaction boundaries.