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é
claude-scientific-skills
"Scientific research and analysis skills"
terraform-skill
"Terraform infrastructure as code best practices"
d3-viz
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.