Clean Code
Coding guide that applies Robert C. Martin's Clean Code rules to naming, functions, classes, errors, and tests.
- CCM score
- 53 of 100
- skills.sh installs
- 361
- GitHub stars
- 60
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers naming, functions, comments, objects and data structures, error handling, unit tests, and classes, with quick-reference tables for each
- Includes 7 chapter files (
names.md,functions.md,classes.md, and others) plus a reference of 66 code smells insmells-and-heuristics.md - Enforces rules such as no null returns, no flag arguments, at most three function arguments, and one reason to change per class
- Designed for reviewing, writing, or refactoring code that has become complex or hard to read
Install
$ npx -y skills add ratacat/claude-skills --skill clean-code -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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:
Details
- Repository
- github.com/ratacat/claude-skills
- Categories
- Code Review & Quality, Technical Documentation
- First seen
- Jun 3, 2026
Questions
What does the clean-code skill do for Claude Code?
The clean-code skill applies Robert C. Martin's Clean Code principles when Claude writes, reviews, or refactors code. It covers naming variables and functions, structuring classes, handling errors, and writing tests, and it helps when code feels complex or hard to understand.
How do I install the clean-code skill?
Run npx -y skills add ratacat/claude-skills --skill clean-code -y in your project to install it. After installation, Claude applies its guidance on naming, functions, classes, error handling and tests when it works on code.
Which skills lead clean-code in the Code Review & Quality category?
In the Code Review & Quality category, clean-code sits alongside improve-codebase-architecture, codebase-design, code-review, setup-ts-deep-modules and caveman-review. Its focus is on readability and maintainability at the level of names, functions, classes and tests.
Does clean-code need any accounts, keys or extra tools?
The listing and SKILL.md give no accounts, API keys or extra tools for clean-code. It is a knowledge skill that Claude applies to code it writes or reviews.
More from ratacat/claude-skills
All 3Similar to Clean Code
More Code Review & Qualitysolidramziddin/solid-skills3.8K installsOpinionated guide that turns coding work into senior-level practice through TDD, SOLID principles, and clean-code rules.
refactorpproenca/dot-skills668 installsStructured refactoring guide of 43 rules across eight prioritized categories, drawn from Fowler's catalog and Clean Code.
code-qualitymiles990/claude-software-skills787 installsClean code principles, SOLID patterns, and code review checklists with TypeScript examples for maintainable software.
code-simplifierpproenca/dot-skills1.7K installsConcise guide that simplifies recently modified code while preserving exact behavior across 47 rules.
typescript-clean-codebmad-labs/skills689 installsClean Code principles, TDD, and review checklists for TypeScript, drawn from Martin's books.