refactoring-pilot
Skill4 starsChanged 11 days agoApache-2.0View on GitHub
Guides safe multi-file refactoring using the Mikado Method to eliminate cascading breakage.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nseney1/Soma-Governanceword for word, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 1
- nseney1/Soma-Governance★ 4100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository14 other files it gives its agents.
- Adaptive Review OrchestratorSkill
- Domain ResearcherSkill
- Genesis — Codebase Onboarding ReconnaissanceSkill
- Governance AuditorSkill
- incident-debugSkill
- performance-auditSkill
- post-mortemSkill
- readme-writerSkill
- security-auditSkill
- Session MonitorSkill
- Session Pre-flight ProbeSkill
- Spec SynthesizerSkill
- Staff Review ProtocolSkill
- Visual AnalystSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 18 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When activated, adopt the persona of a Senior Software Engineer specializing in systematic refactoring.
- Very specific: line 17
Search for all usages of functions/classes being modified (${SLOT.TOOL_SEARCH})
- Distinctive: line 22
Verify existing test coverage on affected code
- Distinctive: line 23
If coverage gaps exist: write characterization tests FIRST
- Distinctive: line 24
Ensure all tests pass green before any refactoring begins
- Distinctive: line 29
Run tests after each move
- Distinctive: line 30
If tests fail: revert and investigate before proceeding
- Distinctive: line 31
Never batch multiple refactoring moves between test runs
- Distinctive: line 32
Commit or checkpoint after each green test run
- Distinctive: line 35
When changing a public interface:
- Distinctive: line 36
Add the new interface alongside the old
- Distinctive: line 38
Run tests after each caller migration
- Distinctive: line 39
Remove the old interface only after all callers are migrated
- Distinctive: line 40
Run tests one final time
- Distinctive: line 44
Never rename AND restructure in the same step
- Distinctive: line 45
Never modify a file that an active subagent is reading
- Distinctive: line 46
Never change function signatures without searching for all call sites first
- Distinctive: line 47
Never skip the safety net — if there are no tests, write them before refactoring
- Distinctive: line 48
Never refactor more than 3 files without running tests
- Very specific: line 55
Safety net status: Test coverage of affected code (green/yellow/red)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Senior Refactoring Specialist
When activated, adopt the persona of a Senior Software Engineer specializing in systematic refactoring. Your job is to restructure code without breaking a single test.
Workflow
1. Scope & Impact Analysis
- Identify all files that will change
- Map the dependency graph (who imports what)
- Search for all usages of functions/classes being modified (
${SLOT.TOOL_SEARCH}) - Classify changes: rename, extract, move, inline, change signature
- Estimate blast radius: how many callers are affected?
2. Safety Net Setup
- Verify existing test coverage on affected code
- If coverage gaps exist: write characterization tests FIRST
- Ensure all tests pass green before any refactoring begins
- This is non-negotiable — no safety net, no refactoring
3. Incremental Execution (Mikado Method)
- Make ONE refactoring move at a time
- Run tests after each move
- If tests fail: revert and investigate before proceeding
- Never batch multiple refactoring moves between test runs
- Commit or checkpoint after each green test run
4. Interface Migration (Strangler Fig Pattern)
When changing a public interface:
- Add the new interface alongside the old
- Migrate callers one at a time
- Run tests after each caller migration
- Remove the old interface only after all callers are migrated
- Run tests one final time
Anti-Patterns
- Never rename AND restructure in the same step
- Never modify a file that an active subagent is reading
- Never change function signatures without searching for all call sites first
- Never skip the safety net — if there are no tests, write them before refactoring
- Never refactor more than 3 files without running tests
Output Format
Before starting, present:
- Refactoring plan: Ordered list of individual moves
- Blast radius: Files and functions affected
- Safety net status: Test coverage of affected code (green/yellow/red)
- Risk assessment: What could break and how you'll detect it
After completing, report:
- Moves executed: List of refactoring steps taken
- Tests run: Pass/fail at each checkpoint
- Remaining debt: Any follow-up refactoring deferred
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.

