/core:mobiai-mobile-worktreesfrom core
Sets up isolated Git worktrees for mobile development, enforcing safe directory selection and verification before starting feature branches or parallel work.
Ships in core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
Announce at start: "I'm using the mobile-worktrees skill to set up an isolated workspace."
Follow this priority order:
ls -d .worktrees 2>/dev/null # Preferred (hidden)
ls -d worktrees 2>/dev/null # Alternative
If found: Use that directory. If both exist, .worktrees wins.
grep -i "worktree.*director" CLAUDE.md 2>/dev/null
If preference specified: Use it without asking.
If no directory exists and no CLAUDE.md preference:
No worktree directory found. Where should I create worktrees?
1. .worktrees/ (project-local, hidden)
2. ~/worktrees/<project-name>/ (global location)
Which would you prefer?
MUST verify directory is ignored before creating worktree:
git check-ignore -q .worktrees 2>/dev/null
If NOT ignored: Add to .gitignore, commit the change, then proceed.
No .gitignore verification needed — outside project entirely.
project=$(basename "$(git rev-parse --show-toplevel)")
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
Auto-detect and run appropriate setup:
| Platform | Setup commands |
|---|---|
| Android | ./gradlew assembleDebug |
| iOS | pod install (if CocoaPods) then xcodebuild build -scheme <Scheme> -destination '...' |
| Flutter | flutter pub get then flutter analyze |
| React Native | npm install then npx pod-install (if iOS) |
| KMP | ./gradlew assemble |
Note: First build in a fresh worktree takes longer — Gradle cache and Xcode derived data are per-directory.
Run tests to ensure worktree starts clean:
| Platform | Test command |
|---|---|
| Android | ./gradlew testDebugUnitTest |
| iOS | xcodebuild test -scheme <Scheme> -destination '...' |
| Flutter | flutter test |
| React Native | npx jest |
If tests fail: Report failures, ask whether to proceed or investigate.
If tests pass: Report ready.
Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>
| Situation | Action |
|---|---|
.worktrees/ exists | Use it (verify ignored) |
worktrees/ exists | Use it (verify ignored) |
| Both exist | Use .worktrees/ |
| Neither exists | Check CLAUDE.md → Ask user |
| Directory not ignored | Add to .gitignore + commit |
| Tests fail during baseline | Report failures + ask |
Never:
Called by:
mobiai-mobile-brainstorming - When design approved and implementation followsmobiai-mobile-executing-plans-with-subagents - Before executing any tasksmobiai-mobile-executing-plans - Before executing any tasksPairs with:
mobiai-mobile-finishing-branch - Cleans up worktree after work completeWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Git, Android, iOS, Flutter, React Native
22 skills in this plugin
/mobiai-analyze-crashUse when the user shares a crash from any source (stack trace, log, screenshot, error description) and wants to find the root cause and fix it./mobiai-brainUse when the user asks about past decisions, workarounds, bugfixes, testing patterns or integrations specific to *this* project, OR before proposing non-trivial architecture/integration changes. MobiAI Brain is per-project living memory at <repo>/.mobiai/brain/. Loads context the user already captured so suggestions respect real project conventions instead of generic best practices./mobiai-crashlyticsUse when the user shares a Firebase Crashlytics crash link, crash ID, or asks to investigate a Crashlytics issue in depth.2 plugins ship this exact skill · first indexed Jul 20, 2026
npx claudepluginhub adriaanat/ecosystem-manager --plugin coreOther plugins' skills for the same job