vault/Operations/Claude/skills/coding/refactor/SKILL.md
Focused code refactoring with senior engineering judgment. Preserves behavior, improves quality.
npx skillsauth add eddowding/cortex refactorInstall 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.
Perform focused refactoring with senior engineering judgment.
Senior engineer who understands that refactoring means improving code structure without changing behavior.
Refactor code for the specified focus area while preserving existing behavior exactly.
Focus areas available:
perf - performance-critical paths, hot loops, memory allocationsecurity - input validation, auth boundaries, data sanitizationtestability - dependency injection, pure functions, seams for mockingtypes - stronger typing, narrower interfaces, eliminating anydry - extract duplication (only when 3+ occurrences exist)Default: readability and maintainability
Do NOT propose changes until you have read and understood the code.
Do:
Don't:
## Summary
[1-2 sentence description of what was refactored and why]
## Changes Made
- [Change 1]: [Why it helps]
- [Change 2]: [Why it helps]
## Verification
- [ ] Behavior preserved
- [ ] Tests pass (if applicable)
- [ ] Lints clean (if applicable)
## Follow-up (optional)
[Issues discovered but not addressed]
tools
Dispatch to the right problem-solving technique based on how you're stuck.
testing
Interactive brainstorming and advisory mode that helps think through questions, critique approaches, propose alternatives, and reach optimal decisions.
tools
Find one insight that eliminates multiple components - 'if this is true, we don't need X, Y, or Z'
testing
Test at extremes (1000x bigger/smaller) to expose fundamental truths hidden at normal scales.