clean-code
Audited by Runlayer on Feb 23, 2026
Malicious tool definition detected
Tool: SKILL.md [1/3] Description: --- name: clean-code description: '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", or "readable code".
Tool: SKILL.md [2/3] Description: scan a newspaper: headlines first, details on demand.
Tool: SKILL.md [3/3] Description: `SearchCriteria` groups related params | | **Feature envy** | Move method to data's class | `order.calculateTotal()` not `calculator.total(order)` | | **Dead code** | Delete it | Remove unused functions, unreachable branches | | **Magic numbers** | Named constants | `MAX_LOGIN_ATTEMPTS = 5` not bare `5` | | **Shotgun surgery** | Consolidate related changes | Group scattered logic into a single module | See: [references/code-smells.md](references/code-smells.md)
Malicious tool definition detected
Tool: references/code-smells.md [1/3] Description: # Code Smells and Heuristics Comprehensive catalog of code smells organized by category, with identification criteria and targeted refactorings. Based on Robert C. Martin's *Clean Code*, Chapter 17.
Tool: references/code-smells.md [2/3] Description: condition.** Things that commonly fail at boundaries: | Boundary | Common failure | |----------|---------------| | Empty input | NullPointerException, IndexOutOfBounds | | Single element | Off-by-one in loops | | Maximum capacity | Buffer overflow, performance cliff | | Negative values | Unexpected results in calculations | | Unicode | Encoding issues, wrong string length | | Concurrent access | Race conditions, deadlocks | ### G4: Overridden Sa
Tool: references/code-smells.md [3/3] Description: get suffix: `UserServiceImpl`) | | Type suffix | `nameString` | `name` | --- ## Test Smells ### T1: Insufficient Tests A test suite should test everything that could possibly break.
Malicious tool definition detected
Tool: references/comments-formatting.md [1/2] Description: # Comments and Formatting Comprehensive guide to comment discipline and code formatting. Based on Robert C. Martin's *Clean Code*, Chapters 4 and 5.
Tool: references/comments-formatting.md [2/2] Description: --- ## Formatting ### Why Formatting Matters Code formatting is about communication, and communication is the professional developer's first order of business.
Malicious tool definition detected
Tool: references/error-handling.md [1/2] Description: # Error Handling Comprehensive guide to writing clean error handling that keeps business logic readable.
Tool: references/error-handling.md [2/2] Description: checking for null to handle a special case, create an object that handles the special case.
Malicious tool definition detected
Tool: references/functions-and-methods.md [1/2] Description: # Functions and Methods Comprehensive guide to writing small, focused functions that do one thing well. Based on Robert C. Martin's *Clean Code*, Chapters 3 and 4.
Tool: references/functions-and-methods.md [2/2] Description: | ### Extraction Example ```typescript // BEFORE: Deeply nested, hard to follow function processOrders(orders: Order[]) { for (const order of orders) { if (order.status === 'pending') { let total = 0; for (const item of order.items) { if (item.inStock) { total += item.price * item.quantity; if (item.quantity > 10) { total *= 0.9; // bulk discount } } } if (total > 0) { order.total = total; order.status = 'processed'; db.save(order); em
Malicious tool definition detected
Tool: references/naming-conventions.md [1/2] Description: # Naming Conventions Comprehensive guide to choosing names that reveal intent, avoid disinformation, and make code read like well-written prose. Based on Robert C.
Tool: references/naming-conventions.md [2/2] Description: Naming Conventions by Language ### Python - `snake_case` for functions and variables: `calculate_total`, `user_count` - `PascalCase` for classes: `UserAccount`, `OrderProcessor` - `UPPER_SNAKE_CASE` for constants: `MAX_RETRIES`, `DEFAULT_TIMEOUT` - `_leading_underscore` for private: `_internal_cache` - `__dunder__` for magic methods: `__init__`, `__str__` ### JavaScript/TypeScript - `camelCase` for functions and variables: `calculateTotal
Malicious tool definition detected
Tool: references/testing-principles.md [1/2] Description: # Testing Principles Comprehensive guide to writing clean, maintainable tests that serve as executable documentation. Based on Robert C.
Tool: references/testing-principles.md [2/2] Description: random or fixed test data | | Network calls | Mock HTTP clients | | Database state | Use transactions that roll back, or in-memory DB | | File system | Use temp directories; clean up in teardown | | Environment variables | Set explicitly in test setup | ### Self-Validating Tests should have a boolean output: pass or fail.