Help us improve
Share bugs, ideas, or general feedback.
From claude-code-toolkit
Simplifies code to improve readability and maintainability by reducing nesting, extracting functions, improving naming, removing duplication, simplifying conditionals, and verifying with tests.
npx claudepluginhub rohitg00/awesome-claude-code-toolkitHow this command is triggered — by the user, by Claude, or both
Slash command
/claude-code-toolkit:simplifyrefactoring/The summary Claude sees in its command listing — used to decide when to auto-load this command
Simplify code to improve readability and maintainability. ## Steps ### 1. Reduce Nesting - Convert nested if/else chains to early returns (guard clauses). - Replace nested loops with flatMap, reduce, or helper functions. - Extract deeply nested callbacks into named functions. - Target: maximum 3 levels of indentation in any function. ### 2. Extract Functions - Identify code blocks with a comment explaining what they do. The comment is a sign the block should be a function with that name. - Extract repeated logic into shared functions. - Each function should do one thing. If you need "and...
/simplifySimplifies complex code by reducing nesting, eliminating duplication, and improving clarity. Produces a report with before/after metrics, code changes, explanations, and test results.
/code-simplifySimplifies recently changed or specified code for clarity and maintainability without altering behavior — applies guard clauses, extracts helpers, splits functions, renames, deduplicates, and removes dead code with incremental test validation.
/simplifySimplifies and refactors target code files or modules, reducing complexity and duplication while preserving behavior with included tests.
/simplify-fnRefactors complex function to reduce cyclomatic complexity via extract method, guard clauses, loop decomposition, and polymorphism. Runs/writes tests, preserves behavior, targets score <=5, reports improvement.
/code-simplifierSimplifies recent code changes by analyzing git diffs for duplicates, dead code, over-engineering; proposes before/after diffs and applies after approval with tests.
/simplifySimplifies specified system or approach to essentials by applying constraints: no unproven abstractions, no hypothetical solutions, prefer simple over complex, remove valueless elements.
Share bugs, ideas, or general feedback.
Simplify code to improve readability and maintainability.
i, j, k).usr -> user, btn -> button, cfg -> config.isValid, hasPermission, canEdit.is, has, can, should.