sop-structure
Skill10 starsChanged 39 days agoMITView on GitHub
Use when structuring Standard Operating Procedures with proper sections, organization, and markdown formatting. Covers SOP anatomy and section organization.
- Deletes or force-pushes
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/development/biome-complete/AGENTS.mdAGENTS.md
- skills/development/bun-development/AGENTS.mdAGENTS.md
- skills/development/commanderjs/AGENTS.mdAGENTS.md
- skills/documentation/markdown-authoring/AGENTS.mdAGENTS.md
- skills/package-mgmt/mise-complete/AGENTS.mdAGENTS.md
- skills/testing/bdd-testing/AGENTS.mdAGENTS.md
- agents-mdSkill
- cache-auditSkill
- context-radar-auditSkill
- create-contextSkill
- guided-interviewSkill
- handover-document-creatorSkill
- load-contextSkill
- pick-modelSkill
- pinSkill
- professional-honestySkill
- rules-managementSkill
- save-contextSkill
- session-reflectionSkill
- socratic-methodSkill
- vault-captureSkill
- vault-consolidateSkill
- vault-fetchSkill
- vault-searchSkill
- bird-fortune-political-satireSkill
- brooker-esque-media-satireSkill
- clarke-dawe-esqueSkill
- comedy-style-skill-generatorSkill
- cunk-esque-mockumentarySkill
- gervais-esque-cringe-satireSkill
- monty-python-esqueSkill
- pryor-esque-confessional-standupSkill
- rock-esque-observational-standupSkill
- biome-completeSkill
- bun-developmentSkill
- commanderjsSkill
- conventional-commitsSkill
- humanizerSkill
- journal-entry-importSkill
- markdown-authoringSkill
- mermaid-diagramsSkill
- plain-englishSkill
- professional-communicationSkill
- logql-generatorSkill
- mise-completeSkill
- context-indexSkill
- create-context-fileSkill
- follow-upSkill
- goal-trackerSkill
- nasa-pm-lessonsSkill
- plan-createSkill
- plan-executeSkill
- plan-reviewSkill
- risk-registerSkill
- tech-debtSkill
- tech-evaluationSkill
- blast-radiusSkill
- bridgeSkill
- challengeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Every SOP should include these core sections:
- Distinctive: line 52
Use when writing or restructuring a Standard Operating Procedure, or when a procedure is being followed inconsistently and needs a …
- Distinctive: line 80
When: When should you use this SOP?
- Distinctive: line 328
sop-rfc2119: Use RFC 2119 keywords for precise requirements
- Distinctive: line 329
sop-maintenance: Keep SOPs current and relevant
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SOP Structure
Well-structured SOPs follow consistent patterns that make them easy to understand, maintain, and execute. This skill covers the anatomy of effective SOPs and how to organize sections.
Key Concepts
Standard SOP Anatomy
Every SOP should include these core sections:
- Title: Clear, action-oriented description
- Overview: Brief summary of purpose and use cases
- Parameters: Configurable inputs for reusability
- Prerequisites: Required tools, knowledge, or setup
- Steps: Sequential instructions for execution
- Success Criteria: How to verify completion
- Error Handling: What to do when things go wrong
- Related SOPs: Links to related workflows
File Naming Convention
SOP files MUST use the .sop.md extension:
✅ deployment-checklist.sop.md
✅ code-review-security.sop.md
✅ database-migration.sop.md
❌ deployment.md (missing .sop)
❌ checklist.sop.txt (wrong file type)
❌ SOP-Deployment.md (incorrect format)Mindset
An SOP is executed by someone who was not in the room when it was written. Optimise for unambiguous, repeatable execution: every step one concrete action, every prerequisite stated up front. Know when not to write an SOP: a one-off task nobody will repeat does not need one.
When to Use This Skill
Use when writing or restructuring a Standard Operating Procedure, or when a procedure is being followed inconsistently and needs a repeatable structure.
Best Practices
Title Section
# {Action Verb} {Specific Outcome}
Short form: Use kebab-case filename
Long form: Use Title Case headingExamples:
# Generate API Documentation
# Implement Feature Using TDD
# Review Pull Request for SecurityOverview Section
The overview should answer three questions:
- What: What does this SOP accomplish?
- When: When should you use this SOP?
- Why: Why use this approach?
## Overview
This SOP guides you through implementing new features using Test-Driven
Development (TDD). Use this when adding functionality that requires high
confidence in correctness. TDD ensures comprehensive test coverage and
reduces regression risk.Parameters Section
Define all configurable inputs at the beginning:
## Parameters
- **Input Variable**: {variable_name} - Description and example values
- **Configuration**: {config_option} - Available options (option1, option2, option3)
- **Path**: {file_path} - Expected format and constraintsExample:
## Parameters
- **Repository Path**: {repository_path} - Absolute path to git repository
- **Output Format**: {output_format} - Documentation format (markdown, html, pdf)
- **Verbosity**: {verbosity} - Detail level (concise, standard, comprehensive)
- **Include Tests**: {include_tests} - Whether to include test examples (yes, no)Prerequisites Section
List required tools, knowledge, and setup:
## Prerequisites
### Required Tools
- Tool name (version X.X or higher)
- Another tool (version Y.Y or higher)
### Required Knowledge
- Understanding of concept A
- Familiarity with technology B
### Required Setup
- Environment variable {VAR_NAME} must be set
- Configuration file {config.json} must existExample:
## Prerequisites
### Required Tools
- Node.js (v18 or higher)
- npm (v8 or higher)
- Git (v2.30 or higher)
### Required Knowledge
- Understanding of JavaScript/TypeScript
- Familiarity with testing frameworks
- Git workflow basics
### Required Setup
- Package.json exists in project root
- Test framework is installed (Jest, Vitest, or Mocha)
- Git repository is initializedSteps Section
Structure steps hierarchically:
## Steps
1. First major step
- Sub-step or detail
- Another sub-step
- Additional context
2. Second major step
- Implementation detail
- Expected outcome
3. Third major step
- Specific action
- Validation stepWith Validation:
## Steps
1. Analyze codebase structure
- Identify main entry points
- Map directory organization
- List dependencies
- **Validation**: Confirm all entry points are documented
2. Extract patterns
- Identify design patterns
- Document data flow
- Note architectural decisions
- **Validation**: Verify patterns are correctly identified
3. Generate documentation
- Create overview section
- Document public APIs
- Add usage examples
- **Validation**: Ensure documentation builds without errorsSuccess Criteria Section
Define measurable outcomes:
## Success Criteria
- [ ] Specific measurable outcome 1
- [ ] Specific measurable outcome 2
- [ ] Specific measurable outcome 3
- [ ] All tests pass
- [ ] Documentation is completeExample:
## Success Criteria
- [ ] All new code has test coverage ≥ 90%
- [ ] All tests pass without warnings
- [ ] Code passes linter with zero errors
- [ ] Documentation includes usage examples
- [ ] Changes follow existing code patternsError Handling Section
Provide guidance for common failures:
## Error Handling
### Error: {Error Name or Code}
**Symptoms**: How this error manifests
**Cause**: Why this error occurs
**Resolution**:
1. First troubleshooting step
2. Second troubleshooting step
3. Alternative approach if steps failExample:
## Error Handling
### Error: Tests Fail to Run
**Symptoms**: Test runner exits with error code, tests don't execute
**Cause**: Missing dependencies, incorrect test framework configuration, or environment issues
**Resolution**:
1. Verify test framework is installed: `npm list {test-framework}`
2. Check test configuration file exists and is valid
3. Ensure NODE_ENV is set correctly
4. If issue persists, reinstall dependencies: `rm -rf node_modules && npm install`
### Error: Type Errors During Build
**Symptoms**: TypeScript compiler reports type mismatches
**Cause**: Incorrect type annotations or missing type definitions
**Resolution**:
1. Run type checker: `npx -y --package typescript tsc`
2. Review error messages for specific type issues
3. Add necessary type annotations
4. Install missing @types packages if neededRelated SOPs Section
Link to related workflows:
## Related SOPs
- **{sop-name}**: Brief description of when to use this instead
- **{another-sop}**: How this complements the current SOPExample:
## Related SOPs
- **code-review**: Use after completing feature implementation to get peer review
- **deployment-checklist**: Use after code review passes to deploy changes
- **rollback-procedure**: Use if deployment fails or issues are discoveredAnti-Patterns
Avoid These Structure Mistakes:
- Missing Parameters
- ❌ Hard-coding values in steps
- ✅ Define parameters at the beginning
- Unclear Prerequisites
- ❌ Assuming tools are installed
- ✅ Explicitly list required tools and versions
- Vague Success Criteria
- ❌ "Code should be good quality"
- ✅ "Code passes linter with 0 errors and has test coverage ≥ 80%"
- No Error Handling
- ❌ Only describing happy path
- ✅ Including common failures and resolutions
- Poor Section Organization
- ❌ Steps before parameters, success criteria mixed with steps
- ✅ Consistent section order: Overview → Parameters → Prerequisites → Steps → Success Criteria → Error Handling
References
- SOP Templates and Examples - complete worked SOP example plus reusable code-analysis and implementation templates.
Related Skills
- sop-authoring: Learn to write clear, actionable instructions
- sop-rfc2119: Use RFC 2119 keywords for precise requirements
- sop-maintenance: Keep SOPs current and relevant
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.

