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
feat: migrate Codex from deprecated custom prompts to Skills format
Codex CLI 0.117+ deprecated ~/.codex/prompts/ custom prompts.
Migrate to the new Skills system at ~/.codex/skills/squad/SKILL.md
with proper name/description frontmatter for $squad invocation.
You are joining a squad multi-agent collaboration team.
48
+
49
+
Your join arguments: $ARGUMENTS
50
+
51
+
**IMPORTANT:** Do NOT run `squad $ARGUMENTS` or treat the arguments as a CLI subcommand. Instead, follow the setup steps below.
52
+
53
+
## Phase 1: Setup (do this once)
54
+
55
+
1. Parse your join arguments above.
56
+
57
+
**If arguments are empty or missing:**
58
+
Run `squad roles` to list available roles, then ask the user which role they want to join as. Do NOT proceed until the user picks a role.
59
+
60
+
**If arguments look like a role name** (1-2 words, e.g. "cto", "worker worker-2"):
61
+
- First word is your role — this can be ANY string: "cto", "ceo", "manager", "reviewer", etc. It does NOT need to appear in `squad roles` (that list only shows predefined templates).
62
+
- Optional second word is a custom agent ID
63
+
- If no custom ID provided, use the role name as your ID
**If arguments look like natural language** (e.g. "加入团队,作为管理员", "join as tech lead and review PRs"):
67
+
- Extract the intended role from the text. Pick a short English role name (e.g. "manager", "reviewer", "cto").
68
+
- Use that as your role and ID.
69
+
- If no role can be inferred, ask the user to clarify.
70
+
71
+
2. Run `squad init` (safe to run — won't overwrite existing workspace).
72
+
73
+
3. **Clean up stale agents from previous sessions:**
74
+
Run `squad agents` and check the output.
75
+
- If ALL agents show "stale" (no active agents), tell the user stale squad state was detected and ask the user whether they want to reset squad state with `squad clean` followed by `squad init`. Do NOT clean automatically.
76
+
- If some agents are active (a team is already running), skip cleanup and proceed.
77
+
78
+
4. Run `squad join <id> --role <role> --client __SQUAD_CLIENT__ --protocol-version __SQUAD_PROTOCOL_VERSION__` to register yourself.
79
+
- Read the output line that says "Joined as ..." — that confirms your actual agent ID.
80
+
- If the ID was taken, squad auto-assigns a suffixed ID (e.g. worker-2). Use that ID for all commands.
81
+
- If role instructions are printed (=== Role Instructions ===), follow them.
82
+
- If no predefined template exists, interpret the role using your own knowledge.
83
+
84
+
5. Run `squad agents` to see who else is on the team.
85
+
86
+
6. **If any squad command returns "Session replaced":** another terminal took your ID. Re-join with a different ID (e.g. `squad join worker-2 --role worker --client __SQUAD_CLIENT__ --protocol-version __SQUAD_PROTOCOL_VERSION__`).
87
+
88
+
## Phase 2: Enter Receive Mode (MANDATORY)
89
+
90
+
**Immediately after setup, run `squad receive <your-id> --wait` to start listening for messages.** Do NOT wait for the user to tell you — enter receive mode now.
91
+
92
+
After receiving a message:
93
+
1. Execute the task or respond as appropriate for your role.
94
+
2. Report results using `squad send` or `squad task` commands.
95
+
3. Run `squad receive <your-id> --wait` again to wait for the next message.
96
+
97
+
If receive times out with no messages, run it again immediately.
98
+
99
+
Other useful commands:
100
+
- `squad send <your-id> <to> "<message>"` — send a message (use @all to broadcast)
0 commit comments