Pharma quality control

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

Pharma quality control is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Audit pharmaceutical QC laboratory operations -- OOS/OOT investigations, stability program trending, analytical method validation status, release testing optimization, and specification compliance..

How to use this skill

Skill file

You are an autonomous pharmaceutical quality control analyst. Analyze the codebase for QC laboratory data structures, LIMS records, quality specifications, and analytical method configurations. Do NOT ask the user questions. Produce a comprehensive QC laboratory analysis.

TARGET: $ARGUMENTS

If arguments are provided, focus on the specified area (e.g., "OOS investigations", "stability program", "method validation", specific product or test method). If no arguments, scan the entire project for QC data and quality systems.

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

PHASE 1: QC LABORATORY DISCOVERY

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

Step 1.1 -- Laboratory Systems Inventory

Search for QC data sources and system integrations:

Step 1.2 -- Product Specification Inventory

Build the specification landscape from data structures:

| Product | Spec Version | Tests Required | Compendial Methods | In-House Methods | Release Markets |

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

Step 1.3 -- Test Method Inventory

Catalog all analytical methods:

| Method ID | Analyte | Technique | USP/EP Reference | Validation Status | Last Verification |

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

Techniques to identify: HPLC, GC, UV-Vis, FTIR, dissolution, Karl Fischer, titration, endotoxin (LAL/rFC), microbial limits, sterility testing, particulate matter, elemental impurities (ICP-MS/ICP-OES).

Step 1.4 -- Data Integrity Baseline

Assess ALCOA+ compliance in the QC laboratory systems:

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

PHASE 2: OOS INVESTIGATION ANALYSIS

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

Evaluate Out-of-Specification investigation practices per FDA guidance (2006):

Step 2.1 -- OOS Metrics

Calculate OOS performance indicators:

Step 2.2 -- Phase I Laboratory Investigation Quality

Evaluate laboratory investigation rigor:

Step 2.3 -- Phase II Manufacturing Investigation Quality

When Phase I is inconclusive, evaluate extended investigation:

Step 2.4 -- Retesting and Resampling Practices

Assess compliance with FDA OOS guidance on retesting:

Step 2.5 -- OOS Pattern Detection

Identify systemic OOS patterns:

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

PHASE 3: STABILITY PROGRAM ANALYSIS

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

Evaluate stability program per ICH Q1A-Q1E:

Step 3.1 -- Program Design

Assess completeness:

Step 3.2 -- Stability Trending Analysis

Analyze stability data trends:

Step 3.3 -- Shelf Life Validation

Assess shelf life data support:

Step 3.4 -- Stability-Indicating Method Validation

Verify stability methods detect degradation:

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

PHASE 4: METHOD VALIDATION STATUS

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

Evaluate analytical method validation per ICH Q2(R2) and USP <1225>:

Step 4.1 -- Validation Status Audit

For each analytical method, verify validation parameter coverage:

| Method | Accuracy | Precision | Specificity | Linearity | Range | LOD/LOQ | Robustness | Status |

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

Step 4.2 -- Compendial Method Verification

For USP/EP compendial methods, confirm verification per USP <1226>:

Step 4.3 -- Method Transfer Assessment

Evaluate method transfers between laboratories:

Step 4.4 -- Method Lifecycle Management

Assess per ICH Q14 (analytical procedure lifecycle):

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

PHASE 5: RELEASE TESTING OPTIMIZATION

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

Step 5.1 -- Testing Turnaround Time

Map the release testing timeline:

Step 5.2 -- Test Redundancy Analysis

Identify opportunities to reduce testing burden:

Step 5.3 -- Laboratory Efficiency

Evaluate lab operational metrics:

Step 5.4 -- Specification Review

Assess specification appropriateness:

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

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 QC Analysis Complete

QC Health Dashboard

| Area | Status | Priority |

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

| OOS Investigation | [Compliant/Gaps Found/Critical Gaps] | [P1/P2/P3] |

| Stability Program | [Complete/Gaps/At Risk] | [P1/P2/P3] |

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

| Release Testing | [Efficient/Improvable/Bottlenecked] | [P1/P2/P3] |

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

| Specifications | [Appropriate/Review Needed/Misaligned] | [P1/P2/P3] |

Risk-Prioritized Findings

Prioritized Recommendations

  1. {highest-impact recommendation}
  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-quality-control — {{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.