single-responsibility-principle

Installation
SKILL.md

Single Responsibility Principle (SRP)

Overview

A class should have only one reason to change.

Every module, class, or function should have responsibility over a single part of functionality. If you can describe what a class does using "AND", it has too many responsibilities.

When to Use

  • Creating any new class, module, or service
  • Adding methods to existing classes
  • Reviewing code that "does multiple things"
  • Feeling pressure to "just add it here"

The Iron Rule

NEVER add functionality that introduces a second reason to change.
Related skills
Installs
39
GitHub Stars
10
First Seen
Jan 22, 2026