microsoft/react-native-windows/rnw-integration

Claude Code and agent skill by microsoft/react-native-windows

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

Automate React Native Windows integration with upstream React Native nightly versions. Use when: upgrading RNW to a newer React Native nightly, finding target nightly versions, preparing integration PRs, updating package dependencies.

Install

npx vskill@latest install microsoft/react-native-windows/rnw-integration

SKILL.md

The same SKILL.md was published earlier as microsoft/react-native-windows/rnw-integration.

RNW Integration Automation

Automates the process of integrating React Native Windows with upstream React Native nightly builds.

When to Use

  • Finding the target React Native nightly version for integration
  • Upgrading RNW dependencies to a new React Native nightly
  • Preparing integration pull requests
  • Validating nightly version availability on npm

Procedure

Step 1: Get Current React Native Version

Extract the current react-native version from vnext/package.json:

powershell
$packageJson = Get-Content -Path "vnext/package.json" | ConvertFrom-Json
$currentVersion = $packageJson.devDependencies.'react-native'
Write-Host "Current version: $currentVersion"

Expected format: 0.XX.0-nightly-YYYYMMDD-<commit-hash>

After completing this step, confirm: Step 1 completed successfully.

Step 2: Parse the Current Version Date

Extract the date from the nightly version string:

powershell
# Parse version like: 0.84.0-nightly-20260107-58bc6c3e3
$versionMatch = $currentVersion -match 'nightly-(\d{8})'
$currentDate = [DateTime]::ParseExact($matches[1], 'yyyyMMdd', $null)
Write-Host "Current nightly date: $($currentDate.ToString('yyyy-MM-dd'))"

After completing this step, confirm: Step 2 completed successfully.

Step 3: Calculate Target Date (+7 days)
powershell
$targetDate = $currentDate.AddDays(7)
$targetDateStr = $targetDate.ToString('yyyyMMdd')
Write-Host "Target date (+7 days): $($targetDate.ToString('yyyy-MM-dd'))"

After completing this step, confirm: Step 3 completed successfully.

Step 4: Find Nightly Version on npm

Query npm for available nightly versions around the target date:

powershell
# Get all nightly versions for the target month
$yearMonth = $targetDate.ToString('yyyyMM')
$nightlyVersions = npm view react-native versions --json 2>$null |
ConvertFrom-Json |
Where-Object { $_ -like "*nightly-$yearMonth*" }
# Find exact match or next available
$targetVersion = $nightlyVersions | Where-Object { $_ -like "*nightly-$targetDateStr*" } | Select-Object -First 1
if (-not $targetVersion) {
Write-Host "No nightly for $targetDateStr, finding next available..."
$targetVersion = $nightlyVersions | Where-Object {
$_ -match 'nightly-(\d{8})' -and [int]$matches[1] -gt [int]$targetDateStr
} | Select-Object -First 1
}
Write-Host "Target nightly version: $targetVersion"

After completing this step, confirm: Step 4 completed successfully.

Step 5: Output Summary
powershell
Write-Host ""
Write-Host "=== Integration Summary ==="
Write-Host "Current Version: $currentVersion"
Write-Host "Current Date: $($currentDate.ToString('yyyy-MM-dd'))"
Write-Host "Target Date: $($targetDate.ToString('yyyy-MM-dd'))"
Write-Host "Target Version: $targetVersion"

After completing this step, confirm: Step 5 completed successfully.

Step 6: Run Integration Script

Run the integration script with the target nightly version to update all dependencies:

powershell
yarn integrate-rn $targetVersion

