← ClaudeAtlas

devpilot-clean-code-principleslisted

Use when writing, reviewing, or refactoring code and judging quality at the level of naming, function size, comments, error handling, class design, test quality, or code smells. Language-agnostic; defer to language-specific style skills (e.g. devpilot-google-go-style) when they conflict.
SiyuQian/devpilot · ★ 4 · Code & Development · score 70
Install: claude install-skill SiyuQian/devpilot
# Clean Code Principles Distilled from Robert C. Martin's *Clean Code: A Handbook of Agile Software Craftsmanship* (2008), incorporating contributions from Kent Beck, Ward Cunningham, Michael Feathers, and others. This skill captures **language-agnostic** principles for writing code that is easy to read, change, and extend. When a language-specific style guide is loaded (e.g. Google Go Style), it takes precedence on syntax and idiom; this skill is still authoritative on higher-level judgment (naming intent, function design, abstractions, code smells). If no language-specific skill is loaded, the Conflict Resolution table below encodes the defaults — they are not "placeholders," they are the rulings to apply. ## Core Principles **You read code 10x more than you write it.** Optimize for the reader, not the author. **The Boy Scout Rule:** Leave the code cleaner than you found it. Small, continuous improvements prevent decay. Don't require permission to rename a variable or extract a function. **Clean code does one thing well.** Functions, classes, modules — each should have a single, clearly-named responsibility. If you need "and" to describe what it does, split it. **Meaningful names > comments.** A good name makes a comment unnecessary. If you need a comment to explain what a variable or function is, rename it. **"Does it do one thing?" is the real test — not line count.** If a function cannot be further decomposed into named sub-functions that each carry meaning, leav