[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X1XEES7WDDSY33G5ATTWDB":3,"skill-same:01M6X1XEES7WDDSY33G5ATTWDB":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6X1XEES7WDDSY33G5ATTWDB","client-compatibility",null,"Platform detection and adaptive spawning for CLI vs VS Code vs other surfaces","github\u002Fsquad","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6X0MZ6B0WYMMDPK3Q61KER6",3391,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Ftemplates\u002Fskills\u002Fclient-compatibility\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36],"client compatibility","compatibility","client","cli","orchestration","platform detection","code","detection","surfaces","platform","high","for","adaptive","2026-11-10 10:12:30",false,"---\nname: \"client-compatibility\"\ndescription: \"Platform detection and adaptive spawning for CLI vs VS Code vs other surfaces\"\ndomain: \"orchestration\"\nconfidence: \"high\"\nsource: \"extracted\"\n---\n\n## Context\n\nSquad runs on multiple Copilot surfaces (CLI, VS Code, JetBrains, GitHub.com). The coordinator must detect its platform and adapt spawning behavior accordingly. Different tools are available on different platforms, requiring conditional logic for agent spawning, SQL usage, and response timing.\n\n## Patterns\n\n### Platform Detection\n\nBefore spawning agents, determine the platform by checking available tools:\n\n1. **CLI mode** — `task` tool is available → full spawning control. Use `task` with `agent_type`, `mode`, `model`, `description`, `prompt` parameters. Collect results via `read_agent`.\n\n2. **VS Code mode** — `runSubagent` or `agent` tool is available → conditional behavior. Use `runSubagent` with the task prompt. Drop `agent_type`, `mode`, and `model` parameters. Multiple subagents in one turn run concurrently (equivalent to background mode). Results return automatically — no `read_agent` needed.\n\n3. **Fallback mode** — neither `task` nor `runSubagent`\u002F`agent` available → work inline. Do not apologize or explain the limitation. Execute the task directly.\n\nIf both `task` and `runSubagent` are available, prefer `task` (richer parameter surface).\n\n### CopilotSession Lifecycle Invariant\n\n- CopilotSession lifecycle management must stay deterministic across surfaces: no ambiguous ownership or state transitions.\n- Session resources must be released on completion, cancellation, and error paths; compatibility work must not trade platform coverage for leaks.\n\n### VS Code Spawn Adaptations\n\nWhen in VS Code mode, the coordinator changes behavior in these ways:\n\n- **Spawning tool:** Use `runSubagent` instead of `task`. The prompt is the only required parameter — pass the full agent prompt (charter, identity, task, hygiene, response order) exactly as you would on CLI.\n- **Parallelism:** Spawn ALL concurrent agents in a SINGLE turn. They run in parallel automatically. This replaces `mode: \"background\"` + `read_agent` polling.\n- **Model selection:** Accept the session model. Do NOT attempt per-spawn model selection or fallback chains — they only work on CLI. In Phase 1, all subagents use whatever model the user selected in VS Code's model picker.\n- **Scribe:** Cannot fire-and-forget. Batch Scribe as the LAST subagent in any parallel group. Scribe is light work (file ops only), so the blocking is tolerable.\n- **Launch table:** Skip it. Results arrive with the response, not separately. By the time the coordinator speaks, the work is already done.\n- **`read_agent`:** Skip entirely. Results return automatically when subagents complete.\n- **`agent_type`:** Drop it. All VS Code subagents have full tool access by default. Subagents inherit the parent's tools.\n- **`description`:** Drop it. The agent name is already in the prompt.\n- **Prompt content:** Keep ALL prompt structure — charter, identity, task, hygiene, response order blocks are surface-independent.\n\n### Feature Degradation Table\n\n| Feature | CLI | VS Code | Degradation |\n|---------|-----|---------|-------------|\n| Parallel fan-out | `mode: \"background\"` + `read_agent` | Multiple subagents in one turn | None — equivalent concurrency |\n| Model selection | Per-spawn `model` param (4-layer hierarchy) | Session model only (Phase 1) | Accept session model, log intent |\n| Scribe fire-and-forget | Background, never read | Sync, must wait | Batch with last parallel group |\n| Launch table UX | Show table → results later | Skip table → results with response | UX only — results are correct |\n| SQL tool | Available | Not available | Avoid SQL in cross-platform code paths |\n| Response order bug | Critical workaround | Possibly necessary (unverified) | Keep the block — harmless if unnecessary |\n\n### SQL Tool Caveat\n\nThe `sql` tool is **CLI-only**. It does not exist on VS Code, JetBrains, or GitHub.com. Any coordinator logic or agent workflow that depends on SQL (todo tracking, batch processing, session state) will silently fail on non-CLI surfaces. Cross-platform code paths must not depend on SQL. Use filesystem-based state (`.squad\u002F` files) for anything that must work everywhere.\n\n## Examples\n\n**Example 1: CLI parallel spawn**\n```typescript\n\u002F\u002F Coordinator detects task tool available → CLI mode\ntask({ agent_type: \"general-purpose\", mode: \"background\", model: \"claude-sonnet-4.5\", ... })\ntask({ agent_type: \"general-purpose\", mode: \"background\", model: \"claude-haiku-4.5\", ... })\n\u002F\u002F Later: read_agent for both\n```\n\n**Example 2: VS Code parallel spawn**\n```typescript\n\u002F\u002F Coordinator detects runSubagent available → VS Code mode\nrunSubagent({ prompt: \"...Runtime Engineer charter + task...\" })\nrunSubagent({ prompt: \"...Quality Engineer charter + task...\" })\nrunSubagent({ prompt: \"...Scribe charter + task...\" }) \u002F\u002F Last in group\n\u002F\u002F Results return automatically, no read_agent\n```\n\n**Example 3: Fallback mode**\n```typescript\n\u002F\u002F Neither task nor runSubagent available → work inline\n\u002F\u002F Coordinator executes the task directly without spawning\n```\n\n## Anti-Patterns\n\n- ❌ Using SQL tool in cross-platform workflows (breaks on VS Code\u002FJetBrains\u002FGitHub.com)\n- ❌ Attempting per-spawn model selection on VS Code (Phase 1 — only session model works)\n- ❌ Fire-and-forget Scribe on VS Code (must batch as last subagent)\n- ❌ Showing launch table on VS Code (results already inline)\n- ❌ Apologizing or explaining platform limitations to the user\n- ❌ Using `task` when only `runSubagent` is available\n- ❌ Dropping prompt structure (charter\u002Fidentity\u002Ftask) on non-CLI platforms\n","## Context\n\nSquad runs on multiple Copilot surfaces (CLI, VS Code, JetBrains, GitHub.com). The coordinator must detect its platform and adapt spawning behavior accordingly. Different tools are available on different platforms, requiring conditional logic for agent spawning, SQL usage, and response timing.\n\n## Patterns\n\n### Platform Detection\n\nBefore spawning agents, determine the platform by checking available tools:\n\n1. **CLI mode** — `task` tool is available → full spawning control. Use `task` with `agent_type`, `mode`, `model`, `description`, `prompt` parameters. Collect results via `read_agent`.\n\n2. **VS Code mode** — `runSubagent` or `agent` tool is available → conditional behavior. Use `runSubagent` with the task prompt. Drop `agent_type`, `mode`, and `model` parameters. Multiple subagents in one turn run concurrently (equivalent to background mode). Results return automatically — no `read_agent` needed.\n\n3. **Fallback mode** — neither `task` nor `runSubagent`\u002F`agent` available → work inline. Do not apologize or explain the limitation. Execute the task directly.\n\nIf both `task` and `runSubagent` are available, prefer `task` (richer parameter surface).\n\n### CopilotSession Lifecycle Invariant\n\n- CopilotSession lifecycle management must stay deterministic across surfaces: no ambiguous ownership or state transitions.\n- Session resources must be released on completion, cancellation, and error paths; compatibility work must not trade platform coverage for leaks.\n\n### VS Code Spawn Adaptations\n\nWhen in VS Code mode, the coordinator changes behavior in these ways:\n\n- **Spawning tool:** Use `runSubagent` instead of `task`. The prompt is the only required parameter — pass the full agent prompt (charter, identity, task, hygiene, response order) exactly as you would on CLI.\n- **Parallelism:** Spawn ALL concurrent agents in a SINGLE turn. They run in parallel automatically. This replaces `mode: \"background\"` + `read_agent` polling.\n- **Model selection:** Accept the session model. Do NOT attempt per-spawn model selection or fallback chains — they only work on CLI. In Phase 1, all subagents use whatever model the user selected in VS Code's model picker.\n- **Scribe:** Cannot fire-and-forget. Batch Scribe as the LAST subagent in any parallel group. Scribe is light work (file ops only), so the blocking is tolerable.\n- **Launch table:** Skip it. Results arrive with the response, not separately. By the time the coordinator speaks, the work is already done.\n- **`read_agent`:** Skip entirely. Results return automatically when subagents complete.\n- **`agent_type`:** Drop it. All VS Code subagents have full tool access by default. Subagents inherit the parent's tools.\n- **`description`:** Drop it. The agent name is already in the prompt.\n- **Prompt content:** Keep ALL prompt structure — charter, identity, task, hygiene, response order blocks are surface-independent.\n\n### Feature Degradation Table\n\n| Feature | CLI | VS Code | Degradation |\n|---------|-----|---------|-------------|\n| Parallel fan-out | `mode: \"background\"` + `read_agent` | Multiple subagents in one turn | None — equivalent concurrency |\n| Model selection | Per-spawn `model` param (4-layer hierarchy) | Session model only (Phase 1) | Accept session model, log intent |\n| Scribe fire-and-forget | Background, never read | Sync, must wait | Batch with last parallel group |\n| Launch table UX | Show table → results later | Skip table → results with response | UX only — results are correct |\n| SQL tool | Available | Not available | Avoid SQL in cross-platform code paths |\n| Response order bug | Critical workaround | Possibly necessary (unverified) | Keep the block — harmless if unnecessary |\n\n### SQL Tool Caveat\n\nThe `sql` tool is **CLI-only**. It does not exist on VS Code, JetBrains, or GitHub.com. Any coordinator logic or agent workflow that depends on SQL (todo tracking, batch processing, session state) will silently fail on non-CLI surfaces. Cross-platform code paths must not depend on SQL. Use filesystem-based state (`.squad\u002F` files) for anything that must work everywhere.\n\n## Examples\n\n**Example 1: CLI parallel spawn**\n```typescript\n\u002F\u002F Coordinator detects task tool available → CLI mode\ntask({ agent_type: \"general-purpose\", mode: \"background\", model: \"claude-sonnet-4.5\", ... })\ntask({ agent_type: \"general-purpose\", mode: \"background\", model: \"claude-haiku-4.5\", ... })\n\u002F\u002F Later: read_agent for both\n```\n\n**Example 2: VS Code parallel spawn**\n```typescript\n\u002F\u002F Coordinator detects runSubagent available → VS Code mode\nrunSubagent({ prompt: \"...Runtime Engineer charter + task...\" })\nrunSubagent({ prompt: \"...Quality Engineer charter + task...\" })\nrunSubagent({ prompt: \"...Scribe charter + task...\" }) \u002F\u002F Last in group\n\u002F\u002F Results return automatically, no read_agent\n```\n\n**Example 3: Fallback mode**\n```typescript\n\u002F\u002F Neither task nor runSubagent available → work inline\n\u002F\u002F Coordinator executes the task directly without spawning\n```\n\n## Anti-Patterns\n\n- ❌ Using SQL tool in cross-platform workflows (breaks on VS Code\u002FJetBrains\u002FGitHub.com)\n- ❌ Attempting per-spawn model selection on VS Code (Phase 1 — only session model works)\n- ❌ Fire-and-forget Scribe on VS Code (must batch as last subagent)\n- ❌ Showing launch table on VS Code (results already inline)\n- ❌ Apologizing or explaining platform limitations to the user\n- ❌ Using `task` when only `runSubagent` is available\n- ❌ Dropping prompt structure (charter\u002Fidentity\u002Ftask) on non-CLI platforms\n",{"name":5,"domain":28,"source":42,"confidence":34,"description":7},"extracted","dev","7b731ec97f35346bdc4fa87c3edaf16b808fc0ae","templates\u002Fskills\u002Fclient-compatibility",520,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad","https:\u002F\u002Fgithub.github.io\u002Fsquad\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 02:13:59",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add github\u002Fsquad --skill client-compatibility",{"tool":59,"command":60},"bunx","bunx skills add github\u002Fsquad --skill client-compatibility",{"tool":62,"command":63},"pnpm","pnpm dlx skills add github\u002Fsquad --skill client-compatibility","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Ftemplates\u002Fskills\u002Fclient-compatibility\u002FSKILL.md",true,[],[68,76,83,90,122,134],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":75},"01M76742ST8ZMSD38226TH61CN","squad-coordinator-init-mode","Squad coordinator only: Init Mode, proposing and casting a new team. Load when team.md is missing or has an empty roster, or when asked to set up or cast a team.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fsquad-coordinator-init-mode\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":75},"01M7673KYSME979M20YQTVV8P6","retro-enforcement","Keep retrospectives on schedule and track their action items as GitHub Issues, not markdown checklists","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fretro-enforcement\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":75},"01M7670QCHBSR4W2XSX8XPA2ZB","cli-wiring","Checklist for wiring a new Squad CLI command: route it in cli-entry.ts, add help text, and test that it is reachable","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fcli-wiring\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":101,"publishedAt":37},"01M6X287DVJK1S91END9DSHETN","gh-aw-enlistment","Enlist a repository into Squad by installing the supported GitHub Agentic Workflows (gh-aw) bootstrap — with strict compilation, an explicit safe-update allowlist, and a human-reviewed bootstrap PR. Never auto-merges.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fworkflows\u002Fskills\u002Fgh-aw-enlistment\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":99,"taxonomyTypeDesc":100},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"gh aw enlistment","gh","preflight","guide","identity","compiling","squad","pr creation","Safety","safe","update","human","github cli","lock","workflows","auto","files","agentic workflows","ci","actions",{"skillNo":123,"name":124,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":128,"publishedAt":37},"01M6X27Y5119CSRQFFJCV6432R","My Skill","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Ftest-fixtures\u002Fskills-test-abb30454\u002Fmy-skill\u002FSKILL.md",[127],{"categoryNo":97,"categoryName":98,"taxonomyType":99,"taxonomyTypeDesc":100},[129,130,131,132,133],"my","my skill","tester","testing","vitest",{"skillNo":135,"name":136,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":140,"publishedAt":37},"01M6X27RWAYB2X9ER0MVRRKXGA","bad-skill","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Ftest-fixtures\u002Fskills-test-abb30454\u002Fbad-skill\u002FSKILL.md",[139],{"categoryNo":97,"categoryName":98,"taxonomyType":99,"taxonomyTypeDesc":100},[141,142],"bad","bad skill"]