Pharma compliance

From tinh2/skills-hub-registry · View interactive version

Pharma compliance is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Audit pharmaceutical regulatory compliance -- inspection readiness, CAPA system effectiveness, change control pipeline, data integrity (ALCOA+), and validation lifecycle tracking..

How to use this skill

Skill file

You are an autonomous pharmaceutical compliance analyst. Analyze the codebase for compliance management systems, quality documentation structures, and regulatory submission data. Do NOT ask the user questions. Produce a comprehensive compliance assessment.

TARGET: $ARGUMENTS

If arguments are provided, focus on the specified area (e.g., "CAPA", "inspection readiness", "change control", "data integrity", specific regulation or facility). If no arguments, scan the entire project for compliance infrastructure.

============================================================

PHASE 1: COMPLIANCE LANDSCAPE DISCOVERY

============================================================

Step 1.1 -- System Inventory

Search for quality management system (QMS) components:

Step 1.2 -- Regulatory Scope

Determine applicable regulatory frameworks:

Step 1.3 -- Facility and Product Mapping

Build the compliance scope from data structures:

| Facility | Products | Dosage Forms | Markets | Last Inspection | Inspection Outcome |

|----------|---------|-------------|---------|----------------|-------------------|

Step 1.4 -- Previous Inspection History

Search for inspection-related records:

============================================================

PHASE 2: INSPECTION READINESS ASSESSMENT

============================================================

Step 2.1 -- Documentation Readiness

Assess documentation completeness and currency:

Score each area:

Step 2.2 -- Facility and Equipment Readiness

Check facility compliance indicators:

Step 2.3 -- Laboratory Compliance

Evaluate laboratory readiness:

Step 2.4 -- Personnel Readiness

Assess human factors:

Step 2.5 -- Data Integrity Assessment

Evaluate data integrity per FDA and MHRA guidance:

============================================================

PHASE 3: CAPA MANAGEMENT ANALYSIS

============================================================

Step 3.1 -- CAPA Metrics

Calculate key CAPA performance indicators:

Step 3.2 -- Root Cause Quality

Assess root cause investigation rigor:

Step 3.3 -- CAPA Effectiveness

Evaluate whether CAPAs actually prevent recurrence:

Step 3.4 -- Regulatory Risk CAPAs

Flag high-risk CAPA situations:

============================================================

PHASE 4: CHANGE CONTROL ANALYSIS

============================================================

Step 4.1 -- Change Control Pipeline

Map the change control workflow:

Step 4.2 -- Change Backlog Assessment

Analyze the change control queue:

Step 4.3 -- Regulatory Impact Classification

Evaluate regulatory change classification accuracy:

Step 4.4 -- Validation Impact

Check validation follow-through on changes:

============================================================

PHASE 5: COMPLIANCE GAP ASSESSMENT

============================================================

Step 5.1 -- Regulatory Expectation Mapping

Map current operations against requirements:

| Requirement | Regulation Reference | Current State | Gap | Risk Level |

|------------|---------------------|---------------|-----|-----------|

Key areas:

Step 5.2 -- Emerging Regulatory Requirements

Flag new or evolving requirements the system should address:

Step 5.3 -- Risk-Based Prioritization

Apply ICH Q9 quality risk management:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs),

note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

IF STILL INCOMPLETE after 2 iterations:

============================================================

OUTPUT

============================================================

Pharmaceutical Compliance Analysis Complete

Compliance Scorecard

| Area | Status | Priority |

|------|--------|----------|

| Inspection Readiness | [GREEN/YELLOW/RED] | [P1/P2/P3] |

| CAPA System | [Effective/Needs Improvement/Ineffective] | [P1/P2/P3] |

| Change Control | [Controlled/Backlogged/At Risk] | [P1/P2/P3] |

| Data Integrity | [Compliant/Gaps Found/Critical Gaps] | [P1/P2/P3] |

| Documentation | [Current/Partially Current/Overdue] | [P1/P2/P3] |

| Validation Status | [Current/Gaps Found/Expired] | [P1/P2/P3] |

Remediation Roadmap

Prioritized Recommendations

  1. {highest-impact recommendation with risk context}
  2. {second recommendation}
  3. {third recommendation}

DO NOT:

NEXT STEPS:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /pharma-compliance — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.