react-native-worktree

Coordinate per-platform device and Metro server access with mutex locks.

47|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/aleqsio/react-native-worktree --skill react-native-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-native-worktree
Source: https://github.com/aleqsio/react-native-worktree/tree/main/skill
Command: npx skills add https://github.com/aleqsio/react-native-worktree --skill react-native-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinate multiple agents working on a React Native / Expo project by coordinating per-platform access to devices and Metro servers through a robust mutex mechanism.

Core Features & Use Cases

  • Register and manage lightweight worktrees with automatic bundle ID and platform detection from app.json / app.config.js.
  • Switch devices between Metro ports atomically and reclaim ports when worktrees become inactive.
  • Heartbeat and release controls ensure locks are refreshed and released cleanly to support concurrent testing.

Quick Start

Register a worktree with react-native-worktree add, start Metro on the assigned port, and switch to the platform to acquire the device.

Frequently Asked Questions about react-native-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I coordinate multiple agents working on the same React Native project?

Switching Metro ports atomically reclaims inactive ports and safely redirects device connections to the active Metro server, ensuring concurrent React Native feature work does not collide on shared testing simulators.

How do I prevent Metro port conflicts when running concurrent React Native worktrees?

Automatic port switching and worktree registration reclaim Metro ports when worktrees become inactive, preventing conflicts and ensuring continuous React Native development across multiple concurrent agents.

Does this mutex mechanism support both iOS and Android simulators?

Yes, the coordination mechanism acquires per-platform mutex locks, allowing concurrent agents to test React Native features on iOS and Android simulators simultaneously without device conflicts.

How are inactive worktree locks released during concurrent React Native testing?

Inactive worktree locks are released through heartbeat-based lock maintenance, which automatically refreshes active locks and cleanly releases them when a worktree becomes inactive during concurrent React Native testing.

How do I register a React Native worktree and detect its bundle ID?

You register a worktree by running an add command that automatically detects the bundle ID and platform from app.json or app.config.js files, then assigns the appropriate Metro port for concurrent React Native testing.

What are the limitations of using worktrees for concurrent React Native development?

The primary limitation is that mutex coordination requires heartbeat maintenance to prevent stale locks, meaning inactive worktrees must properly signal release to avoid blocking other agents from accessing devices and Metro ports.