refactoring-coordinator
CommunityRefactor safely, automate testing and rollback.
#code quality#developer tools#refactoring#rollback#dependency analysis#code changes#automated testing
AuthorBobain
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Large-scale, multi-file refactorings are inherently risky, requiring extensive manual testing and careful dependency management. A single missed change can break the entire application. This skill automates dependency analysis, plans safe refactoring orders, and provides automatic rollback, transforming risky refactorings into safe, predictable operations.
Core Features & Use Cases
- Dependency Analysis: Builds a complete dependency graph (imports, function calls) across all affected files, detecting circular dependencies.
- Safe Refactoring Order: Calculates a topological sort to determine a safe execution order for changes, breaking into groups if circular dependencies exist.
- Automated Testing & Rollback: Runs the full test suite after each incremental change (e.g., per file) and automatically reverts all changes if any test fails, ensuring code integrity.
- Impact Report: Provides a clear report on what changed, potential risks, and a risk assessment.
- Use Case: A
code_developerneeds to rename a function used in 20 files. Instead of manually changing each file and running tests, they use this skill. It analyzes dependencies, renames the function across all files in a safe order, runs tests after each change, and automatically rolls back if a test fails, reducing manual testing from hours to minutes.
Quick Start
# Analyze dependencies for a set of files
python scripts/dependency_analyzer.py \
--files "coffee_maker/auth/*.py" \
--output deps.json
# Plan a refactoring order based on dependencies
python scripts/refactor_planner.py \
--deps deps.json \
--refactoring-type rename \
--output plan.json
Dependency Matrix
Required Modules
pytest-xdist
Components
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: refactoring-coordinator Download link: https://github.com/Bobain/MonolithicCoffeeMakerAgent/archive/main.zip#refactoring-coordinator Please download this .zip file, extract it, and install it in the .claude/skills/ directory.