
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.
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.
Run and manage ad-hoc AI prompts in sgai workspaces without starting a full agentic session. Use when you need to run a one-off AI prompt against a workspace, check the status of a running ad-hoc prompt, or stop a running ad-hoc prompt.
Use the sgai compose wizard to create and manage GOAL.md files for workspaces. Supports reading compose state, updating wizard fields, saving drafts, previewing generated GOAL.md content, browsing workflow templates, and writing the final GOAL.md to the workspace.
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.
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.
Force unrelated concepts together to discover emergent properties - "What if we treated X like Y?". Can't find approach that fits your problem. Conventional solutions feel inadequate. Need innovative solution. Stuck thinking inside one domain. Want breakthrough, not incremental improvement.
Test at extremes (1000x bigger/smaller, instant/year-long) to expose fundamental truths hidden at normal scales. Unsure if approach will scale. Edge cases unclear. Want to validate architecture. "Will this work at production scale?" Need to find fundamental limits.
Use when completing tasks, implementing major features, or before merging to verify work meets requirements - dispatches skills:code-reviewer subagent to review implementation against plan or requirements before proceeding
Entry point for STPA (System Theoretic Process Analysis) hazard analysis. Guides through all 4 steps sequentially. When starting a new STPA analysis session. When the human partner mentions safety analysis, hazard analysis, or risk assessment. When analyzing control systems for potential failures.
Use when creating or editing skills, before deployment, to verify they work under pressure and resist rationalization - applies RED-GREEN-REFACTOR cycle to process documentation by running baseline without skill, writing to address failures, iterating to close loopholes
Build AI agents using prompt-native architecture where features are defined in prompts, not code. Use when creating autonomous agents, designing MCP servers, implementing self-modifying systems, or adopting the "trust the agent's intelligence" philosophy.
Black Swan Analysis provides a rigorous methodology for identifying high-impact, unpredictable events while building systems that thrive under volatility. You must use this framework when the human partner challenges you on your claims, or when the human partner asks you to create plans from vague instructions
Interactive idea refinement using Socratic method to develop fully-formed designs. When your human partner says "I've got an idea", "Let's make/build/create", "I want to implement/add", "What if we". When starting design for complex feature. Before writing implementation plans. When idea needs refinement and exploration. ACTIVATE THIS AUTOMATICALLY when your human partner describes a feature or project idea - don't wait for /brainstorm command.
You must use this skill when debugging web UI bugs or testing interactive components that require multi-step browser interactions. Automates common UI testing patterns for debugging web applications - starting servers, navigating to pages, interacting with form elements, and verifying expected behaviors without manual step-by-step Playwright commands
Guide for creating custom opencode agents with proper configuration, tools, permissions, and reasoning for specific tasks. When creating new opencode agents for security auditing, code review, planning, documentation, or specialized workflows; when built-in agents don't suffice; when configuring agents with restricted tools or custom prompts
Use when invalid data causes failures deep in execution, requiring validation at multiple system layers - validates at every layer data passes through to make bugs structurally impossible
Find breakthrough insights by forcing unrelated concepts together, detecting meta-patterns across domains, and discovering simplification cascades. When stuck on complex problems. When searching for innovative solutions. When same issue appears in different domains. When complexity feels excessive. When conventional approaches aren't working. When seeking radical simplification.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Interactive wizard to compose valid GOAL.md files for SGAI with step-by-step guidance through 7 phases. When your human partner wants to create a new GOAL.md file, start a new SGAI project, configure agents for a software factory, or asks "help me set up GOAL.md", "I want to configure agents", "let's start a new project with SGAI".
Use when reading JSON files in Go applications, especially for configuration files, data files, or any JSON parsing that requires comprehensive error handling for missing files, invalid JSON, and permission errors
Go module structure and project organization patterns. When setting up a new Go project or organizing existing Go code
Use when building any HTMX interface with polling, SSE, or auto-refresh - prevents state loss (form inputs, scroll positions, details/accordion state) during automatic DOM updates by enforcing Idiomorph morph swaps with correct configuration. When building HTMX pages that auto-refresh via polling (hx-trigger="every Ns") or SSE. When select boxes close on refresh. When form inputs lose focus or reset. When details/accordion elements collapse. When scroll positions jump to top. When you see innerHTML swap on auto-refreshing content.
Guide for adding new code snippets to the library; When you need to add a new code snippet to the sgai_find_snippets library, when creating files without proper metadata, when using incorrect filenames or extensions, when adding code without extensive comments
Flip core assumptions to reveal hidden constraints and alternative approaches - "what if the opposite were true?". Stuck on assumptions you can't question. Solution feels forced. "This is how it must be done" thinking. Want to challenge conventional wisdom. Need fresh perspective on problem.
Guide for creating and implementing plugins to extend OpenCode functionality, including hooks, custom tools, and event handling. When you need to add custom functionality to OpenCode, such as notifications, custom tools, or modifying behavior.
Automatically scans GOAL.md for unchecked items, provides completion status summary, and enables coordinator to mark items as complete. When coordinator needs to verify project completion status or before marking work as complete. When coordinator needs to mark completed items in GOAL.md. Symptoms - manually going through GOAL.md line by line to check task completion, needing quick summary of pending vs completed tasks, verifying all requirements are met before finalizing work.
SSE with useSyncExternalStore, reconnection with exponential backoff, snapshot rehydration, typed event parsing, connection status UI. Use when implementing SSE data stores, real-time update hooks, or connection resilience in the React SPA. Triggers on SSE, EventSource, useSyncExternalStore, real-time updates, reconnection, or live data tasks.
Post-completion factory improvement analysis. Guides the retrospective agent through artifact discovery, pattern analysis, suggestion generation, and presenting proposed changes for approval. Use when the retrospective agent starts its post-completion phase.
Guide for using tmux to manage detached sessions for long-running processes, including lifecycle management, cleanup, startup, verification, and output capture; When you need to run servers or long-running commands in the background, send commands to them, capture output, handle TTY requirements, or manage session lifecycle with error handling
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)
STPA Step 1 - Define the purpose of analysis by identifying losses, hazards, and system-level constraints. When beginning STPA analysis. After loading stpa/overview. When you need to establish what could go wrong and what must be prevented.
STPA Step 2 - Model the control structure using hierarchical control-feedback diagrams in Graphviz/DOT format; After completing STPA Step 1. When you need to understand how control flows through a system. When identifying controllers, control actions, and feedback paths.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes - four-phase framework (root cause investigation, pattern analysis, hypothesis testing, implementation) that ensures understanding before attempting solutions
Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies
Understand how ideas evolved over time to find old solutions for new problems and avoid repeating past failures. When problem feels familiar but can't remember details. When asked "why do we use X?". Before abandoning an approach, understand why it exists. When evaluating "new" ideas that might be revivals. When past attempts failed and need to understand why. When tracing decision genealogy.
YOU MUST USE THIS SKILL WHENEVER YOU NEED TO USE git OR jj. Use jj instead of git for version control operations. When you need to perform version control tasks like committing, branching, merging, etc. Traps git use cases to steer to jj.
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.
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Problem-Solving Dispatch; Dispatch to the right problem-solving technique based on how you're stuck; Stuck on a problem. Conventional approaches not working. Need to pick the right problem-solving technique. Not sure which skill applies.
Find one insight that eliminates multiple components - "if this is true, we don't need X, Y, or Z". Code has many similar-looking implementations. Growing list of special cases. Same concept handled 5 different ways. Excessive configuration. Many if/else branches doing similar things. Complexity spiraling.
Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first
Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses
Clean up generated code by questioning why things are there and cross-referencing with GOAL.md, even when tempted to skip due to time pressure or thinking it's "good enough". After generating code, when tempted to commit messy code, or when noticing clutter that could be removed.
Go code review checklist based on official Go style guides. When reviewing Go code for style, idioms, and best practices
Go 1.22+ enhanced HTTP routing with method matching and wildcards. When defining HTTP routes using net/http ServeMux in Go 1.22+
Go testing patterns, coverage analysis, and best practices. When writing tests for Go code or analyzing test coverage
Use when facing 3+ independent failures that can be investigated without shared state or dependencies - dispatches multiple Workbenches agents to investigate and fix independent problems concurrently
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Create and setup a new Claude Agent SDK application with interactive guidance for language choice, project setup, and automatic verification.
Spot patterns appearing in 3+ domains to find universal principles. Same issue in different parts of codebase. Pattern feels familiar across projects. "Haven't I solved this before?" Different teams solving similar problems. Recurring solution shapes.
Tool for navigating large markdown files, providing outline and section extraction. When dealing with large markdown files, need to get outline of sections, extract specific section content. Symptoms - large markdown files, need to navigate structure without reading whole file, extract sections for focused reading, documentation navigation, changelog parsing.
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior
STPA Step 3 - Identify Unsafe Control Actions (UCAs) using the 4-type analysis framework. After completing STPA Step 2. When analyzing control actions for potential safety issues. When you need to systematically identify what could go wrong with each control action.
Create, fork, delete, and rename sgai workspaces via the HTTP API. Use when you need to set up new project workspaces, create parallel forks for concurrent development, clean up finished forks, or rename existing fork workspaces.
Use when starting any conversation - establishes mandatory workflows for finding and using skills, including using Skill tool before announcing usage, following brainstorming before coding, and creating TodoWrite todos for checklists
STPA Step 4 - Identify Loss Scenarios by tracing causal pathways back through control loops to understand why UCAs might occur. After completing STPA Step 3. When you need to understand WHY unsafe control actions might happen. When developing recommendations and mitigations.
TDD for process documentation - test with subagents before writing, iterate until bulletproof. When you discover a technique, pattern, or tool worth documenting for reuse. When editing existing skills. When asked to modify skill documentation. When you've written a skill and need to verify it works before deploying. When skills fail to help agents, when documentation is unclear, when new patterns emerge that need standardization.
Recognize when disagreements reveal valuable context, preserve multiple valid approaches instead of forcing premature resolution. When multiple approaches have legitimate trade-offs. When stakeholders have conflicting valid priorities. When context determines which approach is better. During design when you're tempted to ask "which is best?" but both are good. When tensions reveal flexibility needs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/TypeScript code to ensure optimal performance patterns. Triggers on tasks involving React components, data fetching, bundle optimization, or performance improvements.
MANDATORY when GOAL.md mentions deploying, shipping, releasing, or publishing built artifacts to any environment - reads deployment instructions from the .deploy/ directory, enforces pre-deployment verification, artifact integrity checks, deployment execution safety, post-deployment validation, and rollback planning; prevents deploying without tests, skipping rollback plans, or bypassing environment validation. When GOAL.md says deploy, ship, release, publish, or push artifact to production/staging/server.
Use when you need to find code snippets by language and query. When looking for code examples, patterns, or snippets in a specific programming language. When you need to search for code snippets quickly. When searching for code patterns or best practices.
Create and setup a new OpenAI Agents SDK application with interactive guidance for language choice, agent type selection (Basic, Voice, Realtime), project setup, and automatic verification.