agentleFS
nwiizonwiizo/claudelytics/.claude/skills/refactor-analysis/SKILL.md

refactor-analysis

Skill88 starsChanged 8 months agoMITView on GitHub

Run cargo-coupling and similarity-rs to identify refactoring targets, then create a prioritized plan.

The file

Files
SKILL.md

Refactor Analysis

Analyze code coupling and duplication, then create a prioritized refactoring plan.

Steps

  1. Coupling analysis:
    cargo coupling --exclude-tests --ai --hotspots=10
    Focus on: High Afferent (too many dependents), God Modules, circular deps.
  2. Similarity scan:
    similarity-rs ./src --min-tokens 50
    Focus on: 95%+ similarity pairs, extract shared functions.
  3. 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
  4. Create GitHub issues for each refactoring target with refactoring label.
  5. Execute high-priority items if requested, verifying with cargo test after each change.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.