---
name: sop-template-generator
description: "Generate standardized SOP (Standard Operating Procedure) document templates with customizable sections, workflows, and quality checklists. Use this skill when users need to create SOP templates, design SOP frameworks, or establish standardized documentation systems for their organization."
version: 1.0.0
internal: true
triggers:
 - sop
 - standard operating procedure
 - 标准作业程序
 - 操作规程
 - 作业指导书
 - sop模板
 - sop framework
keywords:
 - SOP
 - 标准作业程序
 - 操作规程
 - 作业指导书
 - 流程文档
 - 标准化文档
 - template
 - 模板
 - framework
 - 框架
 - workflow
 - 工作流
 - checklist
 - 检查清单
 - quality
 - 质量
 - compliance
 - 合规
---

# SOP Template Generator Skill

## Overview

This skill helps users generate professional SOP (Standard Operating Procedure) templates that follow industry best practices. SOPs are critical documents that standardize processes, ensure quality, and facilitate training.

## When to Use This Skill

Use this skill when the user needs to:
- Create a new SOP template for their organization
- Design a standardized SOP framework
- Establish a SOP documentation system
- Generate templates for specific business processes
- Create checklists and quality gates for SOPs

## SOP Template Structure

A professional SOP template should include the following sections:

### 1. Document Control Section
```markdown
# [Process Name] SOP

| Field | Value |
|-------|-------|
| Document ID | SOP-[DEPT]-[NNN] |
| Version | 1.0 |
| Effective Date | YYYY-MM-DD |
| Review Date | YYYY-MM-DD |
| Owner | [Name/Title] |
| Approved By | [Name/Title] |
| Classification | Internal / Confidential |
```

### 2. Purpose & Scope
```markdown
## 1. Purpose
[Brief statement of why this SOP exists and what it aims to achieve]

## 2. Scope
- **Applies to**: [Departments/Roles/Processes covered]
- **Excludes**: [What is NOT covered]
- **Effective Period**: [Start date to end date or "until superseded"]
```

### 3. Definitions & References
```markdown
## 3. Definitions
| Term | Definition |
|------|-----------|
| [Term] | [Clear definition] |

## 4. References
- [Related documents, regulations, or standards]
- [Upstream/downstream process documents]
```

### 4. Responsibilities
```markdown
## 5. Roles & Responsibilities

| Role | Responsibility |
|------|---------------|
| [Role 1] | [Specific responsibilities] |
| [Role 2] | [Specific responsibilities] |
| [Role 3] | [Specific responsibilities] |
```

### 5. Procedure Section
```markdown
## 6. Procedure

### 6.1 Overview
[High-level process flow description]

### 6.2 Step-by-Step Instructions

#### Step 1: [Action Name]
- **Responsible**: [Role]
- **Input**: [Required inputs]
- **Actions**:
 1. [Detailed action]
 2. [Detailed action]
- **Output**: [Expected output]
- **Quality Check**: [Verification criteria]

#### Step 2: [Action Name]
[Repeat structure]

### 6.3 Exceptions & Escalation
| Scenario | Action | Escalate To |
|----------|--------|-------------|
| [Exception 1] | [How to handle] | [Who to contact] |
| [Exception 2] | [How to handle] | [Who to contact] |
```

### 6. Quality & Compliance
```markdown
## 7. Quality Standards
- [Quality metric 1]: [Standard]
- [Quality metric 2]: [Standard]

## 8. Compliance Requirements
- [Regulation/Standard 1]: [Requirement]
- [Regulation/Standard 2]: [Requirement]

## 9. Audit & Review
- **Review Frequency**: [Quarterly/Annually/etc.]
- **Audit Method**: [How compliance is verified]
- **Revision Process**: [How changes are made]
```

### 7. Attachments
```markdown
## 10. Attachments
- [ ] Checklist: [Name]
- [ ] Form: [Name]
- [ ] Flowchart: [Name]
- [ ] Other: [Name]
```

## SOP Template Generation Process

### Step 1: Understand Requirements
Ask the user for:
- What process needs to be documented?
- Who is the target audience?
- What industry/regulations apply?
- Are there existing templates to follow?
- What level of detail is needed?

### Step 2: Design Template Structure
Based on requirements, customize:
- Which sections are needed?
- What level of detail for each section?
- What format works best (table, list, narrative)?

### Step 3: Generate Template
Create the template with:
- Clear section headers
- Placeholder text with examples
- Instructions for filling each section
- Quality checkpoints

### Step 4: Add Supporting Elements
Include:
- Version control table
- Approval signatures section
- Related document links
- Revision history template

## Output Format

Generate the SOP template in Markdown format with:
1. Clear hierarchy (H1 → H2 → H3)
2. Tables for structured data
3. Checklists for action items
4. Placeholders marked with `[brackets]`
5. Examples in italics or quotes

## Quality Checklist for SOP Templates

Before delivering, verify:
- [ ] Document control section is complete
- [ ] Purpose is clearly stated
- [ ] Scope is well-defined
- [ ] Roles are clearly assigned
- [ ] Steps are sequential and complete
- [ ] Quality standards are measurable
- [ ] Exception handling is documented
- [ ] Review process is defined
- [ ] Attachments are listed
- [ ] Template is customizable

## Common SOP Types

### 1. Operational SOP
- Focus: Day-to-day operations
- Audience: Front-line staff
- Detail: High (step-by-step)

### 2. Administrative SOP
- Focus: Business processes
- Audience: Management/Admin
- Detail: Medium (process-level)

### 3. Technical SOP
- Focus: Technical procedures
- Audience: Technical staff
- Detail: High (technical specs)

