superpowers-sage:block-refactoring

Refactor ACF Composer blocks by analyzing rendering, CSS usage, variations, and migration gaps.

13|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/hekivo/superpowers-sage --skill superpowers-sage-block-refactoring-hekivo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: superpowers-sage:block-refactoring
Source: https://github.com/hekivo/superpowers-sage/tree/main/skills/block-refactoring
Command: npx skills add https://github.com/hekivo/superpowers-sage --skill superpowers-sage-block-refactoring-hekivo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Refactor ACF Composer blocks to match current design system conventions and patterns without rebuilding from scratch.

Core Features & Use Cases

  • Design drift detection: Compare the block rendering against an available reference and report exact divergences.
  • CSS coverage and cleanup: Identify unused custom properties and selectors, then propose safe removals.
  • Variation expansion and migration gaps: Expand $styles using newly available tokens and detect legacy v1→v2 and other implementation gaps.

Quick Start

Ask your AI assistant to use block-refactoring on your block by providing either the block class name or the block slug.

Frequently Asked Questions about superpowers-sage:block-refactoring

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

FAQPage Schema
How do I refactor ACF Composer blocks to fix design system drift?

To fix design system drift in ACF Composer blocks, you analyze block rendering against a reference to report divergences, classify v1, v2, or mixed structures, and produce an approval-gated report with safe changes.

What is the best way to clean up unused CSS in WordPress custom blocks?

Cleaning up unused CSS in WordPress custom blocks involves analyzing block rendering and CSS usage to identify unused custom properties and selectors, then proposing safe removals through an approval-gated report.

How do I expand $styles variations using newly available tokens?

Expanding $styles variations with newly available tokens requires analyzing the block structure, detecting incomplete variations, and proposing upgrades aligned with the latest design conventions.

Can I migrate legacy v1 ACF Composer blocks to v2 without rebuilding?

You can migrate legacy v1 ACF Composer blocks to v2 without rebuilding by classifying the v1, v2, or mixed structure, detecting migration gaps, and generating safe Phase 7 changes.

What do I need to provide to start an ACF Composer block refactoring task?

To start an ACF Composer block refactoring task, you need to provide the block identity via the block class name or block slug so the tool can resolve it and optionally verify against a reference.

When should I avoid refactoring existing ACF Composer blocks?

You should avoid refactoring existing ACF Composer blocks when you lack a provided class name or slug to resolve block identity, as the process requires resolving identity before generating safe changes.