skills/ship-faster/skills/review-clean-code/SKILL.md
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.
npx skillsauth add enuno/claude-command-and-control review-clean-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Focused on 7 high-impact review dimensions based on "Clean Code" principles.
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 severity
All suggestions target implementation approach only—never suggest changing the code's functionality, output, or behavior.
Check for:
data1, temp, result, info, objget/fetch/retrieve mixed)// ❌
const d = new Date();
const data1 = fetchUser();
// ✅
const currentDate = new Date();
const userProfile = fetchUser();
Check for:
// ❌ 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)
Check for:
Check for:
if (config.legacyMode) branches that are never true// ❌ YAGNI violation: unused compatibility code
if (config.legacyMode) {
// 100 lines of compatibility code
}
Check for:
// ❌
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;
Check for:
// ❌ 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';
}
Check for:
// ❌ 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.
| Level | Criteria | |-------|----------| | High | Affects maintainability/readability, should fix immediately | | Medium | Room for improvement, recommended fix | | Low | Code smell, optional optimization |
### [Issue Type]: [Brief Description]
- **Principle**: [Clean Code principle]
- **Location**: `file:line`
- **Severity**: High/Medium/Low
- **Issue**: [Specific description]
- **Suggestion**: [Fix direction]
clean-code-review.md (human-readable report)clean-code-review.json (structured issue list for aggregation/deduplication/statistics)Detailed examples: See detailed-examples.md
Language patterns: See language-patterns.md
Split by the following dimensions for parallel multi-agent execution:
Example: /review-clean-code --scope=components or --dimension=naming
Deduplication and unified severity rating needed when aggregating.
tools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.