### 4. Safety SOP
- Focus: Safety procedures
- Audience: All employees
- Detail: High (critical steps)

## Best Practices

1. **Use Active Voice**: "Press the button" not "The button should be pressed"
2. **Be Specific**: Include exact values, times, quantities
3. **One Action Per Step**: Don't combine multiple actions
4. **Include Visuals**: Reference flowcharts, screenshots, diagrams
5. **Test the SOP**: Have someone follow it to verify clarity
6. **Version Control**: Track all changes with dates and reasons
7. **Regular Review**: Schedule periodic reviews to keep current

## Examples

### Example: Customer Service SOP Template
```markdown
# Customer Complaint Handling SOP

## Document Control
| Field | Value |
|-------|-------|
| Document ID | SOP-CS-001 |
| Version | 1.0 |

## Purpose
Standardize the process for handling customer complaints to ensure consistent, timely resolution and customer satisfaction.

## Scope
- Applies to: Customer Service Team, Support Team
- Covers: All customer complaints received via phone, email, chat

## Procedure
### Step 1: Acknowledge Complaint (within 1 hour)
- Log complaint in CRM system
- Send acknowledgment to customer
- Assign priority level (High/Medium/Low)

### Step 2: Investigate (within 24 hours)
- Gather relevant information
- Interview involved parties
- Identify root cause

### Step 3: Resolve (within 48 hours)
- Propose solution to customer
- Implement approved solution
- Document resolution

## Quality Standards
- Response time: < 1 hour
- Resolution time: < 48 hours
- Customer satisfaction: > 90%
```

## Related Resources

- ISO 9001:2015 Quality Management Systems
- ITIL Service Operation procedures
- Six Sigma process documentation standards

# 🆕 V2.0 缺陷修复增强约束（MG-01 对齐）

> 以下约束与 sop-generation-rules 的 C-01~C-08 防御指令对齐。
> 当此 skill 被 MG-01 SOP编排专家调用时，必须遵循以下增强规则。

## V2.0-1 角色章节必须包含外部角色（对齐 C-01）

§5 Roles & Responsibilities 必须包含两个子章节：

```markdown
## 5. Roles & Responsibilities

### 5.1 Internal Roles
| Role Code | Role Name | Department | Type |
|:----------|:----------|:-----------|:-----|
| {CODE} | {Name} | {Dept} | 执行/支持/管理/审批 |

### 5.2 External Roles
| Role Code | Role Name | Organization Type | Responsibilities | Interfaces |
|:----------|:----------|:------------------|:-----------------|:-----------|
| EXT-01 | 客户（甲方） | 医药企业 / 医疗机构 | 需求提出方、验收方 | {Internal Roles} |
| EXT-02 | 合作伙伴 | CRO / CDMO / 技术合作方 | 联合交付方 | {Internal Roles} |
| EXT-03 | 监管机构 | NMPA / 卫健委 | 合规监督方 | {Internal Roles} |
```

## V2.0-2 例外场景必须含量化触发条件（对齐 C-05）

§6.3 Exceptions & Escalation 必须使用 8 字段格式：

```markdown
### 6.3 Exceptions & Escalation

#### EX-{NNN}: {Exception Name}
| Field | Content |
|:------|:--------|
| Exception ID | EX-{NNN} |
| Trigger Condition | {Metric} {Operator} {Value}（如 "折扣率 > 15%"） |
| Auto-Trigger Rule | 工作流规则：`{metric} {op} {threshold}` → 自动创建审批任务 |
| Handling Steps | ① {Step1} ② {Step2} ③ {Step3} |
| Escalation Path | 当 {condition} → 升级至 {Role Code} |
| Recovery Condition | {恢复判据} |
| Responsible | {Role Code} |
```

## V2.0-3 步骤卡片角色完整性（对齐 C-07）

每个步骤的 Responsible 和 Collaborator 字段不可为空：

```markdown
#### Step N: {Action Name}
- **Responsible**: {Role Code}（必填，≥1 个）
- **Collaborator**: {Role Code}（必填，≥1 个；无协作者时填"无"并说明原因）
- **Input**: [Required inputs]
- **Actions**:
 ① {Sub-step 1, ≤200字}（操作指引 >500 字时必须拆分为 ①②③ 编号子步骤，对齐 C-06）
 ② {Sub-step 2, ≤200字}
 ③ {Sub-step 3, ≤200字}
- **Output**: [Expected output]
```

## V2.0-4 模板引用三段式格式（对齐 C-03）

引用表单/模板时使用三段式格式：

```markdown
<!-- 首次引用 -->
填写《HY-G-{流程代码}-TMP-{NNN} {模板名称}》...

<!-- 后续引用 -->
将结果记录到 TMP-{NNN} 中...
```

## V2.0-5 质量检查清单增强（对齐 C-08）

Before delivering, verify (V2.0 enhanced):
- [ ] Document control section is complete
- [ ] Purpose is clearly stated
- [ ] Scope is well-defined
- [ ] Roles are clearly assigned
- [ ] **🆕 External roles (EXT-01~03) defined in §5.2
- [ ] Steps are sequential and complete
- [ ] **🆕 Step cards have both Responsible AND Collaborator (non-empty)
- [ ] **🆕 Operation actions >500 chars are decomposed into ①②③
- [ ] Quality standards are measurable
- [ ] **🆕 Exception triggers have quantitative thresholds
- [ ] **🆕 Exception handling uses 8-field format
- [ ] **🆕 Template references use three-part format
- [ ] **🆕 §9.2 template versions match physical file titles (CV-1)
- [ ] **🆕 §7 template names match §9.2 template names (CV-2)
- [ ] Review process is defined
- [ ] Attachments are listed
- [ ] Template is customizable
