Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Document control for medical device QMS, covering numbering, version control, change management, and 21 CFR Part 11 compliance. Use for document control procedures, change control workflows, and electronic signature compliance.
.claude/skills/borghei-quality-documentation-manager/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-12 | ✗→✓ | ▲ Improved | 295% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 559% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 300% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 204% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 212% | 0% |
Document control system design and management for ISO 13485-compliant quality management systems, including numbering conventions, approval workflows, change control, and electronic record compliance.
Before setting up document control or validating a document, confirm these inputs. If any is unknown or vague, ASK — do not assume:
Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the document.
Implement document control from creation through obsolescence:
| Stage | Definition | Actions Required | |-------|------------|------------------| | Draft | Under creation or revision | Author editing, not for use | | Review | Circulated for review | Reviewers provide feedback | | Approved | All signatures obtained | Ready for training/distribution | | Effective | Training complete, released | Available for use | | Superseded | Replaced by newer revision | Remove from active use | | Obsolete | No longer applicable | Archive per retention schedule |
| Prefix | Document Type | Typical Content | |--------|---------------|-----------------| | QM | Quality Manual | QMS overview, scope, policy | | SOP | Standard Operating Procedure | Process-level procedures | | WI | Work Instruction | Task-level step-by-step | | TF | Template/Form | Controlled forms | | SPEC | Specification | Product/process specs | | PLN | Plan | Quality/project plans |
| Document Type | Required Reviewers | Required Approvers | |---------------|-------------------|-------------------| | SOP | Process Owner, QA | QA Manager, Process Owner | | WI | Area Supervisor, QA | Area Manager | | SPEC | Engineering, QA | Engineering Manager, QA | | TF | Process Owner | QA | | Design Documents | Design Team, QA | Design Control Authority |
Assign consistent document numbers for identification and retrieval.
Standard format: PREFIX-CATEGORY-SEQUENCE[-REVISION]
Example: SOP-02-001-A
SOP = Document type (Standard Operating Procedure)
02 = Category code (Document Control)
001 = Sequential number
A = Revision indicator| Code | Functional Area | Description | |------|-----------------|-------------| | 01 | Quality Management | QMS procedures, management review | | 02 | Document Control | This area | | 03 | Human Resources | Training, competency | | 04 | Design & Development | Design control processes | | 05 | Purchasing | Supplier management | | 06 | Production | Manufacturing procedures | | 07 | Quality Control | Inspection, testing | | 08 | CAPA | Corrective/preventive actions | | 09 | Risk Management | ISO 14971 processes | | 10 | Regulatory Affairs | Submissions, compliance |
| Change Type | Revision Increment | Example | |-------------|-------------------|---------| | Major revision | Increment number | Rev 01 → Rev 02 | | Minor revision | Increment sub-revision | Rev 01 → Rev 01.1 | | Administrative | No change or letter suffix | Rev 01 → Rev 01a |
See references/document-control-procedures.md for complete numbering guidance.
Obtain required reviews and approvals before document release.
| Disposition | Action Required | |-------------|-----------------| | Accept | Incorporate comment as written | | Accept with modification | Incorporate with changes, document rationale | | Reject | Do not incorporate, document justification | | Defer | Address in future revision, document reason |
Document Level 1 (Policy/QM): CEO or delegate + QA Manager
Document Level 2 (SOP): Department Manager + QA Manager
Document Level 3 (WI/TF): Area Supervisor + QA Representative| Element | Requirement | |---------|-------------| | Name | Printed name of signer | | Signature | Handwritten or electronic signature | | Date | Date signature applied | | Role | Function/role of signer |
Manage document changes systematically through review and approval.
| Class | Definition | Approval Level | Examples | |-------|------------|----------------|----------| | Administrative | No content impact | Document Control | Typos, formatting | | Minor | Limited content change | Process Owner + QA | Clarifications | | Major | Significant content change | Full review cycle | New requirements | | Emergency | Urgent safety/compliance | Expedited + retrospective | Safety issues |
| Impact Area | Assessment Questions | |-------------|---------------------| | Training | Does change require retraining? | | Equipment | Does change affect equipment or systems? | | Validation | Does change require revalidation? | | Regulatory | Does change affect regulatory filings? | | Other Documents | Which related documents need updating? | | Records | What records are affected? |
Each document must include change history:
| Revision | Date | Description | Author | Approver |
|----------|------|-------------|--------|----------|
| 01 | 2023-01-15 | Initial release | J. Smith | M. Jones |
| 02 | 2024-03-01 | Updated workflow | J. Smith | M. Jones |Implement electronic record and signature controls for FDA compliance.
| Applies To | Does Not Apply To | |------------|-------------------| | Records required by FDA regulations | Paper records | | Records submitted to FDA | Internal non-regulated documents | | Electronic signatures on required records | General email communication |
| Requirement | Implementation | |-------------|----------------| | Secure | Cannot be modified by users | | Computer-generated | System creates automatically | | Time-stamped | Date and time of each action | | Original values | Previous values retained | | User identity | Who made each change |
| Requirement | Implementation | |-------------|----------------| | Unique to individual | Not shared between persons | | At least 2 components | User ID + password minimum | | Signature manifestation | Name, date/time, meaning displayed | | Linked to record | Cannot be excised or copied |
Every electronic signature must display:
| Element | Example | |---------|---------| | Printed name | John Smith | | Date and time | 2024-03-15 14:32:05 EST | | Meaning | Approved for Release |
Access Controls:
Audit Trail:
Security:
See references/21cfr11-compliance-guide.md for detailed compliance requirements.
references/document-control-procedures.md contains:
references/21cfr11-compliance-guide.md contains:
bash# Validate document metadata python scripts/document_validator.py --doc document.json # Interactive validation mode python scripts/document_validator.py --interactive # JSON output for integration python scripts/document_validator.py --doc document.json --output json # Generate sample document JSON python scripts/document_validator.py --sample > sample_doc.json
Validates:
json{ "number": "SOP-02-001", "title": "Document Control Procedure", "doc_type": "SOP", "revision": "03", "status": "Effective", "effective_date": "2024-01-15", "review_date": "2025-01-15", "author": "J. Smith", "approver": "M. Jones", "change_history": [ {"revision": "01", "date": "2022-01-01", "description": "Initial release"}, {"revision": "02", "date": "2023-01-15", "description": "Updated workflow"}, {"revision": "03", "date": "2024-01-15", "description": "Added e-signature requirements"} ], "has_audit_trail": true, "has_electronic_signature": true, "signature_components": 2 }
Track document control system performance.
| Metric | Target | Calculation | |--------|--------|-------------| | Document cycle time | <30 days | Average days from draft to effective | | Review completion rate | >95% | Reviews completed on time / Total reviews | | Change request backlog | <10 | Open change requests at month end | | Overdue review rate | <5% | Documents past review date / Total effective | | Audit finding rate | <2 per audit | Document control findings per internal audit |
| Document Type | Review Frequency | |---------------|------------------| | Policy | Every 3 years | | SOP | Every 2 years | | WI | Every 2 years | | Specifications | As needed or with product changes | | Forms/Templates | Every 3 years |
| Sub-clause | Requirement | |------------|-------------| | 4.2.1 | Quality management system documentation | | 4.2.2 | Quality manual | | 4.2.3 | Medical device file (technical documentation) | | 4.2.4 | Control of documents | | 4.2.5 | Control of records |
| Section | Requirement | |---------|-------------| | 820.40 | Document controls | | 820.180 | General record requirements | | 820.181 | Device master record | | 820.184 | Device history record | | 820.186 | Quality system record |
| Finding | Prevention | |---------|------------| | Obsolete documents in use | Implement distribution control | | Missing approval signatures | Enforce workflow before release | | Incomplete change history | Require history update with each revision | | No periodic review schedule | Establish and enforce review calendar | | Inadequate audit trail | Validate DMS for Part 11 compliance |
| Problem | Likely Cause | Resolution | |---------|-------------|------------| | Document validator reports "invalid numbering format" | Document number does not match the PREFIX-CATEGORY-SEQUENCE pattern | Ensure the number follows the format SOP-02-001 (type prefix, 2-digit category code, 3-digit sequence). Check that the prefix matches a recognized document type (QM, SOP, WI, TF, SPEC, PLN). | | Validation flags missing approver despite having signatures | approver field is null or empty in the input JSON | Populate the approver field with the name of the approving authority. For SOPs, both Process Owner and QA Manager are required. | | Review date validation fails for a current document | review_date is in the past | Update the review date to reflect the next scheduled review. Documents past their review date should be flagged for periodic review and re-approval. | | Change history marked incomplete | Not all revisions have entries in the change_history array | Every revision increment must have a corresponding change history entry with revision number, date, description, and author. Fill gaps in the history. | | Part 11 controls flagged despite using an eDMS | has_audit_trail or has_electronic_signature set to false | Set both to true and ensure signature_components is at least 2 (user ID + password minimum per Part 11). Verify the eDMS produces computer-generated, timestamped audit trails. | | Interactive mode does not display all validation rules | Terminal width too narrow for table output | Widen the terminal window or use --output json for structured output that is not affected by display width. | | Obsolete documents still appearing as "Effective" | Status field not updated during revision cycle | When a new revision is released, update the prior revision's status to "Superseded" and ensure it is removed from points of use. Run the validator against the superseded document to confirm. |
In Scope:
Out of Scope:
| Skill | Integration | |-------|------------| | quality-manager-qms-iso13485 | Document control (Clause 4.2.3) and record control (Clause 4.2.4) are core QMS processes; the validator enforces ISO 13485 documentation requirements | | qms-audit-expert | Internal audits of Clause 4.2 verify document control effectiveness; audit findings drive document process improvements | | quality-manager-qmr | Document control metrics (cycle time, overdue reviews, backlog) are reported to management review as QMS performance indicators | | fda-consultant-specialist | FDA QMSR (effective Feb 2026) incorporates ISO 13485 Clause 4.2 by reference; Part 11 compliance remains a separate FDA requirement for electronic records | | capa-officer | CAPA actions frequently require document revisions; the change control process tracks CAPA-driven document changes |
Validates document metadata, numbering conventions, and regulatory control requirements.
| Flag | Required | Description | |------|----------|-------------| | --doc | Yes (or --interactive or --sample) | Path to document metadata JSON file containing number, title, type, revision, status, dates, approvers, change history, and Part 11 fields | | --interactive | No | Launch interactive validation mode for guided document entry | | --output | No | Output format: json for structured output with severity-rated findings, omit for human-readable text | | --sample | No | Generate a sample document JSON template (pipe to file with > sample_doc.json) |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | pass→pass | 15,728 | 17,291 | +10% | 1 | 1 | 0% | 2,619 | 7,419 | +183% | 0 | 0 | — |
case-11 | pass→pass | 13,466 | 12,587 | -7% | 1 | 1 | 0% | 2,130 | 6,619 | +211% | 0 | 0 | — |
case-12 | fail→pass | 7,466 | 2,822 | -62% | 1 | 1 | 0% | 1,282 | 5,062 | +295% | 0 | 0 | — |
case-01 | fail→fail | 21,041 | 24,517 | +17% | 1 | 1 | 0% | 3,639 | 8,871 | +144% | 0 | 0 | — |
case-02 | fail→pass | 6,030 | 12,020 | +99% | 1 | 1 | 0% | 1,028 | 6,770 | +559% | 0 | 0 | — |
case-03 | fail→fail | 25,979 | 29,043 | +12% | 1 | 1 | 0% | 4,376 | 9,656 | +121% | 0 | 0 | — |
case-04 | pass→pass | 7,299 | 7,961 | +9% | 1 | 1 | 0% | 1,299 | 5,966 | +359% | 0 | 0 | — |
case-05 | fail→pass | 8,454 | 9,995 | +18% | 1 | 1 | 0% | 1,616 | 6,457 | +300% | 0 | 0 | — |
case-07 | pass→pass | 10,609 | 15,872 | +50% | 1 | 1 | 0% | 1,714 | 7,312 | +327% | 0 | 0 | — |
case-08 | pass→pass | 12,456 | 15,875 | +27% | 1 | 1 | 0% | 2,064 | 7,439 | +260% | 0 | 0 | — |
case-09 | fail→fail | 10,802 | 10,626 | -2% | 1 | 1 | 0% | 1,854 | 6,328 | +241% | 0 | 0 | — |
case-10 | fail→pass | 12,826 | 11,287 | -12% | 1 | 1 | 0% | 2,148 | 6,525 | +204% | 0 | 0 | — |
case-13 | fail→pass | 10,882 | 3,363 | -69% | 1 | 1 | 0% | 1,664 | 5,194 | +212% | 0 | 0 | — |
case-14 | pass→pass | 14,441 | 10,543 | -27% | 1 | 1 | 0% | 2,173 | 6,291 | +190% | 0 | 0 | — |
case-15 | pass→pass | 14,370 | 13,404 | -7% | 1 | 1 | 0% | 2,471 | 6,708 | +171% | 0 | 0 | — |
case-16 | pass→pass | 16,491 | 18,744 | +14% | 1 | 1 | 0% | 2,934 | 7,690 | +162% | 0 | 0 | — |
case-17 | pass→pass | 9,040 | 9,801 | +8% | 1 | 1 | 0% | 1,597 | 6,065 | +280% | 0 | 0 | — |
case-18 | fail→pass | 7,432 | 4,876 | -34% | 1 | 1 | 0% | 1,251 | 5,443 | +335% | 0 | 0 | — |
case-19 | fail→pass | 13,491 | 14,339 | +6% | 1 | 1 | 0% | 2,145 | 6,987 | +226% | 0 | 0 | — |
case-20 | fail→fail | 21,575 | 27,164 | +26% | 1 | 1 | 0% | 3,575 | 8,959 | +151% | 0 | 0 | — |
case-21 | fail→fail | 31,303 | 30,017 | -4% | 1 | 1 | 0% | 5,017 | 9,644 | +92% | 0 | 0 | — |
case-22 | fail→fail | 19,247 | 25,743 | +34% | 1 | 1 | 0% | 3,483 | 9,464 | +172% | 0 | 0 | — |
case-23 | fail→fail | 21,735 | 25,048 | +15% | 1 | 1 | 0% | 4,136 | 9,349 | +126% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +30 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.