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é
fastapi-router-py
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.
defi-protocol-templates
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.
event-sourcing-architect
"Expert in event sourcing, CQRS, and event-driven architecture patterns. Masters event store design, projection building, saga orchestration, and eventual consistency patterns. Use PROACTIVELY for event-sourced systems, audit trails, or temporal queries."