Clean Code
Use when writing, reviewing, or refactoring code. Apply when naming variables or functions, structuring classes, handling errors, writing tests, or when code feels complex or hard to understand. Based on Robert C. Martin's Clean Code.
Install
npx skills add ratacat/claude-skills --skill clean-codegit clone --depth 1 https://github.com/ratacat/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/skills/clean-code ~/.claude/skills/clean-codePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Clean Code ## Overview Clean code reads like well-written prose. Every name reveals intent. Every function tells a story. Every class has a single purpose. The goal isn't just working code—it's code that others can understand quickly, modify safely, and extend confidently. > "Clean code always looks like it was written by someone who cares." — Michael Feathers > "You know you are working on clean code when each routine turns out to be pretty much what you expected." — Ward Cunningham **The Boy Scout Rule:** Leave the code cleaner than you found it. Every commit should improve quality, even if just slightly. Small improvements compound. ## Chapter References This skill provides an overview with quick references. For detailed guidance with examples, see the chapter files: - `chapters/names.md` - Meaningful Names (intention-revealing, searchable, pronounceable) - `chapters/functions.md` - Functions (small, do one thing, few arguments) - `chapters/comments.md` - Comments (why to avoid, what's acceptable) - `chapters/objects-and-data.md` - Objects and Data Structures (Law of Demeter, DTOs) - `chapters/error-handling.md` - Error Handling (exceptions, null handling, Special Case Pattern) - `chapters/tests.md` - Unit Tests (TDD, F.I.R.S.T., clean tests) - `chapters/classes.md` - Classes (SRP, cohesion, OCP, DIP) - `smells-and-heuristics.md` - Complete code smells reference (66 smells with explanations) ## Quick Reference: Names
Details
- Skill name
clean-code- Repository
- ratacat/claude-skills
- Path
skills/clean-code/SKILL.md- Repo updated
- 11 February 2026
FAQ
What does the Clean Code skill do?
Use when writing, reviewing, or refactoring code. Apply when naming variables or functions, structuring classes, handling errors, writing tests, or when code feels complex or hard to understand. Based on Robert C. Martin's Clean Code.
How do I install the Clean Code skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add ratacat/claude-skills --skill clean-code. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Clean Code popular?
It lives in ratacat/claude-skills, which has 59 GitHub stars and 10 forks.
Related skills
Skill Creator
59ratacat/claude-skills
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
Skill Installer
59ratacat/claude-skills
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
Agent Browser
59ratacat/claude-skills
Browser automation using Vercel's agent-browser CLI. Use when you need to interact with web pages, fill forms, take screenshots, or scrape data. Alternative to Playwright MCP - uses Bash commands with ref-based element selection. Triggers on "browse website", "fill form", "click button", "take screenshot", "scrape page", "web automation".
Code Simplicity Reviewer
59ratacat/claude-skills
Use this agent when you need a final review pass to ensure code changes are as simple and minimal as possible. This agent should be invoked after implementation is complete but before finalizing changes, to identify opportunities for simplification, remove unnecessary complexity, and ensure adherence to YAGNI principles. Examples: <example>Context: The user has just implemented a new feature and wants to ensure it's as simple as possible. user: "I've finished implementing the user authentication system" assistant: "Great! Let me review the implementation for simplicity and minimalism using the
Beautiful Mermaid Ascii
59ratacat/claude-skills
Render Mermaid diagrams as readable ASCII/Unicode art in the terminal (from .mmd/.mermaid files, stdin, or Markdown ```mermaid fences). Use when installing or using lukilabs/beautiful-mermaid, creating a CLI renderer for Mermaid-to-ASCII output, previewing Mermaid diagrams in terminal, or extracting/rendering Mermaid blocks from Markdown files.
Data Systems Architecture
59ratacat/claude-skills
Use when designing databases for data-heavy applications, making schema decisions for performance, choosing between normalization and denormalization, selecting storage/indexing strategies, planning for scale, or evaluating OLTP vs OLAP trade-offs. Also use when encountering N+1 queries, ORM issues, or concurrency problems.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.