Skill
code-simplify
Review and simplify code — extract reusable utilities, reduce duplication, improve naming, simplify logic, and enhance readability. Use when the user says "simplify", "clean up", "refactor", "reduce complexity", "code smell", or after implementation to improve code quality.
From project-orchestratorInstall
1
Run in your terminal$
npx claudepluginhub vivekmano27/agent-orchestrator --plugin project-orchestratorTool Access
This skill is limited to using the following tools:
ReadWriteEditBashGrepGlob
Skill Content
Code Simplify Skill
Review changed code and fix quality issues automatically.
What to Look For
- Duplication — Extract shared logic into utilities
- Complexity — Simplify nested conditionals, reduce cyclomatic complexity
- Naming — Variables/functions should describe what, not how
- Long functions — Break into smaller, single-responsibility functions
- Dead code — Remove unused imports, variables, functions
- Magic numbers — Extract into named constants
- Deep nesting — Use early returns, guard clauses
- Inconsistent patterns — Align with project conventions
Refactoring Patterns
Before: Deep Nesting
function processOrder(order) {
if (order) {
if (order.items.length > 0) {
if (order.status === 'pending') {
// actual logic buried 3 levels deep
}
}
}
}
After: Guard Clauses
function processOrder(order) {
if (!order) return;
if (order.items.length === 0) return;
if (order.status !== 'pending') return;
// actual logic at top level
}
Before: Duplication
// Same validation in 3 places
const isValidEmail = email => /^[^@]+@[^@]+\.[^@]+$/.test(email);
After: Shared Utility
// lib/validation.ts — used everywhere
export const isValidEmail = (email: string): boolean =>
/^[^@]+@[^@]+\.[^@]+$/.test(email);
Process
- Run
git diffto see all changed files - For each file, check the 8 quality criteria
- Fix issues directly — don't just flag them
- Run tests to verify behavior unchanged
- Create commit:
refactor(scope): simplify [what was improved]
Similar Skills
Stats
Parent Repo Stars0
Parent Repo Forks0
Last CommitMar 15, 2026