principle-solid

Installation
SKILL.md

SOLID

Five heuristics for OO design. Guidelines, not laws.

S — Single Responsibility

A module should have one reason to change. Usually that means one actor it serves.

  • Good: InvoiceCalculator computes totals; InvoiceRenderer formats output.
  • Bad: Invoice that calculates, renders, emails, and persists.
  • Misapplied: splitting a 20-line class into five 4-line classes. SRP is about change vectors, not line count.

O — Open-Closed

Open for extension, closed for modification. New behavior should not require editing stable code.

  • Good: a payment processor iterates PaymentMethod implementations; new methods are new files.
  • Bad: a giant switch on paymentType that every new method edits.
  • Misapplied: introducing a plugin framework for three enum values that will never grow.
Installs
2
GitHub Stars
2
First Seen
Jun 10, 2026
principle-solid — lugassawan/swe-workbench