sop-creator
Skill1 starsChanged 6 months agoMITView on GitHub
Generate deterministic state-machine SOPs that transform probabilistic AI into reliable automation pipelines
6 other projects use a version of this.
Adopted by
Most recently taken up by
- hichamaoubid/Claude-skillztheir own version, first seen Nov 29, 2026
- krishagel/geoffreytheir own version, first seen Nov 15, 2026
- kid0317/crewai_mas_demotheir own version, first seen Oct 8, 2026
- massielvasquez193-dot/Claude-skilltheir own version, first seen Jun 10, 2026
- harryleemedia/second-braintheir own version, first seen Mar 17, 2026
- coleam00/second-brain-skillstheir own version, first seen Jan 24, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- coleam00/second-brain-skills★ 819same name
- kid0317/crewai_mas_demo★ 164same name
- harryleemedia/second-brain★ 16same name
- krishagel/geoffrey★ 9same name
- hichamaoubid/Claude-skillz★ 0same name
- massielvasquez193-dot/Claude-skill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- actor-readerSkill
- articleSkill
- gateSkill
- hackathon-practiceSkill
- human-elite-englishSkill
- memory-dreamingSkill
- postmortem-noteSkill
- project-challenge-labSkill
- project-compassSkill
- recall-loopSkill
- repo-stewardSkill
- skill-reviewSkill
- socratic-discussSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 21 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Ensure consistent execution across iterations
- Distinctive: line 24
Create auditable, verifiable processes
- Very specific: line 145
Use assets/state-machine-sop.md as template
- Distinctive: line 147
Ensure < 200 lines per section
- Very specific: line 151
Create scripts/validate_state{N}.sh for each state
- Very specific: line 152
Use assets/gateway-template.sh as base
- Distinctive: line 154
Ensure scripts return proper exit codes
- Distinctive: line 183
All SOP files generated
- Distinctive: line 189
Verify exit codes (0 for pass, non-zero for fail)
- Distinctive: line 190
Check error messages are actionable
- Distinctive: line 193
Verify state machine completeness
- Distinctive: line 194
Check all states have gateways
- Distinctive: line 195
Ensure error handling present
- Distinctive: line 239
MUST NOT generate SOPs without validation gateways
- Distinctive: line 240
MUST NOT create states without exit conditions
- Distinctive: line 241
MUST NOT skip gateway script generation
- Distinctive: line 242
MUST NOT exceed 200 lines per SOP section
- Distinctive: line 243
MUST NOT use vague language ("should", "might", "consider")
- Distinctive: line 246
MUST use imperative language ("MUST", "FORBIDDEN")
- Distinctive: line 247
MUST include error handling for each state
- Distinctive: line 248
MUST generate executable gateway scripts
- Distinctive: line 249
MUST validate all outputs before proceeding
- Distinctive: line 250
MUST update progress after each state
- Distinctive: line 295
DO NOT proceed until user responds
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SOP Creator: VibeCoding Meta-Skill
Transform natural language requirements into high-certainty state machine workflows.
Purpose
This skill generates Standard Operating Procedures (SOPs) that constrain AI behavior through:
- Physical validation gateways (exit code enforcement)
- Explicit state machines (finite, auditable transitions)
- Built-in error handling (degradation ladders)
- Structured I/O (typed inputs/outputs)
When to Use
Invoke /sop-creator when you need to:
- Automate multi-step workflows with AI
- Ensure consistent execution across iterations
- Prevent context drift and premature actions
- Create auditable, verifiable processes
State Machine
INIT → REQUIREMENTS → DESIGN → GENERATION → VALIDATION → COMPLETE
↓ ↓ ↓ ↓ ↓
[Gate] [Gate] [Gate] [Gate] [Gate]State 1: REQUIREMENTS
Entry Conditions
- User has provided workflow description
- Working directory is writable
Actions
- Extract Core Requirements
- Identify workflow trigger condition
- Define expected deliverables
- List critical constraints
- Determine validation criteria
- Generate requirements.json
{ "workflow_name": "string", "purpose": "string", "trigger": "string", "deliverables": ["string"], "constraints": ["string"], "states": ["string"], "validation_methods": ["string"] }
Validation Gateway
Script: scripts/validate_requirements.py
Checks:
- requirements.json exists and is valid JSON
- All required fields present
- At least 3 states defined
- At least 1 validation method per state
Exit Conditions
- requirements.json created
- Gateway returns exit code 0
- User approves requirements
Next State
→ DESIGN (if approved) → REQUIREMENTS (if rejected - revise)
State 2: DESIGN
Entry Conditions
- requirements.json exists and validated
- User approval received
Actions
- Design State Transitions
- Map state flow diagram
- Define entry/exit conditions per state
- Specify allowed actions per state
- Design validation gateways
- Generate design.json
{ "states": [ { "name": "string", "purpose": "string", "entry_conditions": ["string"], "actions": ["string"], "exit_conditions": ["string"], "gateway_script": "string", "next_states": ["string"] } ], "global_constraints": ["string"], "error_handling": { "max_retries": 3, "escalation_actions": ["string"] } }
Validation Gateway
Script: scripts/validate_design.py
Checks:
- design.json exists and is valid JSON
- All states have entry/exit conditions
- All states have gateway scripts defined
- State transitions form valid DAG (no orphans)
- Error handling defined
Exit Conditions
- design.json created
- Gateway returns exit code 0
- State machine is acyclic (except retry loops)
Next State
→ GENERATION
State 3: GENERATION
Entry Conditions
- design.json exists and validated
- Output directory specified
Actions
- Generate SOP Markdown
- Use
assets/state-machine-sop.mdas template - Populate with design.json data
- Ensure < 200 lines per section
- Add workflow-specific constraints
- Use
- Generate Gateway Scripts
- Create
scripts/validate_state{N}.shfor each state - Use
assets/gateway-template.shas base - Implement validation logic from design.json
- Ensure scripts return proper exit codes
- Create
- Generate Support Files
- Create
progress.mdtemplate - Create
errors.logtemplate - Create
BLOCKED.mdtemplate
- Create
Validation Gateway
Script: scripts/validate_generation.py
Checks:
- SOP markdown file exists
- All gateway scripts exist and are executable
- progress.md template exists
- All placeholders replaced
Exit Conditions
- All files generated
- Gateway returns exit code 0
- No [PLACEHOLDER] text remains
Next State
→ VALIDATION
State 4: VALIDATION
Entry Conditions
- All SOP files generated
- Gateway scripts executable
Actions
- Dry-Run Test
- Execute each gateway script with test data
- Verify exit codes (0 for pass, non-zero for fail)
- Check error messages are actionable
- Structure Validation
- Verify state machine completeness
- Check all states have gateways
- Ensure error handling present
- Validate constraint clarity
- Generate Validation Report
# SOP Validation Report ## Gateway Tests - [x] validate_state1.sh: PASS - [x] validate_state2.sh: PASS ## Structure Checks - [x] All states have entry/exit conditions - [x] All gateways return proper exit codes - [x] Error handling defined ## Issues Found [List any issues] ## Status: READY / NEEDS_REVISION
Validation Gateway
Script: scripts/final_validation.sh
Checks:
- All state gateways executable
- Test execution successful
- No structural issues found
- Validation report shows READY
Exit Conditions
- Validation report generated
- Gateway returns exit code 0
- Status = READY
Next State
→ COMPLETE
Global Constraints
FORBIDDEN Actions
- MUST NOT generate SOPs without validation gateways
- MUST NOT create states without exit conditions
- MUST NOT skip gateway script generation
- MUST NOT exceed 200 lines per SOP section
- MUST NOT use vague language ("should", "might", "consider")
REQUIRED Behaviors
- MUST use imperative language ("MUST", "FORBIDDEN")
- MUST include error handling for each state
- MUST generate executable gateway scripts
- MUST validate all outputs before proceeding
- MUST update progress after each state
Error Handling
Degradation Ladder
Level 1: First Failure
- Log error to errors.log
- Analyze validation output
- Retry with corrections
Level 2: Second Failure
- Log error to errors.log
- Review reference documentation
- Check constraint violations
- Retry with revised approach
Level 3: Third Failure (ESCALATION)
- Log error to errors.log
- STOP all generation
- Create BLOCKED.md:
# SOP Generation Blocked ## State: [STATE_NAME] ## Attempts: 3 ## Problem [Description] ## Gateway Output [Full output] ## Tried Approaches 1. [Approach 1 - why failed] 2. [Approach 2 - why failed] 3. [Approach 3 - why failed] ## Questions 1. [Specific question] 2. [Clarification needed] - Request user intervention
- DO NOT proceed until user responds
Output Structure
{output_directory}/
├── {workflow_name}_sop.md # Main SOP document
├── progress.md # Progress tracking template
├── errors.log # Error log template
├── BLOCKED.md # Escalation template (if needed)
├── scripts/
│ ├── validate_state1.sh # Gateway for state 1
│ ├── validate_state2.sh # Gateway for state 2
│ ├── validate_state3.sh # Gateway for state 3
│ └── final_validation.sh # Final validation
└── .sop-metadata.json # Generation metadataUsage Example
# Invoke the skill
/sop-creator
# Provide requirements when prompted
"Create an SOP for deploying a Docker container to production"
# Review generated requirements.json
# Approve or request revisions
# Skill generates complete SOP package
# All files created in specified output directory
# Test the generated SOP
cd output_directory
bash scripts/validate_state1.shReferences
- VibeCoding Principles:
references/vibecoding-principles.md - Gateway Design:
references/engineering-gateways.md - SOP Template:
assets/state-machine-sop.md - Gateway Templates:
assets/gateway-template.{sh,py}
Version History
- 1.0.0 - Initial release with 4-state generation pipeline
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

