cmd/sgai/skel/.sgai/skills/set-workflow-state/SKILL.md
You MUST USE THIS SKILL TO COMMUNICATE TO THE ENVIRONMENT WHAT YOU ARE DOING, WHERE YOU ARE GOING, AND WHETHER YOU ARE BLOCKED (IE NEED TO SEND THE HUMAN PARTNER A MESSAGE)
npx skillsauth add sandgardenhq/sgai set-workflow-stateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CRITICAL: You must maintain the workflow state file throughout your work using the sgai_update_workflow_state tool.
{
"status": "working" | "agent-done" | "complete",
"message": "Status message describing current state",
"task": "Current task description or null",
"progress": ["note1", "note2", "note3"]
}
status - Overall workflow status
"working" - Actively working, may need another iteration"agent-done" - Agent finished its work and the sgai should move to the next agent."complete" - Work is done successfullymessage - Status message
task - Current task being worked on (required)
"") when no specific task or when completeprogress - Progress log (array of strings)
IMPORTANT: Use the sgai_update_workflow_state tool to update the state file. Do NOT use bash/jq commands directly.
Tool: sgai_update_workflow_state
Available parameters:
status (required): "working" | "agent-done" | "complete"task (required): Current task being worked on. Use empty string to clear.addProgress (required): Add a progress note (appended to progress array). Document your steps frequently.Examples:
Update task and add progress note:
Tool: sgai_update_workflow_state
Parameters: {
"task": "Writing tests for authentication endpoints",
"addProgress": "Created User model with bcrypt password hashing"
}
Mark as complete:
Tool: sgai_update_workflow_state
Parameters: {
"status": "complete",
"task": "",
"addProgress": "All 15 tests passing, feature verified working"
}
Signal work is done for this agent:
Tool: sgai_update_workflow_state
Parameters: {
"status": "agent-done",
"task": "",
"addProgress": "Review complete, ready for next step"
}
Update frequency:
Use ask_user_question to present structured multi-choice questions to the human partner. This is the sole channel for human communication.
In flow mode, navigation between agents is driven by inter-agent messages using sgai_send_message() and sgai_check_inbox().
Send a message to route work: Use sgai_send_message({toAgent: "agent-name", body: "..."}) to send work to another agent.
Message-based routing: When you set status: "agent-done", the system checks for pending messages and routes to the agent with the oldest unread message.
Default to coordinator: When no messages are pending, control returns to the coordinator.
Terminal Nodes: If your agent has no successors (terminal node), control returns to the coordinator.
status: "complete" to end the entire workflowdocumentation
Start, stop, and steer agentic sessions in sgai workspaces. Use when you need to launch AI agent sessions, halt running sessions, or inject steering instructions to guide the agent mid-execution without stopping it.
development
Monitor sgai workspace status, events, progress, diffs, and workflow diagrams. Use when you need to observe what agents are doing, track progress, get the current state of all workspaces, subscribe to real-time updates via SSE, or inspect code changes.
development
Access agents, skills, and code snippets available in sgai workspaces. Use when you need to discover what agents are defined in a workspace, browse available skills, get skill instructions, find code snippets by language, or retrieve snippet content for a specific task.
data-ai
Handle agent questions and work gates in sgai workspaces. Use when an agent is blocked waiting for human input, when you need to respond to multi-choice questions, approve work gates, or provide free-text answers to agent queries.