Skip to main content

Mobile Layout Migration

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.

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 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 Layout to Stack and Group 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 you find:

  • Layout.Stack, Layout.Group, Layout.Space, or Layout.Insert usages (namespace import of Layout)
  • LayoutStack, LayoutGroup, LayoutSpace, or LayoutInsert usages (direct imports)
  • imports from @uhg-abyss/mobile/ui/Layout or the @uhg-abyss/mobile barrel importing any of the above
Note

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 componentReplacement
LayoutStackStack
LayoutGroupGroup
LayoutSpaceNo direct replacement; flagged for manual review
LayoutInsertNo direct replacement; flagged for manual review

Info

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/mobile

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-mobile

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 mobile app's Layout.Group usage to Group"
  • "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.

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