sandgardenhq/sgai/using-sgai
Claude Code and agent skill by sandgardenhq/sgai
- community
Checking that the SKILL.md file is still in the repository.
Drive sgai (Software Garden AI) from any MCP-capable harness or AI agent. Covers the cyclical probe/poll/act workflow for managing AI software factory workspaces, sessions, and human interaction. Use this as the entrypoint when orchestrating sgai from Claude Code, Codex, or any AI harness.
Install
npx vskill@latest install sandgardenhq/sgai/using-sgaiSKILL.md
Using sgai from an AI Harness
sgai is a software factory system that runs AI agents in workspaces. This skill teaches you to drive it via the HTTP API or MCP tools.
Quick Start: Base URL
All examples assume BASE_URL=http://127.0.0.1:PORT where PORT is shown in the server startup log:
The MCP endpoint is at /mcp/external on the same server (e.g. http://127.0.0.1:PORT/mcp/external).
The Cyclical Probe/Poll/Act Loop
The core pattern for driving sgai is a continuous loop:
Step 1: Probe — Get Factory State
Response shape:
Key fields to check per workspace:
running— is a session active?needsInput— does the agent need a human response?pendingQuestion— non-null when human input is requiredstatus— current workflow status stringinProgress— is work actively happening?
Step 2: Check for Pending Questions
When workspace.pendingQuestion != null, the agent is blocked waiting for human input.
Question types:
"free-text"— respond with a text answer"multi-choice"— select from provided choices"work-gate"— approve to proceed (select approval text)
Step 3: Act Based on Status
| Workspace State | Action | |
|---|---|---|
needsInput: true | Call respond endpoint with answer | |
running: false and has goal | Start session | |
running: true | Monitor | |
| Session complete | Check results, start next task |
Step 4: Respond to Questions
Sub-skills
For detailed documentation on specific operations:
- workspace-management — Create, fork, delete, rename workspaces
- session-control — Start/stop sessions
- human-interaction — Respond to questions and work gates
- monitoring — List workspaces, get state, diffs, SVGs
- knowledge — Agents, skills, snippets
- compose — Compose wizard: state, save, preview, draft, templates
- adhoc — Ad-hoc prompt start/stop/status
MCP Interface
If using the MCP interface instead of HTTP, all tools are available at /mcp/external:
Key MCP tools mirror the HTTP API:
list_workspaces→ GET /api/v1/statestart_session→ POST /api/v1/workspaces/{name}/startrespond_to_question→ POST /api/v1/workspaces/{name}/respondwait_for_question→ polls + elicitation (MCP only)
Real-Time Updates via SSE
Subscribe to state changes instead of polling:
When you receive a reload event, re-fetch /api/v1/state.
Common Workflow: Start a Project End-to-End
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocs/sgai-skills/using-sgai/SKILL.md
Popularity
- Repository stars
- 113
- Repository forks
- 6
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sandgardenhq/sgai/using-sgai)