refactor-analysis
Skill88 starsChanged 8 months agoMITView on GitHub
Run cargo-coupling and similarity-rs to identify refactoring targets, then create a prioritized plan.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- bug-fixSkill
- deploy-checkSkill
- dev-setupSkill
- orchestratorSkill
- pre-release-checkSkill
- qa-pipelineSkill
- refactorSkill
The file
Files
Refactor Analysis
Analyze code coupling and duplication, then create a prioritized refactoring plan.
Steps
- Coupling analysis:
Focus on: High Afferent (too many dependents), God Modules, circular deps.cargo coupling --exclude-tests --ai --hotspots=10 - Similarity scan:
Focus on: 95%+ similarity pairs, extract shared functions.similarity-rs ./src --min-tokens 50 - Combine findings into a prioritized plan:
- High: modules with >20 dependents, circular deps
- Medium: God modules (>30 functions or >500 lines), 100% duplicates
- Low: 90%+ similarity, primitive obsession
- Create GitHub issues for each refactoring target with
refactoringlabel. - Execute high-priority items if requested, verifying with
cargo testafter each change.
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.

