refactor-parallel

Refactor monorepo modules in parallel using tiered dependency graphs.

1|Updated Jan 13, 2023
One-click install
npx skills add https://github.com/theodrosyimer/.dotfiles --skill refactor-parallel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-parallel
Source: https://github.com/theodrosyimer/.dotfiles/tree/main/claude/skills/dev__refactor-parallel
Command: npx skills add https://github.com/theodrosyimer/.dotfiles --skill refactor-parallel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Refactoring large monorepo codebases is risky because modules depend on each other, making parallel changes prone to breakage and failed builds.

Core Features & Use Cases

  • Dependency Graph Discovery: Scans packages/modules/src/*/ to read tsconfig.json and package.json, building a tiered dependency map.
  • Tiered Parallel Execution: Spawns a worker for each module within a tier, runs them in parallel, and moves to the next tier only after successful completion.
  • Baseline Validation: Executes each module’s test and type‑check scripts before any changes.
  • Comprehensive Verification: Runs full monorepo test and type‑check suites after all tiers finish, reporting changed, skipped, and failed modules.
  • Use Case Example: Apply a naming‑convention change to all modules, ensuring core modules update first and downstream modules follow safely.

Quick Start

Instruct the refactor‑parallel skill to apply the desired change across the monorepo, such as renaming a shared interface in all modules.

Frequently Asked Questions about refactor-parallel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor multiple monorepo modules in parallel without breaking dependencies?

To refactor monorepo modules in parallel safely, build a dependency graph from tsconfig and package.json, group modules into tiered levels, and execute workers per tier sequentially to ensure downstream modules update safely after core modules.

How does tiered parallel execution work for monorepo code changes?

Tiered parallel execution groups monorepo modules into dependency levels, spawns parallel workers for each module within a tier, and only moves to the next tier after all preceding modules pass their tests and type-checks successfully.

What is dependency-aware monorepo refactoring and when do I need it?

Dependency-aware monorepo refactoring applies code changes across interdependent modules while respecting their hierarchy. It is needed when applying large-scale updates like naming conventions to prevent build failures from mismatched downstream dependencies.

Does parallel monorepo refactoring support TypeScript projects with inter-module dependencies?

Yes, dependency-aware parallel refactoring supports TypeScript projects by scanning tsconfig.json and package.json files within packages and src directories to automatically map and group inter-module dependencies into execution tiers.

What's the best way to apply a naming convention change across all monorepo modules?

The best way to apply naming conventions across a monorepo is to run baseline tests, execute changes in dependency tiers starting with core modules, and finish with full monorepo test and type-check verification to catch any failures.

How are failed modules handled during parallel monorepo refactoring?

During parallel monorepo refactoring, if a module fails its tests or type-checks, the process stops progressing to downstream tiers and generates a final verification report listing all changed, skipped, and failed modules.