The abyss-layout-migration-mobile skill migrates React Native code that consumes @uhg-abyss/mobile's deprecated Layout namespace (LayoutStack, LayoutGroup, LayoutSpace, LayoutInsert) onto the new Stack and Group components.
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 and Group 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
LayouttoStackandGroupwherever 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 you find:
Layout.Stack,Layout.Group,Layout.Space, orLayout.Insertusages (namespace import ofLayout)LayoutStack,LayoutGroup,LayoutSpace, orLayoutInsertusages (direct imports)- imports from
@uhg-abyss/mobile/ui/Layoutor the@uhg-abyss/mobilebarrel importing any of the above
This skill is offered as an optional step by the V2 Migration Orchestrator once it detects deprecated Layout 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 |
|---|---|
LayoutStack | Stack |
LayoutGroup | Group |
LayoutSpace | No direct replacement; flagged for manual review |
LayoutInsert | No direct replacement; flagged for manual review |
For more information on the new Layout components, see the Layout overview.
Prerequisites
This skill requires @uhg-abyss/mobile 2.9.0+ (the release that introduced Stack and Group).
npm list @uhg-abyss/mobileIf 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-mobileTo 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 mobile app's
Layout.Groupusage toGroup" - "What's left to review after the layout migration?"
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
Layoutusage abyss-v2-migration-mobile— handles the v1-to-v2 package migration; it treatsStack/Groupas stable v2 primitives and does not cover this migration- Layout Migration (Web) — the web counterpart of this skill, which also covers the
Flex→Flexiblemigration (mobile has noFlex/Flexiblecomponent)