icf-writer¶
Draft an informed consent form in plain language from a protocol summary, check the 21 CFR 50.25 elements and the reading grade, and explain randomisation for placebo designs. Use when a protocol needs a participant-facing consent document.
| Stage | Clinical development |
| Tier | 1 (deterministic tool) |
| Standards | 21 CFR 50.25, 21 CFR Part 50, ICH E6(R3), Flesch-Kincaid grade level |
Minimum pharmaskills |
0.3.0 |
| Inputs | protocol summary, target reading grade, region, sponsor policies |
| Outputs | icf docx, icf md, icf check json, icf readability json |
| Verified by | docs check-icf, docs readability |
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 icf-writer (see Install).
Purpose¶
Draft the participant-facing informed consent form (ICF) for a clinical trial in plain language,
check it against the elements of 21 CFR 50.25 and a reading-grade target, and hand it to the
clinical team, ethics committee liaison and legal reviewer as a draft. The element and
readability checks are deterministic pharmaskills calls; you write the text and fix gaps.
When to use / when not to use¶
Use when a protocol or protocol summary exists and a consent form is needed, or when an existing ICF should be checked for the required elements and reading level.
Do not use for: assent forms for children, consent for genetic or biobank sub-studies, emergency research with exception from informed consent, translations, or any statement of sponsor policy (injury compensation, payment) that the sponsor has not supplied. Never present the document as ready for ethics committee or IRB submission.
Inputs¶
Required: a protocol summary (title, population, design, visits and procedures, risks,
alternatives, number of participants). Optional: reading grade target (default grade 8), region
(default United States, FDA 21 CFR Part 50), sponsor policy text for injury, costs and payment,
and contact details. Ask once for anything missing, then proceed with stated assumptions and
[DATA NEEDED: ...] placeholders (never invent contacts, phone numbers or policies).
If pharmaskills is not installed, tell the user to run uv tool install pharmaskills, then
draft from templates/icf.md and mark the checks as not run (unverified). Check
pharmaskills --version is at least min_pharmaskills.
Workflow¶
- Assumptions. State the region (default US FDA) and whether the trial is an applicable
clinical trial. Read
references/50-25-elements.mdandreferences/plain-language.md. - Draft. Start from
templates/icf.md. Plain sentences (about 15 words), active voice, "you" and "we", defined terms, headings as questions. A key information section first. For a placebo or blinded design explain randomisation and the chance of each group in words. - Check elements.
pharmaskills docs check-icf out/icf.docx --out out/icf_check.json. Exit 2 means a basic element or the placebo check is missing: add the missing text and rerun. - Check readability.
pharmaskills docs readability out/icf.docx --target-grade 8 --out out/icf_readability.json. Above target: shorten sentences and replace long words, then rerun. If a technical term must stay, keep it, define it, and report the grade as flagged. - Build the DOCX. Write the Markdown text and build
out/icf.docxwith the documented builder (it adds the banner, a provenance block and heading styles) or write Markdown and runpharmaskills docs banner --apply out/icf.md. Cite 21 CFR 50.25 section numbers in the cover note, not in participant-facing text. - Report element results, grade, placeholders still open and the assumed region.
Output contract¶
Under out/:
| File | Content |
|---|---|
icf.docx |
Draft consent form with headings, banner and provenance |
icf.md |
Same text in Markdown |
icf_check.json |
docs check-icf report: elements, evidence lines, placebo check, pass flag |
icf_readability.json |
Grade level, reading ease, words, sentences, target and pass flag |
Verification¶
Report pass or fail: every basic element 21 CFR 50.25(a)(1) to (a)(8) present in icf_check.json
(missing_basic empty); additional elements 50.25(b)(1) to (b)(6) present or marked not
applicable with a reason; for placebo-controlled designs randomisation_explained and
chance_explained true; Flesch-Kincaid grade at or below the target or explicitly flagged; the
ClinicalTrials.gov statement of 21 CFR 50.25(c) present for an applicable clinical trial (the
tool does not check it: verify by reading); banner present. Fix and rerun up to three times.
Guardrails¶
- Insert the draft banner and provenance block; state that an IRB or ethics committee and a legal reviewer must approve the final text. Never claim regulatory compliance from the tool result: the check finds wording evidence, a person judges adequacy.
- Never fabricate risks, frequencies, contacts, compensation terms or sponsor policy. A missing
fact is
[DATA NEEDED: ...]. Never downplay risks or promise benefit; never write "no risk". - Do not remove or soften a required element to improve the reading grade.
- State the region assumed. 21 CFR Part 50 applies to FDA-regulated research in the US; other regions (for example EU Regulation 536/2014, Article 29; ICH E6(R3)) have their own content requirements that this skill's tool does not check. Verify against the current eCFR text.
- Use participant-facing language only; keep identifiers of real people out of the draft.
References¶
references/50-25-elements.md- elements of 21 CFR 50.25 (a), (b), (c) and what the tool checksreferences/plain-language.md- readability targets and rewriting rules- Public sources: 21 CFR 50.25 (eCFR), ICH E6(R3) section on informed consent, Flesch-Kincaid grade level.
Templates: templates/icf.md. Scripts: scripts/check_icf.sh (thin wrapper that runs the
element and readability checks).
Examples¶
Worked example: examples/clinical/icf-writer/. Synthetic protocol summary for trying the
workflow: skills/icf-writer/evals/fixtures/protocol_summary.md.
Worked example¶
Committed example with inputs and outputs: examples/clinical/icf-writer/.
Synthetic study PSK-201-DM2-01 (an invented product in adults with type 2 diabetes).
Inputs¶
skills/icf-writer/evals/fixtures/protocol_summary.md (synthetic, no real product or data). The
other fixtures are ICF variants used by edge cases: icf_placebo_no_randomisation.md,
icf_missing_elements.md (injury section removed) and icf_complex_language.md.
Outputs (out/)¶
| File | How it was made |
|---|---|
icf.docx, icf.md |
Drafted from the template, built with pharmaskills.docs.builders.build_docx |
icf_check.json |
Real output of pharmaskills docs check-icf out/icf.docx: 14 of 14 elements, placebo check passed |
icf_readability.json |
Real output of pharmaskills docs readability --target-grade 8 |
icf_missing_elements_note.md |
Sample correct response when an element is missing |
refusal_downplay_risks.md |
Sample correct response to a request to hide risks |
The ClinicalTrials.gov statement (21 CFR 50.25(c)) is included because the summary says the trial
is an applicable clinical trial. Contacts, sponsor and injury policy stay as [DATA NEEDED].
Reproduce¶
pharmaskills docs check-icf examples/clinical/icf-writer/out/icf.docx
pharmaskills docs readability examples/clinical/icf-writer/out/icf.docx --target-grade 8
Skill source: skills/icf-writer/SKILL.md