关于 write-standard-operating-procedure
write-standard-operating-procedure 是一项用于编写 GxP 合规标准操作规程(SOP)的技能,面向受监管活动的流程负责人和文档编写者。它以文档控制、职责分配、逐步操作说明及审批流程组织内容,强调可审计性。
主要功能
- 01设置文档控制信息
- 02撰写目的、范围与术语
- 03明确角色和职责
- 04编写逐步操作流程
- 05补充引用、附件与修订记录
- 06安排审查和批准
适用场景
- 01为经过验证的系统建立 SOP
- 02将非正式流程整理为正式规程
- 03响应审计中发现的规程缺失
- 04根据变更控制更新 SOP
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ pjt222/ agent-almanac --skill write-standard-operating-procedure安装后在 Claude Code 中输入/write-standard-operating-procedure确认已加载。
详细介绍
编写标准操作规程
创建符合 GxP 要求的标准操作规程,为受监管活动提供清晰、可审计的说明。
适用情形
- 新验证的系统需要操作规程
- 现有规程需要正式整理为 SOP 格式
- 审计发现指出缺少规程或规程不充分
- 变更控制要求更新 SOP
- 定期审查发现规程内容已过时
输入
- 必需:SOP 涵盖的流程或系统
- 必需:法规背景(GMP、GLP、GCP、21 CFR Part 11、EU Annex 11)
- 必需:目标受众(将遵循此 SOP 的角色)
- 可选:现有的非正式规程、工作说明或培训材料
- 可选:与此规程衔接的相关 SOP
- 可选:促使创建 SOP 的审计发现或法规观察项
程序
步骤 1:分配文档控制元数据
# Standard Operating Procedure
## Document ID: SOP-[DEPT]-[NNN]
## Title: [Descriptive Title of the Procedure]
| Field | Value |
|-------|-------|
| Document ID | SOP-[DEPT]-[NNN] |
| Version | 1.0 |
| Effective Date | [YYYY-MM-DD] |
| Review Date | [YYYY-MM-DD + review period] |
| Department | [Department name] |
| Author | [Name, Title] |
| Reviewer | [Name, Title] |
| Approver | [Name, Title] |
| Classification | [GxP-Critical / GxP-Supporting] |
| Supersedes | [Previous SOP ID or "N/A — New"] |
**预期结果:**每份 SOP 都有唯一 ID,并遵循组织的文档编号规范。 **未达预期时:**如果尚无编号规范,请先建立一套规范,再继续:[TYPE]-[DEPT]-[3-digit sequential]。
步骤 2:编写目的和范围
### 1. Purpose
This SOP defines the procedure for [specific activity] to ensure [regulatory objective].
### 2. Scope
**In scope:**
- [System, process, or activity covered]
- [Applicable departments or roles]
- [Specific regulatory requirements addressed]
**Out of scope:**
- [Related activities covered by other SOPs — reference them]
- [Systems or departments not covered]
**预期结果:**目的部分为一至两句话。范围部分清楚界定边界。 **未达预期时:**如果范围与现有 SOP 重叠,请在重叠部分引用现有 SOP,或修订两份 SOP 以消除重叠。
步骤 3:定义术语和缩写
### 3. Definitions and Abbreviations
| Term | Definition |
|------|-----------|
| ALCOA+ | Attributable, Legible, Contemporaneous, Original, Accurate + Complete, Consistent, Enduring, Available |
| CCB | Change Control Board |
| GxP | Good [Manufacturing/Laboratory/Clinical] Practice — umbrella for all regulated quality standards |
| SOP | Standard Operating Procedure |
| [Add terms specific to this SOP] | [Definition] |
**预期结果:**SOP 中使用的每个缩写和技术术语都有定义。 **未达预期时:**如果术语含义模糊或属于特定领域,请查阅组织的术语表或相关法规指南,以获取权威定义。
步骤 4:分配职责
### 4. Responsibilities
| Role | Responsibilities |
|------|-----------------|
| System Owner | Ensure SOP compliance, approve changes, conduct periodic review |
| System Administrator | Execute daily operations per this SOP, report deviations |
| Quality Assurance | Review SOP for regulatory compliance, approve new versions |
| End Users | Follow procedures as written, report issues to system administrator |
| Training Coordinator | Ensure all affected personnel are trained before SOP effective date |
**预期结果:**程序部分中的每项操作都可追溯至负责角色。 **未达预期时:**如果某个程序步骤未分配角色,则该职责无人负责。请在 SOP 获批前指定负责人。
步骤 5:编写程序部分
这是 SOP 的核心。请编写逐步说明:
### 5. Procedure
#### 5.1 [First Major Activity]
1. [Action verb] [specific instruction]. Reference: [form, system screen, tool].
2. [Action verb] [specific instruction].
- If [condition], then [action].
- If [alternative condition], then [alternative action].
3. [Action verb] [specific instruction].
4. Record the result in [form/system/log].
#### 5.2 [Second Major Activity]
1. [Action verb] [specific instruction].
2. Verify [specific criterion].
3. If verification fails, initiate [deviation procedure — reference SOP-XXX].
#### 5.3 Deviation Handling
1. If any step cannot be performed as written, STOP and document the deviation.
2. Notify [role] within [timeframe].
3. Complete Deviation Form [form reference].
4. Do not proceed until [role] provides disposition.
GxP SOP 的编写规则:
- 每个步骤都以动作动词开头(核实、记录、输入、批准、通知)
- 具体到受过培训的操作人员无需自行解释即可遵循
- 列出决策点,并为每条路径明确判定标准
- 引用准确的表单名称、系统界面或工具标识符
- 设置暂停点,在等待批准或核实期间必须停止工作
**预期结果:**不熟悉特定流程的受训人员也能正确遵循这些步骤。 **未达预期时:**如果主题专家认为规程含糊,请补充细节或将步骤拆分为子步骤。SOP 含糊是反复出现的审计发现。
步骤 6:添加参考文档、附件和修订历史
### 6. References
| Document ID | Title |
|-------------|-------|
| SOP-QA-001 | Document Control |
| SOP-IT-015 | User Access Management |
| [Regulation reference] | [e.g., 21 CFR Part 11] |
### 7. Attachments
| Attachment | Description |
|-----------|-------------|
| Form-001 | [Form name and purpose] |
| Template-001 | [Template name and purpose] |
### 8. Revision History
| Version | Date | Author | Change Description |
|---------|------|--------|--------------------|
| 1.0 | [Date] | [Name] | Initial release |
**预期结果:**用户可以访问所有引用的文档,且修订历史从版本 1.0 开始。 **未达预期时:**如果引用的文档尚不存在,请创建这些文档,或删除相关引用,并在 SOP 审查中记录这一缺口。
步骤 7:提交审查和批准
### Approval Signatures
| Role | Name | Signature | Date |
|------|------|-----------|------|
| Author | [Name] | | |
| Technical Reviewer | [Name] | | |
| QA Reviewer | [Name] | | |
| Approver (Department Head) | [Name] | | |
### Training Requirement
All personnel listed in Section 4 must complete training on this SOP before the effective date. Training must be documented in the training management system.
### Periodic Review
This SOP must be reviewed at least every [2 years / annually] or when triggered by:
- Change control affecting the covered process or system
- Audit finding related to the covered process
- Regulatory guidance update affecting the covered requirements
**预期结果:**SOP 经主题专家审查并由质量部门批准后,方可生效。 **未达预期时:**如果审批工作流延迟,必须推迟生效日期。未完成审批的 SOP 不得生效。
验证清单
- 文档 ID 遵循组织的编号规则
- 目的具体且简洁(1–2 句话)
- 范围明确界定适用和不适用的边界
- 所有缩写和技术术语均已定义
- 职责部分中的每个角色都对应到程序步骤
- 程序步骤以行动动词开头,且具体到无需解释即可执行
- 决策点为每种路径都规定了明确的标准
- 已明确偏差处理方式
- 所有引用的文档均存在且可访问
- 修订历史从版本 1.0 起完整记录
- 批准签名包括作者、审核人和批准人
- 已明确规定定期审核计划
常见问题
- 过于笼统:“确保数据质量”不是程序步骤。“根据附录 A,核实 Form-001 中的全部 15 个字段均已填写且数值在范围内”才是。
- 过于详细:为每种可能的错误都加入故障排除内容,会让 SOP 难以阅读。复杂的故障排除应引用单独的作业指导书。
- 未规定偏差处理:每份 SOP 都必须说明无法按书面规定执行程序时应采取的措施。对偏差保持沉默,意味着不存在偏差的可能。
- 培训前生效:SOP 在所有用户完成培训前就生效,会立即造成合规缺口。
- 无人维护的 SOP:从未审核的 SOP 会过时且不再可靠。应设定审核日期,并在文件控制系统中跟踪。
相关技能
design-compliance-architecture— 确定哪些系统和流程需要 SOPmanage-change-control— 在流程变更时触发 SOP 更新design-training-program— 确保用户接受新 SOP 和更新后 SOP 的培训conduct-gxp-audit— 审计会评估 SOP 的充分性和遵循情况write-validation-documentation— SOP 和验证文档共用审批工作流