Write readable, maintainable code through disciplined naming, small functions, and clean error handling. Use when the user mentions "code review", "naming conventions", "function too long", "code smells", "readable code", "boy scout rule", "single responsibility", or "unit test quality". Also trigger when reviewing pull requests for readability, refactoring messy functions, debating comment styles, or improving error handling patterns. Covers SRP, comment discipline, formatting, and unit testing
The clean-code skill provides a structured framework for improving code readability, maintainability, and overall quality. It helps developers evaluate and refine code by focusing on principles that make software easier to understand, debug, and extend over time. The skill is designed around the idea that code is read far more often than it is written, encouraging practices that communicate intent clearly and reduce cognitive overhead for future readers. It is particularly useful during code reviews, pull request evaluations, legacy code cleanup, and general code quality assessments.
Its capabilities include applying clean code principles such as meaningful naming, disciplined function design, consistent error handling, formatting standards, comment discipline, and unit test quality evaluation. The framework includes a scoring model from 0 to 10 that measures adherence to clean code practices and provides concrete guidance for improvement. It emphasizes intent-revealing names, small and focused functions, consistent terminology, the Single Responsibility Principle (SRP), and the Boy Scout Rule of leaving code cleaner than it was found.
This skill is intended for software developers, engineering teams, technical leads, and reviewers who want to improve code quality and maintainability. Common use cases include reviewing pull requests for readability, identifying code smells, improving naming conventions, evaluating long or complex functions, discussing comment strategies, strengthening unit tests, and recommending cleaner error-handling approaches. It can be applied across programming languages because the principles focus on code clarity and craftsmanship rather than language-specific features.
Use it when reviewing code quality, evaluating pull requests, improving naming conventions, refactoring long functions, addressing code smells, or assessing unit test quality.
No. The framework is based on general clean code principles that can be applied across different programming languages and technology stacks.
The skill rates code on a scale from 0 to 10 based on factors such as naming clarity, function focus, error handling consistency, and test quality. It also identifies improvements needed to achieve a higher score.
Yes. It can be used to identify readability issues, unclear naming, oversized functions, duplicated logic, and other maintainability concerns in existing codebases.
It evaluates code using the principles described in the framework and does not define language-specific APIs, refactoring implementations, or architecture patterns beyond the provided clean code guidance.
Quick Setup:
.claude/skills/Repository
wondelai/skills