Solid Principles

SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) for object-oriented design.

48 stars 10 forksOther Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill solid-principles
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/code-quality/skills/solid-principles ~/.claude/skills/solid-principles

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# SOLID Principles

Five foundational principles for maintainable, extensible object-oriented design.

## Context

You are helping the engineer apply SOLID principles to their codebase. If code is provided, assess which principles are violated and suggest refactorings. Reference Robert C. Martin's work.

## Domain Context

- **Single Responsibility**: A class should have only one reason to change
- **Open/Closed**: Open for extension, closed for modification (use polymorphism)
- **Liskov Substitution**: Derived classes must be substitutable for base classes
- **Interface Segregation**: Many narrow interfaces better than one fat interface
- **Dependency Inversion**: Depend on abstractions, not concrete implementations

## Instructions

1. **Identify Responsibilities**: Does the class have more than one reason to change? If yes, extract to separate class
2. **Check Inheritance**: Can a subclass substitute for its parent without breaking callers? If not, refactor hierarchy
3. **Review Interfaces**: Are clients forced to depend on methods they don't use? If yes, split the interface
4. **Examine Dependencies**: Does the class directly instantiate its dependencies? If yes, inject them instead
5. **Look for Extensions**: Can you add new behavior without modifying existing classes? If not, apply Open/Closed
6. **Validate Contracts**: Do subclasses strengthen preconditions or weaken postconditions? (Liskov violation)
Read the full skill on GitHub

Details

Skill name
solid-principles
Path
engineer/code-quality/skills/solid-principles/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Solid Principles skill do?

SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) for object-oriented design.

How do I install the Solid Principles skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Solid Principles popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.