review-clean-code
Skill337 starsChanged 10 months agoMITView on GitHub
Analyze code quality based on "Clean Code" principles. Identify naming, function size, duplication, over-engineering, and magic number issues with severity ratings and refactoring suggestions. Use when the user requests code quality checks, refactoring advice, Clean Code analysis, code smell detection, or mentions terms like code review, code quality, refactoring check.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MrCipherSmith/goodai-basetheir own version, first seen Jun 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- MrCipherSmith/goodai-base★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- review-clean-codeSkill
- review-doc-consistencySkill
- review-merge-readinessSkill
- workflow-execute-plansSkill
- workflow-template-extractorSkill
- workflow-template-seederSkill
- cloudflareSkill
- deep-researchSkill
- mcp-cloudflareSkill
- mcp-stripeSkill
- mcp-supabaseSkill
- publish-x-articleSkill
- review-doc-consistencySkill
- review-merge-readinessSkill
- review-qualitySkill
- review-react-best-practicesSkill
- review-seo-auditSkill
- skill-creatorSkill
- skill-evolutionSkill
- skill-improverSkill
- stripeSkill
- supabaseSkill
- tool-ast-grep-rulesSkill
- tool-better-authSkill
- tool-design-style-selectorSkill
- tool-hooks-doctorSkill
- tool-openclawSkill
- tool-programmatic-seoSkill
- tool-schema-markupSkill
- tool-systematic-debuggingSkill
- tool-ui-ux-pro-maxSkill
- tool-x-article-publisherSkill
- workflow-brainstormSkill
- workflow-creatorSkill
- workflow-execute-plansSkill
- workflow-feature-shipperSkill
- workflow-project-intakeSkill
- workflow-ship-fasterSkill
- workflow-template-extractorSkill
- workflow-template-seederSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
All suggestions target implementation approach only—never suggest changing the code's functionality, output, or behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clean Code Review
Focused on 7 high-impact review dimensions based on "Clean Code" principles.
Review Workflow
Review Progress:
- [ ] 1. Scan codebase: identify files to review
- [ ] 2. Check each dimension (naming, functions, DRY, YAGNI, magic numbers, clarity, conventions)
- [ ] 3. Rate severity (High/Medium/Low) for each issue
- [ ] 4. Generate report sorted by severityCore Principle: Preserve Functionality
All suggestions target implementation approach only—never suggest changing the code's functionality, output, or behavior.
Check Dimensions
1. Naming Issues【Meaningful Names】
Check for:
- Meaningless names like
data1,temp,result,info,obj - Inconsistent naming for same concepts (
get/fetch/retrievemixed)
// ❌
const d = new Date();
const data1 = fetchUser();
// ✅
const currentDate = new Date();
const userProfile = fetchUser();2. Function Issues【Small Functions + SRP】
Check for:
- Functions exceeding 100 lines
- More than 3 parameters
- Functions doing multiple things
// ❌ 7 parameters
function processOrder(user, items, address, payment, discount, coupon, notes)
// ✅ Use parameter object
interface OrderParams { user: User; items: Item[]; shipping: Address; payment: Payment }
function processOrder(params: OrderParams)3. Duplication Issues【DRY】
Check for:
- Similar if-else structures
- Similar data transformation/error handling logic
- Copy-paste traces
4. Over-Engineering【YAGNI】
Check for:
if (config.legacyMode)branches that are never true- Interfaces with only one implementation
- Useless try-catch or if-else
// ❌ YAGNI violation: unused compatibility code
if (config.legacyMode) {
// 100 lines of compatibility code
}5. Magic Numbers【Avoid Hardcoding】
Check for:
- Bare numbers without explanation
- Hardcoded strings
// ❌
if (retryCount > 3) // What is 3?
setTimeout(fn, 86400000) // How long is this?
// ✅
const MAX_RETRY_COUNT = 3;
const ONE_DAY_MS = 24 * 60 * 60 * 1000;6. Structural Clarity【Readability First】
Check for:
- Nested ternary operators
- Overly compact one-liners
- Deep conditional nesting (> 3 levels)
// ❌ Nested ternary
const status = a ? (b ? 'x' : 'y') : (c ? 'z' : 'w');
// ✅ Use switch or if/else
function getStatus(a, b, c) {
if (a) return b ? 'x' : 'y';
return c ? 'z' : 'w';
}7. Project Conventions【Consistency】
Check for:
- Mixed import order (external libs vs internal modules)
- Inconsistent function declaration styles
- Mixed naming conventions (camelCase vs snake_case)
// ❌ Inconsistent style
import { api } from './api'
import axios from 'axios' // External lib should come first
const handle_click = () => { ... } // Mixed naming style
// ✅ Unified style
import axios from 'axios'
import { api } from './api'
function handleClick(): void { ... }[!TIP] Project conventions should refer to
CLAUDE.md,AGENTS.md, or project-defined coding standards.
Severity Levels
| Level | Criteria |
| High | Affects maintainability/readability, should fix immediately |
| Medium | Room for improvement, recommended fix |
| Low | Code smell, optional optimization |
Output Format
### [Issue Type]: [Brief Description]
- **Principle**: [Clean Code principle]
- **Location**: `file:line`
- **Severity**: High/Medium/Low
- **Issue**: [Specific description]
- **Suggestion**: [Fix direction]Artifacts (Pipeline Mode)
- Output:
clean-code-review.md(human-readable report) - Output:
clean-code-review.json(structured issue list for aggregation/deduplication/statistics)
References
Detailed examples: See detailed-examples.md
- Complete cases for each dimension (naming, functions, DRY, YAGNI, magic numbers)
Language patterns: See language-patterns.md
- TypeScript/JavaScript common issues
- Python common issues
- Go common issues
Multi-Agent Parallel
Split by the following dimensions for parallel multi-agent execution:
- By check dimension - One agent per dimension (7 total)
- By module/directory - One agent per module
- By language - One agent each for TypeScript, Python, Go
- By file type - Components, hooks, utilities, type definitions
Example: /review-clean-code --scope=components or --dimension=naming
Deduplication and unified severity rating needed when aggregating.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

