bp-skill-refactor

Refactor complex workflows by extracting subflows, renaming nodes, and cleaning dead code.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/hiivmind/hiivmind-blueprint --skill bp-skill-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bp-skill-refactor
Source: https://github.com/hiivmind/hiivmind-blueprint/tree/main/skills/_archived/bp-skill-refactor
Command: npx skills add https://github.com/hiivmind/hiivmind-blueprint --skill bp-skill-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor complex workflows to improve readability, modularity, and maintainability.

Core Features & Use Cases

  • Detects god nodes, trivial subflows, deep branching, and unreachable code for targeted refactoring.
  • Generates subflows and boundary contracts to enable clean extraction and reuse of workflow segments.
  • Supports inlining legacy references, splitting large workflows, renaming nodes, and cleaning up dead code.

Quick Start

To begin refactoring, select a contiguous group of nodes and choose an operation to extract, inline, split, or rename, then review the generated boundary and follow-up steps.

Frequently Asked Questions about bp-skill-refactor

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

FAQPage Schema
How do I refactor complex workflow YAML to improve maintainability?

Refactor complex workflow YAML by analyzing large branching structures to extract subflows, inline references, split workflows, rename nodes, and clean dead code for improved modularity. Boundary detection and post-refactor validation ensure end-to-end integrity.

What is the best way to extract subflows from a large branching workflow?

Extract subflows by selecting a contiguous group of nodes and choosing an operation to generate boundary contracts and transition rewiring. This enables clean extraction and reuse of workflow segments while maintaining structural integrity.

How do I clean up dead code and unreachable nodes in workflow YAML?

Clean up dead code and unreachable nodes through targeted refactoring that detects god nodes, trivial subflows, and deep branching. The process identifies unreachable code and removes it while rewiring transitions to maintain workflow continuity.

Can I inline legacy references when refactoring a complex workflow?

Inline legacy references during workflow refactoring by selecting the target nodes and applying the inline operation. This simplifies the workflow structure by consolidating external references directly into the main workflow path.

When should I split a large workflow into modular subflows?

Split a large workflow into modular subflows when analysis detects god nodes, deep branching, or trivial subflows that reduce readability. Boundary detection identifies natural split points to generate clean, reusable workflow segments.

Does workflow refactoring handle post-refactor validation and transition rewiring?

Workflow refactoring includes post-refactor validation and transition rewiring to ensure end-to-end integrity. Boundary contracts are generated to verify that extracted subflows and rewired transitions maintain the original workflow logic.