Agent skill · Testing & QA

clean-code

Write readable, maintainable code through disciplined naming, small functions, and clean error handling. Use when the user mentions "clean up this code", "this function is too long", "code smells", "naming conventions", "boy scout rule", "single responsibility", or "unit test quality". Also trigger when reviewing a pull request for readability, untangling a messy function, debating comment styles, or improving error-handling patterns. Covers SRP, comment discipline, formatting, and unit testing. For refactoring techniques, see refactoring-patterns. For architecture and dependency rules, see cl

wondelaigithub.com/wondelaiGitHub ↗
claude-codeMIT
Install
npx skills add wondelai/skills --skill clean-code --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 7
SKILL.md size: 15 KB
Bundled scripts: none
Version: 1.4.0
Declared author: wondelai
Path: clean-code/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,835
Language: Shell
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Clean Code Framework A disciplined approach to writing code that communicates intent, minimizes surprises, and welcomes change. Apply these principles when writing new code, reviewing pull requests, refactoring legacy systems, or advising on code quality. ## Core Principle **Code is read far more often than it is written — optimize for the reader.** The read-to-write ratio is well over 10:1, so every naming choice, function boundary, and formatting decision either adds clarity or adds cost. Clean code reads like well-written prose: names reveal intent, functions tell a story one step at a time, and the Boy Scout Rule applies — always leave the code cleaner than you found it. ## Scoring **Goal: 10/10.** Rate any code 0-10 against the principles below. Report the current score and the specific improvements needed to reach 10/10. - **9-10:** Names reveal intent, functions are small and focused, error handling is consistent, tests are clean and comprehensive - **7-8:** Mostly clean with minor naming ambiguities or a few long functions; tests may lack edge cases - **5-6:** Mixed — good patterns alongside unclear names, duplicated logic, or inconsistent error handling - **3-4:** Long m

What's inside
Steps it walks through
  1. Core Principle
  2. Scoring
  3. The Clean Code Framework
  4. 1. Meaningful Names
  5. 2. Functions
  6. 3. Comments and Formatting
  7. 4. Error Handling
  8. 5. Unit Testing
  9. 6. Code Smells and Heuristics
  10. Common Mistakes
  11. Quick Diagnostic
  12. Further Reading
  13. About the Author
Ships with 6 files
  • references/code-smells.md
  • references/comments-formatting.md
  • references/error-handling.md
  • references/functions-and-methods.md
  • references/naming-conventions.md
  • references/testing-principles.md
More from skills
All skills →
About this skill
What does the clean-code skill do?

Write readable, maintainable code through disciplined naming, small functions, and clean error handling. Use when the user mentions "clean up this code", "this function is too long", "code smells", "naming conventions", "boy scout rule", "single responsibility", or "unit test quality". Also trigger when reviewing a pull request for readability, untangling a messy function, debating comment styles, or improving error-handling patterns. Covers SRP, comment discipline, formatting, and unit testing. For refactoring techniques, see refactoring-patterns. For architecture and dependency rules, see cl

How do I install it?

Run `npx skills add wondelai/skills --skill clean-code --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From wondelai/skills, a repository with 1,835 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going