clean-code
Code review and refactoring guidance based on Robert C. Martin's Clean Code principles.
- Covers nine core areas: meaningful naming conventions, function design (size, single responsibility, argument limits), comment best practices, formatting standards, object and data structure patterns, error handling strategies, unit testing discipline, class design, and code smell identification
- Provides actionable guidance for writing new code, reviewing pull requests, refactoring legacy code, and establishing team standards
- Includes specific anti-patterns to avoid (disinformation in names, side effects, null returns, chained method calls) and positive patterns to adopt (intention-revealing names, exception-based error handling, TDD principles)
- Offers a practical implementation checklist for validating code quality across function size, naming clarity, test coverage, and argument complexity
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:
- Writing new code: To ensure high quality from the start.
- Reviewing Pull Requests: To provide constructive, principle-based feedback.
- Refactoring legacy code: To identify and remove code smells.
- Improving team standards: To align on industry-standard best practices.
1. Meaningful Names
- Use Intention-Revealing Names:
elapsedTimeInDaysinstead ofd. - Avoid Disinformation: Don't use
accountListif it's actually aMap. - Make Meaningful Distinctions: Avoid
ProductDatavsProductInfo. - Use Pronounceable/Searchable Names: Avoid
genymdhms.
More from sickn33/antigravity-awesome-skills
docker-expert
You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.
15.0Knodejs-best-practices
Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
11.2Ktypescript-expert
TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling.
8.3Kapi-security-best-practices
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
7.0Knextjs-best-practices
Next.js App Router principles. Server Components, data fetching, routing patterns.
5.1Knextjs-supabase-auth
Expert integration of Supabase Auth with Next.js App Router
4.8K