refactoring-coordinator

Analyze file dependencies and plan safe refactoring orders with automated rollback.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Bobain/MonolithicCoffeeMakerAgent --skill refactoring-coordinator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-coordinator
Source: https://github.com/Bobain/MonolithicCoffeeMakerAgent/tree/main/.claude/skills/refactoring-coordinator
Command: npx skills add https://github.com/Bobain/MonolithicCoffeeMakerAgent --skill refactoring-coordinator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest-xdist, and includes scripts (resource) components.

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_developer needs 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