brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
clean-codeApplies principles from Robert C. Martin's 'Clean Code'. Use when writing, reviewing, or refactoring code to ensure high quality, readability, and maintainability. Covers naming, functions, comments, formatting, error handling, unit tests, classes, and code smells. Language-agnostic — applies to Java, TypeScript, Python, Dart, and all workspace stacks.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: clean-code description: "Applies principles from Robert C. Martin's 'Clean Code'. Use when writing, reviewing, or refactoring code to ensure high quality, readability, and maintainability. Covers naming, functions, comments, formatting, error handling, unit tests, classes, and code smells. Language-agnostic — applies to Java, TypeScript, Python, Dart, and all workspace stacks." allowed-tools:
Iron Law: Before applying any principle, READ the relevant source file first. Do not refactor or flag issues based on memory — verify the actual code (file:line) before making any claim.
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."
"Code is clean if it can be read, and enhanced by a developer other than its original author." — Grady Booch
elapsedTimeInDays instead of d.accountList if it's actually a Map.ProductData vs ProductInfo.genymdhms.Customer, WikiPage). Avoid Manager, Data.postPayment, deletePage).isPasswordValid is better than check.# BAD: comment explains intent that code should express
if employee.flags & HOURLY and employee.age > 65:
# GOOD: code expresses intent directly
if employee.isEligibleForFullBenefits():
// BAD — violates Law of Demeter
String city = order.getCustomer().getAddress().getCity();
// GOOD — delegate to the object
String city = order.getCustomerCity();
NullPointerException / NullError. Validate at boundaries.This section reinforces
code-standards.mderror handling rules ("No Silent Failures"). These are consistent — not conflicting.
Don't do these — they are the most common clean code violations in this codebase.
i, j) — name by intentnull or an empty list on error — throw or return an explicit error stateAfter applying any clean code refactor, run the following to confirm nothing regressed:
# Run all tests — refactors must not change behavior
# Java
mvn test
# NestJS / Angular
npm test
# Python
uv run pytest
# Flutter / Dart
flutter test
Also check:
git diff — confirm no behavior-changing lines snuck into a "rename only" refactorgrep -n "as any\|: any\b" <changed files> — zero new any types in TypeScriptflutter analyze — zero new warnings in Dart