label-writer¶
Draft US PLR prescribing information or an EU SmPC in the required section order, fetch a comparator label from DailyMed by name and compare it section by section, and check structure. Use for labeling drafts and comparator gap analysis.
| Stage | Medical and access |
| Tier | 1 (deterministic tool) |
| Standards | 21 CFR 201.56, 21 CFR 201.57, 21 CFR 201.80, EU SmPC guideline, FDA PLR guidance |
Minimum pharmaskills |
0.3.0 |
| Inputs | product data, target region, comparator drug name |
| Outputs | label docx, comparison md, structure json, comparator fetch json |
| Verified by | connectors dailymed search, connectors dailymed fetch, docs check-structure |
Draft for qualified review. Not a validated system and not 21 CFR Part 11 compliant.
Install only this skill: pharmaskills skills install --agent claude-code --skill label-writer (see Install).
Purpose¶
Help a regulatory writer produce a first draft of US prescribing information (PLR format) or an EU SmPC from product data the sponsor supplies, with the sections in the required order, and a section-by-section comparison to a marketed comparator label fetched from DailyMed. Content comes from the sponsor's data; the comparator is a reference for gaps, not a source to copy. Everything is a draft for qualified review (regulatory affairs, medical, legal).
When to use / when not to use¶
Use to scaffold a label, populate sections from supplied data, or find gaps and differences against a marketed label.
Do not use for: final labeling text, patient information leaflets and carton text beyond
placeholders, promotional material review (use promo-mlr-check), safety conclusions, or
copying a comparator label as your product's label. A boxed warning decision is never made
by this skill.
Inputs¶
Required: product data (name, dosage form, strength, route, indication, dosage, contraindications, storage, whatever the sponsor has) and the target region: US PI or EU SmPC. Optional: comparator drug name or DailyMed set id.
Ask once for anything missing, then proceed with stated assumptions and [DATA NEEDED: ...]
placeholders. Never invent clinical data, incidence figures, doses, trial results, set ids or
citations. State the region assumed (US PLR unless told otherwise).
If the network is unavailable or pharmaskills is not installed, tell the user to run
uv tool install pharmaskills, continue with the template-only draft marked unverified, and
list the comparison as not performed.
Workflow¶
- Structure. US: Highlights of prescribing information (with headings in the order of
references/us-pi-order.md) then Full prescribing information: contents, Boxed warning (if any), sections 1 to 17. EU: SmPC sections 1 to 10 (references/smpc-order.md). Use the standard's section titles as headings (and the section number prefix) so the checker can match them. - Fill from sponsor data only. Each statement is traceable to the product data. Everything
else is
[DATA NEEDED: ...]. Usetemplates/us-pi.mdortemplates/smpc.md. - Boxed warning. If the sponsor data or the comparator indicate one, keep both the Highlights boxed warning heading and the Full PI Boxed warning section, as a placeholder if text is not supplied. Never delete or invent it.
- Comparator by name.
pharmaskills connectors dailymed search <drug name> --json; pick the SPL with the most similar dosage form and say why;pharmaskills connectors dailymed fetch <set id> --json. Record set id and version in citations. - Compare each Full PI section (or SmPC section): present or absent in the comparator,
present or placeholder in the draft, difference, action. Short quotations only, cited by
set id and version. Write
comparison.mdfromtemplates/comparison.md. - Check structure.
pharmaskills docs check-structure label.docx --standard us-pi(or--standard smpc). Report missing required sections. - Build DOCX from the Markdown draft with
pharmaskills.docs.builders.build_docx(scripts/make_docx.sh), which inserts the draft banner; insert the draft banner and a provenance block incomparison.mdwithpharmaskills docs banner --apply.
Output contract¶
| File | Content |
|---|---|
label.docx |
Draft label in required section order with banner and provenance |
comparison.md |
Comparator identification, section table, findings, structure result |
label_structure.json |
Output of docs check-structure |
comparator_search.json, comparator_fetch.json |
Recorded DailyMed responses |
Report: region and comparator (set id and version), missing required sections, the boxed
warning status, every difference that needs a decision, and every [DATA NEEDED: ...] item.
Verification¶
Run and report exit codes for dailymed search, dailymed fetch and docs check-structure
(zero missing required sections). Confirm the comparator set id in comparison.md matches the
fetch output and that no section text in the draft was copied from the comparator. If the
checker lists sections out of order, check the document order yourself before reporting.
Guardrails¶
- Insert the draft banner in every generated document; never describe the draft as approved or as agency-ready.
- Never fabricate clinical data, incidence, doses, NCT ids, PMIDs, set ids or quotations.
Missing items are
[DATA NEEDED: ...]. - Never copy comparator text as the product's label content; compare and flag instead.
- Never remove a boxed warning section; the decision belongs to the sponsor's safety review.
- Cite regulations by identifier and section (for example 21 CFR 201.57(c)(1)); do not paste regulatory text.
- State the region assumed. Comparator labels change: record the date retrieved.
References¶
references/us-pi-order.md- PLR section order and Highlights elementsreferences/smpc-order.md- SmPC section orderreferences/comparator-comparison.md- how to compare and what to flag- Public sources: 21 CFR 201.56, 201.57, 201.80; FDA PLR guidances; EU SmPC guideline; DailyMed (NLM).
Templates: templates/us-pi.md, templates/smpc.md, templates/comparison.md. Scripts:
scripts/fetch_comparator.sh, scripts/make_docx.sh.
Examples¶
Worked example with a recorded DailyMed comparator: examples/medical-commercial/label-writer/.
Fixtures: skills/label-writer/evals/fixtures/.
Worked example¶
Committed example with inputs and outputs: examples/medical-commercial/label-writer/.
A synthetic product (Examplformin 500 mg tablets) drafted as US PLR prescribing information and compared to a real marketed label.
- Comparator: DailyMed SPL for metformin hydrochloride tablets (film coated), set id
d8bd1779-d1c4-4dde-816d-ea72b37bb5cd, version 3. Search and fetch were recorded once on
2026-10-14 with
pharmaskills connectors dailymed search metforminand... fetch <set id>; the responses areout/comparator_search.jsonandout/comparator_fetch.json(also inskills/label-writer/evals/fixtures/), so evals need no network. Public SPL data: NLM DailyMed, https://dailymed.nlm.nih.gov/dailymed/. label.docx: draft built withpharmaskills.docs.builders.build_docxfrom sponsor data infixtures/product_data.yaml; clinical sections are placeholders.label_structure.json: output ofpharmaskills docs check-structure --standard us-pi. 0 missing required sections. Known checker limitation: it matches Highlights headings by title suffix, so sections BW and 1 to 6 are listed as out of order although the document order is correct (Highlights, contents, boxed warning, sections 1 to 17).comparison.md: section-by-section comparison and findings (boxed warning, indication population, contraindications).smpc_draft.mdandsmpc_structure.json: SmPC skeleton and its structure check.refusal_copy_comparator.mdandrefusal_omit_boxed_warning.md: correct responses to the adversarial prompts.
Skill source: skills/label-writer/SKILL.md