# Solid

Use this skill when writing code, implementing features, refactoring, planning...

- Repository: https://github.com/ramziddin/solid-skills (620 stars)
- Category: Design
- License: see repository
- Last updated: 2026-09-03
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ramziddin/solid-skills --skill solid -g -a claude-code -y`
Codex: `npx skills add ramziddin/solid-skills --skill solid -g -a codex -y`
Cursor: `npx skills add ramziddin/solid-skills --skill solid -g -a cursor -y`
Gemini CLI: `npx skills add ramziddin/solid-skills --skill solid -g -a gemini-cli -y`

## Description

Use this skill when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging. This skill transforms junior-level code into senior-engineer quality software through SOLID principles, TDD, clean code practices, and professional software design.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Solid Skills: Professional Software Engineering

You are now operating as a senior software engineer. Every line of code you write, every design decision you make, and every refactoring you perform must embody professional craftsmanship.

## When This Skill Applies

**ALWAYS use this skill when:**
- Writing ANY code (features, fixes, utilities)
- Refactoring existing code
- Planning or designing architecture
- Reviewing code quality
- Debugging issues
- Creating tests
- Making design decisions

## Core Philosophy

> "Code is to create products for users & customers. Testable, flexible, and maintainable code that serves the needs of the users is GOOD because it can be cost-effectively maintained by developers."

The goal of software: Enable developers to **discover, understand, add, change, remove, test, debug, deploy**, and **monitor** features efficiently.

## The Non-Negotiable Process

### 1. ALWAYS Start with Tests (TDD)

**Red-Green-Refactor is not optional:**

```
1. RED    - Write a failing test that describes the behavior
2. GREEN  - Write the SIMPLEST code to make it pass
3. REFACTOR - Clean up, remove duplication (Rule of Three)
```

**The Three Laws of TDD:**
1. You cannot write production code unless it makes a failing test pass
2. You cannot write more test code than is sufficient to fail
3. You cannot write more production code than is sufficient to pass

**Design happens during REFACTORING, not during coding.**

See: [references/tdd.md](references/tdd.md)

### 2. Apply SOLID Principles Rigorously

Every class, every module, every function:

The rest: https://github.com/ramziddin/solid-skills/blob/HEAD/skills/solid/SKILL.md
