Help us improve
Share bugs, ideas, or general feedback.
From kernel
Safe, test-gated refactoring methodology: behavior-preserving transformations (extract, inline, rename, move, simplify, delete) enforced with full test runs before, during, and after each change.
npx claudepluginhub ariaxhan/kernel-claude --plugin kernelHow this skill is triggered — by the user, by Claude, or both
Slash command
/kernel:refactorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<skill id="refactor">
Safely refactors code with test coverage: writes tests first if absent, plans changes, applies small testable steps, verifies tests/lint/typecheck pass without behavior changes.
Refactors code step-by-step with test verification at each step. One transformation, one test run, one commit. Supports target, sweep, and extract modes.
Safely refactors code test-first: verifies/writes tests, one structural change at a time, preserves behavior. Use for 'refactor this', 'clean this up', reorganization.
Share bugs, ideas, or general feedback.
git log for overlapping changesrefactor(scope): description. File must end shorter or justify growth in commit body.<anti_patterns> Large refactors in one commit. Impossible to review or revert. Refactoring without test coverage. You can't verify behavior preservation. Adding features during refactor. Separate concerns, separate commits. Abstracting before you have 3 concrete examples. Wait for patterns to emerge. "While I'm here, I'll also..." No. Separate contract. </anti_patterns>
<on_complete> agentdb write-end '{"skill":"refactor","type":"<extract|inline|rename|simplify>","files_touched":,"tests_status":"green","behavior_changed":false}'
Record what was refactored and verify tests remained green throughout. </on_complete>