# migrate-to-static-config

migrate-to-static-config converts React Navigation from JSX Navigator and Screen elements to object-based static configuration. Useful when adopting Static API in versions 7.x and 8.x.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 302 installs · ★ 23 repo stars
- Author: react-navigation
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/react-navigation/skills/tree/HEAD/skills/migrate-to-static-config/SKILL.md
- Updated: 2026-06-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/migrate-to-static-config

## What it does

The skill transforms dynamic React Navigation setup into static objects while keeping behavior, TypeScript types, and deep links intact. Handles nested navigators, groups, render callbacks, `getComponent` screens, and custom navigators.

Before running, it reads the `@react-navigation/native` version from `package.json` and loads the matching reference guide for 7.x or 8.x. When a straightforward static conversion cannot preserve behavior, the skill offers `.with()` for navigator wrappers or context for passing extra screen data. Static API is unavailable in versions prior to 7.x.

After code changes, it runs the project's type checker, linter, and tests if configured. When verification is not available, it performs a manual review against the reference checklist.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add react-navigation/skills --skill migrate-to-static-config -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/migrate-to-static-config/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/migrate-to-static-config/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add react-navigation/skills --skill migrate-to-static-config -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/migrate-to-static-config/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add react-navigation/skills --skill migrate-to-static-config -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/migrate-to-static-config/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install react-navigation/skills skills/migrate-to-static-config
```

2. **Manually: put the files in place**
- File: `.github/skills/migrate-to-static-config/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add react-navigation/skills --skill migrate-to-static-config -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/react-navigation/skills --path skills/migrate-to-static-config
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/migrate-to-static-config/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add react-navigation/skills --skill migrate-to-static-config -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/react-navigation/skills/tree/HEAD/skills/migrate-to-static-config/SKILL.md

## When to use it
- convert React Navigation from JSX to static objects
- preserve types and deep links when changing navigator API
- migrate nested navigators and screen groups
- adapt render callbacks and `getComponent` for Static API

## Example prompts
- Convert this navigator to Static API
- Migrate all screens in `App.tsx` to React Navigation static config
- Turn `Navigator` and `Screen` into an object, keep the behavior

## Similar
- [experience-lwc-typescript-migrate](https://affpapa.org/en/nevibecode/skills/experience-lwc-typescript-migrate.md) — skill · 2400 installs
- [migrate-static-to-wrapper](https://affpapa.org/en/nevibecode/skills/migrate-static-to-wrapper.md) — skill · 4300 installs
- [chakra-ui-migrate](https://affpapa.org/en/nevibecode/skills/chakra-ui-migrate.md) — skill · 1900 installs
- [migrate-to-strict-api](https://affpapa.org/en/nevibecode/skills/migrate-to-strict-api.md) — skill · 275 installs
- [eslint-prettier-config](https://affpapa.org/en/nevibecode/skills/eslint-prettier-config.md) — skill · 1100 installs
- [migrate-ai-sdk-v6-to-v7](https://affpapa.org/en/nevibecode/skills/migrate-ai-sdk-v6-to-v7.md) — skill · 6000 installs

From the same set: [react-navigation/skills](https://affpapa.org/en/nevibecode/by/react-navigation/skills.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
