Help us improve
Share bugs, ideas, or general feedback.
From refactor-engine
Extracts code block into well-named reusable function with typed params/returns/docstring. Replaces original with call, optionally moves to utils, verifies tests pass.
npx claudepluginhub rohitg00/awesome-claude-code-toolkit --plugin refactor-engineHow this command is triggered — by the user, by Claude, or both
Slash command
/refactor-engine:extract-fnThe summary Claude sees in its command listing — used to decide when to auto-load this command
Extract a block of code into a well-named, reusable function with proper typing. ## Steps 1. Identify the code block to extract: - Accept file path with line range, or a description of the logic. - If no range given, detect the longest or most complex function and suggest extraction. 2. Analyze the code block: - Variables read from outer scope become function parameters. - Variables written and used later become return values. - Side effects (I/O, mutations) are documented in the function's contract. 3. Determine the function signature: - Name: verb + noun describing the...
/extractExtracts functions, components, modules, hooks, or class methods from code into new units. Analyzes dependencies, replaces inline code with calls, updates imports, and verifies with tests.
/sc-refactorPlans refactoring opportunities in code or executes specific behavior-preserving refactors like extract/rename/simplify, verifying with tests before/after.
/refractorRefactors provided code following best practices and design patterns. Maintains functionality; improves readability, extracts reusable components, optimizes performance, applies modern conventions, adds type safety. Explains each change.
Share bugs, ideas, or general feedback.
Extract a block of code into a well-named, reusable function with proper typing.
calculateTotalPrice).Extracted: <functionName>
From: <file>:<startLine>-<endLine>
To: <destination file>
Params: (<paramList>)
Returns: <returnType>
Tests: passing