Clean Code Review Guide
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_15292d5a/yjkj-clean-code-review-1-0-0.
About this skill
The problem
- Reviews often stop at code that compiles, while vague names, long functions, deep nesting, magic numbers, comments that restate the code, and broken multi-file changes keep accumulating.
- This skill turns Clean Code principles into a checkable checklist, so review and self-testing have a consistent standard instead of relying only on instinct.
How it works
- Principles: It checks whether functions and classes follow
SRP,DRY,KISS,YAGNI, and the Boy Scout Rule, asking whether each unit does one thing, avoids duplication, and resists over-design. - Naming: It evaluates variables, functions, booleans, constants, classes, and enums for intent, replacing weak names like
tmp,data, andflag. - Functions: It looks at length, argument count, abstraction level, and side effects, favoring
guard clauses,early returns, andoptions objectsto reduce nesting and caller complexity. - Structure: It flags anti-patterns such as
God functions, one-functionutils.tsfiles, premature abstraction, copy-paste logic, stringly-typed code, and callback hell, then suggests extraction, composition, and discriminated unions. - Pre-edit safety: Before changing a file, it checks what imports it, what it imports, which tests cover it, and whether it is a shared component, then updates dependents, tests, and types in the same task.
- Completion checks: It verifies the goal, edited files, compilation, clean
lintor type checks, and missing edge cases.
Boundaries and cautions
- It fits code review, refactoring, multi-file changes, and quality constraints in AI-assisted development.
- It is a rules checklist, not a substitute for architecture, domain modeling, or performance profiling.
- Hard rules such as 20-line functions and 3-argument limits should be read with team conventions in mind; if business logic is inherently complex, split and rename first instead of mechanically forcing small pieces.
- The references to
Anti-Patterns,Code Smells, andRefactoring Catalogcan guide deeper study.
Use Cases
- Engineers check names, function length, nesting depth, and magic numbers before MR.
- Teams inspect importers, tests, and shared component impact before multi-file refactors.
- Reviewers use anti-pattern checks to spot over-abstraction or copy-paste in AI code.
- Developers verify builds, lint, type checks, and dependent file updates before completion.
Best For
- Backend engineers refactoring Java or TypeScript modules who want reviewable functions and names.
- Code reviewers checking AI-generated PRs for over-design, copy-paste, and weak naming.
- Library maintainers editing shared interfaces who need to confirm importers, tests, and consumers.
- Engineers preparing feature releases who need to verify builds, lint, type checks, and missed files.
Related Skills
Android Dependency Class Lookup
@user_d2af0937/android-lib-lookup
Automatically indexes Gradle-cached AAR/JAR dependency classes and returns library coordinates, versions, and public APIs by fully qualified name, using only the Python standard library.
Development
2026.08.29
↓ 363
General Algorithm Training
@user_db1d96f9/music-algo-train
Codifies AMT and YourMT3 training conventions, script patterns, hyperparameters, precision, checkpoints, and NaN safeguards.
Development
2026.08.29
↓ 363
PKM Knowledge Base Retrieval
@user_e3c9e60f/test2333
Retrieve relevant chunks from a customer-managed PKM dataset by dataset_id and return concise, source-annotated answers.
Development
2026.08.29
↓ 363
Requirement-to-Testpoint Extraction
@user_827d1ddb/requirement-to-testpoints
Convert PRDs, user stories, or functional specs into prioritized test-point checklists covering functional, business-rule, boundary, exception, and non-functional dimensions.
Development
2026.08.29
↓ 349