一键导入
client-compatibility
Platform detection and adaptive spawning for CLI vs VS Code vs other surfaces
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Platform detection and adaptive spawning for CLI vs VS Code vs other surfaces
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
{what this skill teaches agents}
{what this skill teaches agents}
**WORKFLOW SKILL** — Iteratively improve skill frontmatter compliance using the Ralph loop pattern. WHEN: "run sensei", "sensei help", "improve skill", "fix frontmatter", "skill compliance", "frontmatter audit", "score skill", "check skill tokens". INVOKES: token counting tools, test runners, git commands. FOR SINGLE OPERATIONS: use token CLI directly for counts/checks.
**WORKFLOW SKILL** — Research, outline, and scaffold a Slidev presentation. Phase 1 researches the topic and generates a detailed OUTLINE.md via runSubagent research and user guidance. Phase 2 generates slides.md, style.css, and images/ from the approved outline. WHEN: "create presentation", "new presentation", "scaffold presentation", "new Slidev deck", "new talk", "create slides", "start a presentation", "presentation about". INVOKES: runSubagent (web search, Microsoft Learn, WorkIQ), vscode_askQuestions, file-system tools. FOR SINGLE OPERATIONS: copy template folder manually.
**WORKFLOW SKILL** — Query WorkIQ for recent activity signals, identify patterns in conversations and meetings, cross-reference with latest tech announcements, and propose aligned demos as GitHub issues. WHEN: "intelligence scan", "what demos to build", "scan recent activity", "WorkIQ scan", "demo proposals from conversations", "identify demo opportunities", "what should I demo next". INVOKES: WorkIQ MCP, web search, GitHub issue tools. FOR SINGLE OPERATIONS: Query WorkIQ MCP directly.
Build an n-layer dependency graph from .NET upgrade assessment data and generate a phased modernization plan. Parses assessment.json from the .NET upgrade tools, extracts project dependency hierarchy via breadth-first layering, splits thick layers to cap projects per sub-layer, and produces a phased upgrade plan with Mermaid diagrams. Each phase targets PR-reviewable scope. SDK-style conversion is Phase 0, then layer-by-layer bottom-up modernization. WHEN: "plan appmod phases", "generate upgrade layers", "dependency layer plan", "phased migration plan", "break down dotnet upgrade", "layer extraction", "modernization phases", "upgrade dependency graph", "PR-sized migration plan", "appmod phasing strategy".
| name | client-compatibility |
| description | Platform detection and adaptive spawning for CLI vs VS Code vs other surfaces |
| domain | orchestration |
| confidence | high |
| source | extracted |
Squad 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.
Before spawning agents, determine the platform by checking available tools:
CLI mode — task tool is available → full spawning control. Use task with agent_type, mode, model, description, prompt parameters. Collect results via read_agent.
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.
Fallback mode — neither task nor runSubagent/agent available → work inline. Do not apologize or explain the limitation. Execute the task directly.
If both task and runSubagent are available, prefer task (richer parameter surface).
When in VS Code mode, the coordinator changes behavior in these ways:
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.mode: "background" + read_agent polling.read_agent: Skip entirely. Results return automatically when subagents complete.agent_type: Drop it. All VS Code subagents have full tool access by default. Subagents inherit the parent's tools.description: Drop it. The agent name is already in the prompt.| Feature | CLI | VS Code | Degradation |
|---|---|---|---|
| Parallel fan-out | mode: "background" + read_agent | Multiple subagents in one turn | None — equivalent concurrency |
| Model selection | Per-spawn model param (4-layer hierarchy) | Session model only (Phase 1) | Accept session model, log intent |
| Scribe fire-and-forget | Background, never read | Sync, must wait | Batch with last parallel group |
| Launch table UX | Show table → results later | Skip table → results with response | UX only — results are correct |
| SQL tool | Available | Not available | Avoid SQL in cross-platform code paths |
| Response order bug | Critical workaround | Possibly necessary (unverified) | Keep the block — harmless if unnecessary |
The 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/ files) for anything that must work everywhere.
Example 1: CLI parallel spawn
// Coordinator detects task tool available → CLI mode
task({ agent_type: "general-purpose", mode: "background", model: "claude-sonnet-4.5", ... })
task({ agent_type: "general-purpose", mode: "background", model: "claude-haiku-4.5", ... })
// Later: read_agent for both
Example 2: VS Code parallel spawn
// Coordinator detects runSubagent available → VS Code mode
runSubagent({ prompt: "...Fenster charter + task..." })
runSubagent({ prompt: "...Hockney charter + task..." })
runSubagent({ prompt: "...Scribe charter + task..." }) // Last in group
// Results return automatically, no read_agent
Example 3: Fallback mode
// Neither task nor runSubagent available → work inline
// Coordinator executes the task directly without spawning
task when only runSubagent is available