cmd/sgai/skel/.sgai/skills/stpa/stpa-overview/SKILL.md
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.
npx skillsauth add sandgardenhq/sgai stpa-overviewInstall 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.
STPA (System Theoretic Process Analysis) is a hazard analysis method that:
"I'm using the STPA Overview skill to guide you through a systematic hazard analysis. We'll work through 4 steps, asking questions along the way."
Load: skills({"name":"stpa/step1-define-purpose"})
Load: skills({"name":"stpa/step2-control-structure"})
rankdir=TB and node [shape=box]Load: skills({"name":"stpa/step3-unsafe-control-actions"})
Load: skills({"name":"stpa/step4-loss-scenarios"})
[Step 1: Purpose] → [Step 2: Control Structure] → [Step 3: UCAs] → [Step 4: Scenarios]
↑ |
└──────────────────────── (Iterate as needed) ─────────────────────────┘
At each step:
ask_user_question to present questions and wait for responses## STPA Analysis## STPA Analysis
### Step 1: Purpose Definition
#### Losses (L)
- L-1: [description]
#### Hazards (H)
- H-1: [system] [unsafe condition] [→ L-1]
#### System-Level Constraints (SC)
- SC-1: [condition to enforce] [→ H-1]
### Step 2: Control Structure
[Graphviz/DOT diagram]
### Step 3: Unsafe Control Actions
[UCA table]
### Step 4: Loss Scenarios
[Scenario descriptions and recommendations]
## STPA Findings
- [X] STPA analysis completed on [date]
- Key hazards identified: [count]
- Unsafe control actions found: [count]
- Critical recommendations: [list]
After completing all 4 steps:
## STPA Findingsstatus: "agent-done" to return controlstpa/step1-define-purpose - Detailed Step 1 guidancestpa/step2-control-structure - Control structure modelingstpa/step3-unsafe-control-actions - UCA identification tablesstpa/step4-loss-scenarios - Causal scenario analysisdocumentation
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.