This command updates all react-native and @react-native/* package references across the monorepo to the target nightly version.

After completing this step, confirm: Step 6 completed successfully.

Step 7: Search and Update Remaining package.json Files

After running the integration script, search all package.json files for any remaining references to the previous nightly version and update them:

powershell
# Find all package.json files containing the previous nightly version
$packageFiles = Get-ChildItem -Path . -Filter "package.json" -Recurse -File |
Where-Object { $_.FullName -notlike "*node_modules*" }
$updatedFiles = @()
foreach ($file in $packageFiles) {
$content = Get-Content -Path $file.FullName -Raw
if ($content -like "*$currentVersion*") {
Write-Host "Found previous version in: $($file.FullName)"
$newContent = $content -replace [regex]::Escape($currentVersion), $targetVersion
Set-Content -Path $file.FullName -Value $newContent -NoNewline
$updatedFiles += $file.FullName
}
}
Write-Host ""
Write-Host "=== Updated $($updatedFiles.Count) package.json files ==="
$updatedFiles | ForEach-Object { Write-Host " - $_" }

This ensures all references to the previous nightly version are updated, including:

  • dependencies
  • devDependencies
  • peerDependencies
  • resolutions

After completing this step, confirm: Step 7 completed successfully.

Step 8: Clean node_modules and Reinstall Dependencies

After updating all package.json files, remove all node_modules directories across the repo and perform a fresh install to ensure the dependency tree is consistent with the new versions:

powershell
# Delete all node_modules directories (excluding .git)
Get-ChildItem -Path . -Directory -Filter "node_modules" -Recurse |
Where-Object { $_.FullName -notlike "*.git*" } |
ForEach-Object {
Write-Host "Removing: $($_.FullName)"
Remove-Item -Recurse -Force $_.FullName
}
Write-Host "All node_modules directories removed."

Then run a fresh install at the root of the repo:

powershell
yarn install

If yarn install fails (e.g., due to peer dependency mismatches or build script errors), diagnose and fix the issue:

  • Peer dependency warnings: These are typically non-blocking in Yarn 4. Check if the install actually completed.
  • Build script failures: Check the build log path shown in the error output. Common issues include missing type declarations or renamed modules — fix the source files causing the build error and re-run yarn install.
  • Resolution conflicts: If a resolution in the root package.json still points to an old version, update it to the target nightly version.

After completing this step, confirm: Step 8 completed successfully.

Step 9: Upgrade Platform Overrides

Run the override upgrade tool to resolve conflicts in platform-specific override files:

powershell
npx react-native-platform-override upgrade

This interactive tool helps resolve conflicts between upstream React Native changes and RNW platform overrides. It will:

  • Show files with merge conflicts
  • Allow you to accept upstream changes, keep local changes, or manually merge
  • Update the overrides.json manifest files

After completing the upgrade, verify the overrides are valid:

powershell
yarn validate-overrides

After completing this step, confirm: Step 9 completed successfully.

Step 10: Commit All Changes

After completing all integration steps, commit the changes:

powershell
git add -A
git commit -m "Integrate RN $targetVersion"

This creates a single commit with all the integration changes including:

  • Updated package.json dependencies
  • Override file upgrades
  • Any auto-fixed lint issues

After completing this step, confirm: Step 10 completed successfully.

Step 11: Update Failing Overrides from Upstream

Run yarn validate-overrides to identify which folders need to be replaced with upstream versions, then download and replace them:

powershell
# Extract commit hash from target version (last 8 characters after final hyphen)
# Example: 0.85.0-nightly-20260114-f15985f4f -> f15985f4f
$commitHash = ($targetVersion -split '-')[-1]
Write-Host "Commit hash: $commitHash"
# Run validate-overrides and capture failing paths
$validateOutput = yarn validate-overrides 2>&1
$failingPaths = $validateOutput | Where-Object { $_ -match '^ - ' } | ForEach-Object { $_.Trim(' -') }
if ($failingPaths.Count -eq 0) {
Write-Host "No failing overrides to update"
return
}
Write-Host "Found $($failingPaths.Count) failing override paths to update"
# Create temp directory (outside git tracking)
$tempDir = "$env:TEMP\rn-upstream-$commitHash"
if (Test-Path $tempDir) { Remove-Item -Recurse -Force $tempDir }
New-Item -ItemType Directory -Path $tempDir | Out-Null
# Download react-native repo at the specific commit
Write-Host "Downloading react-native at commit $commitHash..."
git clone --depth 1 --filter=blob:none --sparse https://github.com/facebook/react-native.git $tempDir
Push-Location $tempDir
git sparse-checkout set packages/rn-tester
git fetch --unshallow
git checkout $commitHash
Pop-Location
# Replace each failing path with upstream version
foreach ($path in $failingPaths) {
# Convert absolute path to relative
$relativePath = $path -replace [regex]::Escape((Get-Location).Path + '\'), ''
# Map RNW paths to upstream rn-tester paths
$upstreamPath = $null
if ($relativePath -like "packages\@react-native\tester\*") {
# packages\@react-native\tester\X -> packages\rn-tester\X
$subPath = $relativePath -replace '^packages\\@react-native\\tester\\', ''
$upstreamPath = "$tempDir\packages\rn-tester\$subPath"
}
elseif ($relativePath -like "vnext\ReactCopies\*") {
# vnext\ReactCopies\X -> packages\rn-tester\X
$subPath = $relativePath -replace '^vnext\\ReactCopies\\', ''
$upstreamPath = "$tempDir\packages\rn-tester\$subPath"
}
if ($upstreamPath -and (Test-Path $upstreamPath)) {
Write-Host "Replacing $relativePath with upstream version..."
Remove-Item -Recurse -Force $relativePath
Copy-Item -Recurse -Force $upstreamPath $relativePath
} else {
Write-Host "WARNING: Could not find upstream path for $relativePath"
}
}
# Cleanup temp directory
Remove-Item -Recurse -Force $tempDir
Write-Host "Overrides updated from upstream commit $commitHash"

Verify the overrides are valid after the update:

powershell
yarn validate-overrides

After completing this step, confirm: Step 11 completed successfully.

Step 12: Resolve Merge Conflicts (Human-in-the-Loop)

After Steps 9-11, some override files may still contain merge conflict markers (<<<<<<<, =======, >>>>>>>). This step resolves them safely with human approval for each hunk.

NON-NEGOTIABLE CONSTRAINTS:

  • Conflicts are handled hunk-by-hunk (each <<<<<<< ... ======= ... >>>>>>> region is one hunk)
  • HUMAN-IN-THE-LOOP: Do NOT apply any change automatically — ask for explicit approval for EACH hunk
  • Safety exceptions:
  • Some >>>>>>> markers are intentional (e.g., E2E react-native-platform-override files) — do not "fix" those
  • Leave conflicts in flowconfig.windows.conflict untouched
Phase 1 — Build RNW Conflict-Resolution Knowledge Base

Before resolving any conflicts, mine historical "good" RNW-fork commits for conflict-resolution patterns. Create or update references/conflict-patterns.md.

Reference commits to study:

ceeaddc0d19161e4fa0e01139a721b758d0269ce
9f26c15efab7b51dd8544f50d2a26905bb875223
1d7f44c4ad58a3ffa506cdc618c92d0dcebaf238
e5d505e43d47a7cc603cd1be3d875dc0e3ab6ab9
3e3b133fcb32f39f485b075858eaa7ff55d0d912
9b40dac70b27ec2e5c3d0449bca50c841764e413
d73784caa0d7e91a6c20fa485cf9ccb7923a1d40
b6315a67451f9a2526ba1a5f3814d4ca6564342c
bb50808b9f7e63da8af5511bf4b2faf064add19f

For each commit:

  • Identify files where merge conflicts were resolved
  • Extract BEFORE/AFTER snippets for each resolved hunk (summarise if large)
  • Categorise into reusable patterns (name + signals + anti-signals)
  • Include example references (commit + file path + short diff summary)
  • Include safety notes: intentional markers, flowconfig rule, E2E override markers
Phase 2 — Discover Conflicts and Split into Hunks

Scan the repository for conflict markers:

powershell
# Find all files with conflict markers (excluding node_modules, intentional files)
$conflictFiles = Get-ChildItem -Path . -Recurse -File |
Where-Object { $_.FullName -notlike "*node_modules*" -and $_.Name -ne "flowconfig.windows.conflict" } |
ForEach-Object {
$content = Get-Content -Path $_.FullName -Raw -ErrorAction SilentlyContinue
if ($content -match '<<<<<<<') { $_.FullName }
}

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 18 Jun 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
17,325
Repository forks
1,200
7-day trend score
49

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Aug 2026, 3 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/microsoft/react-native-windows/rnw-integration/badge)](https://verified-skill.com/skills/microsoft/react-native-windows/rnw-integration)

Something wrong with this skill or its page? Tell us.