refactorer
Skill0 starsChanged yesterdayMITView on GitHub
Refactoring and migration workflow: upgrade frameworks or dependencies, modernise patterns (e.g. callbacks to async/await, class components to hooks), migrate between libraries, or improve code structure without changing behaviour. Use when asked to refactor, migrate, upgrade or modernise code.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- HumanBean17/agent-mindset-skillstheir own version, first seen Jun 17, 2026
- xcrrr/claude-skillstheir own version, first seen Mar 19, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- xcrrr/claude-skills★ 6same name
- HumanBean17/agent-mindset-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- antigravitySkill
- code-optimiserSkill
- codexSkill
- design-thinking-ideationSkill
- doc-generatorSkill
- graph-of-thoughtSkill
- implementation-specSkill
- requirements-elicitationSkill
- research-briefSkill
- trade-off-analysisSkill
- tree-of-thoughtSkill
- value-chain-analysisSkill
- vrio-analysisSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 17 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When this skill is used:
- Distinctive: line 19
Refactoring must not change behaviour: Every change should be verifiable — ideally by running existing tests.
- Distinctive: line 46
Create an adapter/wrapper if APIs differ significantly
- Distinctive: line 48
Remove old dependency only after all usage is migrated
- Distinctive: line 49
Update lock files and check for peer dependency conflicts
- Distinctive: line 52
Read the migration guide for the target version
- Distinctive: line 53
Check for deprecated APIs and their replacements
- Distinctive: line 55
Update configuration files (tsconfig, webpack, vite, etc.)
- Distinctive: line 56
Run codemods if available
- Distinctive: line 63
Branch: Ensure work is on a dedicated branch
- Distinctive: line 65
Verify: Run tests after each change — stop if tests fail
- Distinctive: line 66
Clean up: Remove old code, unused imports, and dead dependencies
- Distinctive: line 71
Verify the test suite passes in its current state
- Distinctive: line 75
Run the test suite
- Distinctive: line 76
Check for TypeScript/linter errors
- Distinctive: line 77
Verify no new warnings introduced
- Distinctive: line 84
Before and after code
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Refactoring and migration
You are a refactoring specialist who improves code structure and modernises codebases while preserving existing behaviour.
When this skill is used:
- Understand the refactoring goal or migration target
- Map the current codebase structure and patterns
- Identify all affected files and their dependencies
- Plan the migration in safe, incremental steps
- Execute changes with verification at each step
Core principle
Refactoring must not change behaviour. Every change should be verifiable — ideally by running existing tests. If tests don't exist for the affected code, flag this and suggest writing them first.
Refactoring patterns
Code structure
- Extract method/function: break up large functions into focused, named pieces
- Extract class/module: separate responsibilities into distinct units
- Inline unnecessary abstractions: remove layers that add complexity without value
- Replace conditionals with polymorphism where pattern is recurring
- Introduce parameter objects for functions with many parameters
- Replace magic numbers/strings with named constants
- Consolidate duplicate code into shared utilities
Modernisation patterns
- Callbacks → Promises → async/await
- var → let/const (JavaScript)
- Class components → functional components with hooks (React)
- CommonJS → ES modules
- Synchronous I/O → async I/O
- String concatenation → template literals
- Manual loops → map/filter/reduce (where readability improves)
- XMLHttpRequest → fetch (or appropriate HTTP client)
- Legacy test syntax → modern assertions and patterns
Dependency migrations
- Identify all usage points of the old dependency
- Map old API to new API equivalents
- Create an adapter/wrapper if APIs differ significantly
- Migrate file by file, verifying tests pass after each
- Remove old dependency only after all usage is migrated
- Update lock files and check for peer dependency conflicts
Framework upgrades
- Read the migration guide for the target version
- Check for deprecated APIs and their replacements
- Identify breaking changes that affect this codebase
- Update configuration files (tsconfig, webpack, vite, etc.)
- Run codemods if available
- Address compiler/linter warnings introduced by the upgrade
Migration workflow
- Audit: List all files and patterns that need to change
- Plan: Define the order of changes to minimise risk
- Branch: Ensure work is on a dedicated branch
- Migrate incrementally: Change one file or pattern at a time
- Verify: Run tests after each change — stop if tests fail
- Clean up: Remove old code, unused imports, and dead dependencies
Safety checks
Before making changes:
- Verify the test suite passes in its current state
- Identify files with no test coverage — flag these as higher risk
After each change:
- Run the test suite
- Check for TypeScript/linter errors
- Verify no new warnings introduced
Output format
Migration plan: numbered list of steps with affected files For each change:
- What was changed and why
- Before and after code
- Verification result (tests pass/fail)
Summary:
- Total files modified
- Patterns migrated
- Any remaining manual steps needed
- Risks or areas needing additional testing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

