clean-code
Documentation & Productivité"Applies principles from Robert C. Martin's 'Clean Code'. Use this skill when writing, reviewing, or refactoring code to ensure high quality, readability, and maintainability. Covers naming, functions, comments, error handling, and class design."
Documentation
Clean Code Skill
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
🧠 Core Philosophy
> "Code is clean if it can be read, and enhanced by a developer other than its original author." — Grady Booch
When to Use
Use this skill when:
1. Meaningful Names
elapsedTimeInDays instead of d.accountList if it's actually a Map.ProductData vs ProductInfo.genymdhms.Customer, WikiPage). Avoid Manager, Data.postPayment, deletePage).2. Functions
isPasswordValid is better than check.3. Comments
```python
# Check if employee is eligible for full benefits
if employee.flags & HOURLY and employee.age > 65:
```
vs
```python
if employee.isEligibleForFullBenefits():
```
4. Formatting
5. Objects and Data Structures
a.getB().getC().doSomething().6. Error Handling
NullPointerException.7. Unit Tests
8. Classes
9. Smells and Heuristics
🛠️ Implementation Checklist
Compétences similaires
Explorez d'autres agents de la catégorie Documentation & Productivité
data-engineer
Build scalable data pipelines, modern data warehouses, and
nodejs-backend-patterns
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
dotnet-backend-patterns
Master C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.