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.
We recommend using Claude Sonnet 4.6 or higher for this skill.
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/FlextoStack,Group, andFlexiblewherever 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, orLayoutInsertfrom@uhg-abyss/web - the codebase imports
Flexfrom@uhg-abyss/web/ui/Flex - a user asks to migrate off deprecated Abyss layout components, or asks about
Stack/Group/Flexible
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 component | Replacement |
|---|---|
Layout.Stack | Stack |
Layout.Group | Group |
Layout.Space | No direct replacement; flagged for manual review |
Layout.Insert | No direct replacement; flagged for manual review |
Flex | Flexible |
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/webIf 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 -vIf 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-webTo verify the skill was installed successfully:
npx @uhg-abyss/cli skills listExample prompts
Once installed, you can use prompts like these with this skill:
- "Migrate this project off the deprecated Layout components"
- "Migrate our
Flexusage toFlexible" - "What's left to review after the layout migration?"
- "Should this
LayoutStackbecome aFlexibleinstead?"
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.
Related skills
- V2 Migration Orchestrator — can invoke this skill automatically as an optional step once it detects deprecated
Layout/Flexusage abyss-v2-migration-web— handles the v1-to-v2 package migration; it treatsStack/Group/Flexibleas stable v2 primitives and does not cover this migration- Layout Migration (Mobile) — the mobile counterpart of this skill (mobile has no
Flex/Flexiblecomponent)