Skip to main content

Web Layout Migration

The abyss-layout-migration-web skill migrates React code that consumes @uhg-abyss/web's deprecated Layout namespace (LayoutStack, LayoutGroup, LayoutSpace, LayoutInsert) and deprecated Flex component onto Stack, Group, and Flexible.

Tip

We recommend using Claude Sonnet 4.6 or higher for this skill.

Note

This is a separate, intra-v2 migration, not part of the Abyss v1-to-v2 package migration. Stack, Group, and Flexible are new components added in v2.9.0 with no v1 equivalent, so there's no v1-to-v2 change involved here. See Related skills.

What it does​

  • Updates imports and usages of Layout/Flex to Stack, Group, and Flexible wherever it's safe to do so automatically
  • Flags anything it can't safely automate — like usages with no direct replacement, or custom styling that could be simplified — with an inline comment explaining what to check
  • Formats the files it touched (if the project has a formatter configured) and verifies the result with a type check before considering the migration done
  • Finishes with a summary of how many files changed and what was flagged for review

When to use it​

Use this skill when:

  • the codebase imports Layout, LayoutStack, LayoutGroup, LayoutSpace, or LayoutInsert from @uhg-abyss/web
  • the codebase imports Flex from @uhg-abyss/web/ui/Flex
  • a user asks to migrate off deprecated Abyss layout components, or asks about Stack/Group/Flexible
Note

This skill is offered as an optional step by the V2 Migration Orchestrator once it detects deprecated Layout/Flex usage. It is not required to complete the v1-to-v2 upgrade, and can also be run on its own at any time.

Quick reference​

Deprecated componentReplacement
Layout.StackStack
Layout.GroupGroup
Layout.SpaceNo direct replacement; flagged for manual review
Layout.InsertNo direct replacement; flagged for manual review
FlexFlexible

Info

For more information on the new Layout components, see the Layout overview.

Prerequisites​

This migration only applies to @uhg-abyss/web 2.9.0+ (the release that introduced Stack, Group, and Flexible).

npm list @uhg-abyss/web

If the installed version is older than 2.9.0, upgrade first.

Before installing this skill, ensure you have the Abyss CLI set up properly:

npx @uhg-abyss/cli -v

If the command fails, refer to the CLI Setup Guide for installation instructions.

Installation​

Install the skill using the Abyss CLI:

npx @uhg-abyss/cli skills add abyss-layout-migration-web

To verify the skill was installed successfully:

npx @uhg-abyss/cli skills list

Example prompts​

Once installed, you can use prompts like these with this skill:

  • "Migrate this project off the deprecated Layout components"
  • "Migrate our Flex usage to Flexible"
  • "What's left to review after the layout migration?"
  • "Should this LayoutStack become a Flexible instead?"

What gets flagged for manual review​

Not every usage can be migrated automatically. Where the old component's behavior has no safe equivalent (e.g. a layout usage with no direct replacement, a prop whose value the skill can't confidently convert, or custom styling that overlaps with a new built-in option), the skill leaves the code as-is and adds a comment explaining what to check. The migration summary at the end of the run lists every flagged spot so you can review them one by one.

  • V2 Migration Orchestrator — can invoke this skill automatically as an optional step once it detects deprecated Layout/Flex usage
  • abyss-v2-migration-web — handles the v1-to-v2 package migration; it treats Stack/Group/Flexible as stable v2 primitives and does not cover this migration
  • Layout Migration (Mobile) — the mobile counterpart of this skill (mobile has no Flex/Flexible component)
Table of Contents