client-compatibility

Solid

Platform detection and adaptive spawning for CLI vs VS Code vs other surfaces

AI & Automation 58 stars 15 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
59
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## Context 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. ## Patterns ### Platform Detection Before spawning agents, determine the platform by checking available tools: 1. **CLI mode** — `task` tool is available → full spawning control. Use `task` with `agent_type`, `mode`, `model`, `description`, `prompt` parameters. Collect results via `read_agent`. 2. **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. 3. **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). ### VS Code Spawn Adaptations When in VS Code mode, the coordinator changes behavior in these ways: - **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. - **Parallel...

Details

Author
DanWahlin
Repository
DanWahlin/ai-agent-board
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category