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

Installs
42
GitHub Stars
12
First Seen
Jan 22, 2026
single-responsibility-principle — yanko-belov/code-craft