You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/commands/build.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,15 @@ Build, launch in simulator, and notify when running:
34
34
35
35
1. Check if `.claude/.simulator_id` file exists in the project root
36
36
- If yes, read the simulator ID from it (this is the session's dedicated simulator)
37
-
- If no, check if `.convos-task` file exists:
38
-
- If yes, read `SIMULATOR_NAME` from it and find its UUID in the simulator list
39
-
- If the simulator doesn't exist yet, suggest running `/setup` first
40
-
- If neither file exists, select a new simulator (see below)
37
+
- If no, try to find or create the session's simulator:
38
+
a. Check if `.convos-task` file exists → read `SIMULATOR_NAME` from it
39
+
b. Otherwise derive from branch: run `git branch --show-current`, sanitize (replace `/` and special chars with `-`, lowercase), prefix with `convos-` (e.g., `jarod/push-notifications` → `convos-jarod-push-notifications`)
40
+
c. Look for that simulator in the list — if it exists, use it
41
+
d. If it doesn't exist, suggest running `/setup` first
41
42
42
43
2. Call `mcp__XcodeBuildMCP__list_sims` to get all available simulators
43
44
44
-
3.Select a simulator that is NOT already booted:
45
+
3.If no dedicated simulator was found or created, select a simulator that is NOT already booted:
45
46
- Look for iOS 26.0 simulators (latest OS)
46
47
- Find simulators that do NOT have `[Booted]` next to them
47
48
- Prefer iPhone models in this order: iPhone 17 Pro, iPhone 17 Pro Max, iPhone Air, iPhone 17
Initialize the Claude Code session for a convos-task worktree.
3
+
Initialize the Claude Code session for any branch or worktree — creates a dedicated simulator and configures build defaults.
4
4
5
5
## Purpose
6
6
7
-
This command sets up the iOS simulator and XcodeBuildMCP session defaults when working in a `convos-task` worktree. It ensures the session has a dedicated simulator for builds and testing.
7
+
This command sets up an iOS simulator and XcodeBuildMCP session defaults so `/build` and `/build --run` work correctly. It works in any context:
8
+
-**convos-task worktrees**: Uses the task config from `.convos-task`
9
+
-**Regular branches**: Derives the simulator name from the current git branch
10
+
-**Main repo**: Works on any branch, no special setup required
8
11
9
12
## When to Run
10
13
14
+
- At the start of any new session when working on a feature branch
11
15
- Automatically suggested at session start when `.convos-task` file exists
12
16
- Can be run manually anytime to reset or verify the setup
13
17
14
18
## Instructions
15
19
16
-
### Step 1: Check for Task Configuration
20
+
### Step 1: Determine Simulator Name
17
21
18
-
1. Read the `.convos-task` file in the project root
19
-
2. If it doesn't exist, inform the user this isn't a convos-task worktree and exit
20
-
3. Extract `TASK_NAME` and `SIMULATOR_NAME` from the file
22
+
Check for configuration in this order:
21
23
22
-
### Step 2: Create Simulator if Needed
24
+
1.**`.convos-task` file exists**: Read `TASK_NAME` and `SIMULATOR_NAME` from it
25
+
2.**No `.convos-task` file**: Derive from the current git branch:
26
+
- Run `git branch --show-current` to get the branch name
27
+
- Sanitize the branch name: replace `/` and special characters with `-`, lowercase it
0 commit comments