csv-gamp5¶
Draft a computerised system validation pack using a GAMP 5 risk-based approach, FDA CSA and Part 11 and Annex 11 checks, including AI agent controls. Use when asked to validate, assess or document a GxP computerised or AI system.
| Stage | Quality and compliance |
| Tier | 2 (template and rubric) |
| Standards | GAMP 5 second edition, 21 CFR Part 11, EU GMP Annex 11, FDA CSA guidance, FDA-EMA AI principles (Jan 2026), ICH Q9(R1) |
Minimum pharmaskills |
0.4.0 |
| Inputs | system description, intended use, gxp impact, supplier documents |
| Outputs | csv pack docx, part11 checklist csv, checklist check json |
| Verified by | quality part11-checklist, docs build, docs detect-pii |
Draft for qualified review. Not a validated system and not 21 CFR Part 11 or EU Annex 11 compliant.
Install only this skill: pharmaskills skills install --agent claude-code --skill csv-gamp5 (see Install).
Purpose¶
Help a quality or IT professional draft the documents of a risk-based computerised system validation (CSV) pack: GxP impact and GAMP category assessment, user requirements (URS), FMEA-style risk assessment, test strategy, installation, operational and performance qualification (IQ, OQ, PQ) outlines, and a Part 11 and Annex 11 checklist with gaps. For AI systems it adds model version control, data governance and performance monitoring. It also explains what a user must do to validate PharmaSkills itself for their own use. Everything is a draft for qualified review by quality assurance (QA) and the system owner.
When to use / when not to use¶
Use to plan or document validation of a GxP-relevant system (standalone, SaaS, or an AI agent), to find Part 11 and Annex 11 gaps, or to justify lower rigour for a non-GxP system.
Do not use for: declaring a system validated or compliant, replacing the validation
responsibilities of the regulated company, supplier audits (it can prepare questions only), or
medical advice (decline and point to a clinician). Do not process real personal data; run
pharmaskills docs detect-pii and recommend de-identification.
Inputs¶
Required: a description of the system (what it does, supplier, hosting, interfaces), the intended use (which GxP process and decision it supports) and the GxP impact if known. Optional: supplier documentation, existing SOPs, data flow diagram, AI model and prompt inventory.
Ask once for anything missing, then proceed with stated assumptions and [DATA NEEDED: ...]
placeholders. State the region assumed: US FDA (21 CFR Part 11, FDA CSA) with ICH unless told
otherwise; EU sites add EU GMP Annex 11. If pharmaskills is not installed, say so (uv tool
install pharmaskills, check pharmaskills --version against min_pharmaskills) and write the
documents from the templates, marked unchecked and without the generated checklist.
Workflow¶
- Intake and scope. Run
pharmaskills docs detect-piion supplied files. Restate system, intended use, users and data in one paragraph. - GxP impact and category. Decide GxP impact (high, medium, low, none) with reasons: does
the system create, process or store GxP records or support a GxP decision? Assign the GAMP 5
software category (1 infrastructure, 3 non-configured, 4 configured, 5 custom; the second
edition has no category 2) per
references/gamp-categories.md. For AI agents use the guidance on non-deterministic behaviour there. Mark every judgement as a proposal for QA. - Scale the rigour. Use
references/risk-based-rigour.mdand FDA CSA critical thinking: assurance effort follows risk to patient safety, product quality and data integrity. A system with no GxP impact is marked "not GxP: lower rigour" with the justification; the record is short but the reasoning is kept. - Write the pack from
templates/(one DOCX per document): GxP assessment, URS with unique requirement ids, FMEA-style risk assessment with controls mapped to tests, test strategy, IQ/OQ/PQ outlines tracing to requirements, supplier assessment questions. - Checklist.
pharmaskills quality part11-checklist --system-type <standalone|saas|ai-agent> --gxp-impact <high|medium|low|none> --out out/part11_checklist.csv. Fillstatus(met, partial, gap, not-applicable),evidence_refandgap_noteonly from supplied evidence; unknown stays[DATA NEEDED: ...]. - AI add-ons (system type
ai-agent): model change control, data governance, performance monitoring and human oversight, seereferences/ai-systems.md. Cite the FDA-EMA AI principles (January 2026) by name only; flag section or principle numbers you cannot verify rather than citing them. - Validating PharmaSkills itself: when asked, or when PharmaSkills is the system, include
templates/validate-pharmaskills.mdcontent (seereferences/validating-pharmaskills.md). - Build and check. Build each DOCX with
pharmaskills docs build(banner and provenance inserted), thenpharmaskills quality part11-checklist --check out/part11_checklist.csv --out out/checklist_check.json. Exit 2 means audit trail or e-signature items are missing or lack a status; fix and rerun, at most 3 iterations. - Report using the output contract.
Output contract¶
Under out/:
| File | Content |
|---|---|
csv_pack/*.docx (and .md) |
GxP and category assessment, URS, risk assessment, test strategy, IQ/OQ/PQ outlines, Part 11 and Annex 11 assessment, AI addendum when applicable; draft banner and provenance in each |
part11_checklist.csv |
Requirement rows with rigour, expected evidence, status and gap note |
checklist_check.json |
Result of quality part11-checklist --check |
State plainly: GxP impact and category proposed, rigour level, counts of met, partial and gap items, open placeholders, and what QA and the system owner must decide.
Verification¶
Run pharmaskills quality part11-checklist --check and report pass or fail: audit trail and
electronic signature items present, each with a status. Confirm every pack document carries the
draft banner, an AI system pack includes model change control, and a non-GxP system is marked
lower rigour. A passing check shows coverage, not that the system meets the requirements; an
assessor must examine the evidence. Replay on examples/quality/csv-gamp5/ passes all eval
cases.
Guardrails¶
- Insert the draft banner in every generated document; never state that a system is validated, compliant or fit for GxP use, and never present the pack as approved.
- Never fabricate supplier claims, test results, certification, audit findings or regulator
statements. Unknown values become
[DATA NEEDED: ...]. - Cite FDA CSA guidance and the FDA-EMA AI principles (Jan 2026) by name; note FDA CSA is written for production and quality system software in device manufacturing and is used by analogy for other GxP software; flag any section number you cannot verify.
- Say plainly that PharmaSkills v1 is not validated software and not Part 11 or Annex 11 compliant, and do not let the user rely on it in a GxP decision without their own validation.
- Do not give medical advice; state the region assumed.
- Degrade gracefully: no network is needed; without the tools package produce template-based documents, marked unchecked.
References¶
references/gamp-categories.md- GAMP 5 categories and AI agentsreferences/risk-based-rigour.md- scaling effort by GxP impact, CSA critical thinkingreferences/ai-systems.md- model version control, data governance, monitoring, oversightreferences/validating-pharmaskills.md- what a user does to validate PharmaSkills- Public sources: ISPE GAMP 5 Guide second edition (2022), 21 CFR Part 11, EU GMP Annex 11, FDA guidance "Computer Software Assurance for Production and Quality System Software", the FDA-EMA guiding principles for AI in drug development (January 2026). Section numbers are for navigation only; verify against the current text.
Templates: templates/urs.md, templates/risk-assessment.md, templates/validate-pharmaskills.md.
Script: scripts/check_checklist.sh.
Examples¶
Worked example with outputs and refusal samples: examples/quality/csv-gamp5/. Synthetic
inputs: skills/csv-gamp5/evals/fixtures/.
Worked example¶
Committed example with inputs and outputs: examples/quality/csv-gamp5/.
Inputs (synthetic): skills/csv-gamp5/evals/fixtures/system_description.md (an AI drafting
agent, GxP impact medium) and non_gxp_system.md (a literature search helper, no GxP impact).
Both systems are invented.
pharmaskills quality part11-checklist --system-type ai-agent --gxp-impact medium --out out/part11_checklist.csv
pharmaskills quality part11-checklist --system-type saas --gxp-impact none --out out/part11_checklist_non_gxp.csv
pharmaskills quality part11-checklist --check out/part11_checklist.csv --out out/checklist_check.json
pharmaskills docs build out/csv_pack/urs.md --out out/csv_pack/urs.docx --skill csv-gamp5
File in out/ |
Origin |
|---|---|
csv_pack/*.docx and .md |
drafted by the agent, built with the deterministic DOCX builder (draft banner, provenance) |
part11_checklist.csv |
generated by the tool, statuses filled by the agent from the supplied description |
part11_checklist_non_gxp.csv |
tool output marked "not GxP: lower rigour" |
checklist_check.json |
tool output of --check |
refusal_*.md |
what a correct agent says for the adversarial cases |
csv_pack/validate_pharmaskills.docx explains what a user must do to validate PharmaSkills for
their own use. The statuses show open gaps on purpose: the pack is a plan, no test has been
executed. Synthetic data only. Not a validated system; for qualified review (QA).
Skill source: skills/csv-gamp5/SKILL.md