clinical-note-extract
Extract structured data from clinical notes with span-level provenance and null-safety. Use when users say "extract [variables]…
Extract plain text from a document file - PDF, DOCX, XLSX, PPTX, RTF, or plain text/markdown/HTML. Use when a binary document needs to be turned into text, for example a contract PDF or an EHR DocumentReference attachment. Other skills (fhir) invoke scripts/extract.ts directly;
Claude Code
$ npx -y skills add anthropics/healthcare --skill doc-extract --agent claude-code
Codex
$ npx skills add anthropics/healthcare --skill doc-extract -a codex -y
Cursor
$ npx skills add anthropics/healthcare --skill doc-extract -a cursor -y
Gemini CLI
$ npx skills add anthropics/healthcare --skill doc-extract -a gemini-cli -y
GitHub Copilot
$ npx skills add anthropics/healthcare --skill doc-extract -a github-copilot -y
OpenCode
$ npx skills add anthropics/healthcare --skill doc-extract -a opencode -y
Windsurf
$ npx skills add anthropics/healthcare --skill doc-extract -a windsurf -y
name: doc-extract description: Extract plain text from a document file - PDF, DOCX, XLSX, PPTX, RTF, or plain text/markdown/HTML. Use when a binary document needs to be turned into text, for example a contract PDF or an EHR DocumentReference attachment. Other skills (fhir) invoke scripts/extract.ts directly; the contracts MCP server bundles its own copy (servers/documents/src/extract.mjs) so its bundle stays self-contained — port fixes to both.
Shared document-to-text extraction. One script, no state: reads an input file, prints JSON to stdout, writes nothing to disk (PHI-safe — no caches, no temp files; callers own any caching).
cd <this skill dir> && bun install
This pulls [liteparse](https://www.npmjs.com/package/@llamaindex/liteparse) (the `lit` bin, used for PDF/DOCX/XLSX/PPTX, OCR included) and [rtf-to-text](https://www.npmjs.com/package/rtf-to-text) (RTF). Without it, PDFs still work via a `pdftotext -layout` fallback if poppler is installed; other binary formats require liteparse.
bun <this skill dir>/scripts/extract.ts <input-file> [--content-type <mime>]
Output on stdout:
{ "text": "...", "method": "liteparse | pdftotext | rtf-to-text | passthrough", "pages": 12 }Tables with multiple value columns (option A vs option B, in-tier vs out-of-tier) can interleave columns line-by-line in the extracted text: fragments of adjacent cells alternate, and a cell's text can even land mid-sentence inside a neighboring column. Values usually survive, but which column a value belongs to can become ambiguous. When an answer comes from one column of a multi-column table and the document has no redundant restatement of the value elsewhere, verify it by reading the original page directly before treating it as ground truth. The extracted text's `=== [page N] ===` anchor tells you which page: pass it to the Read tool's `pages` parameter (e.g. pages: "37") to render just that page to vision instead of the whole document.
Import the functions instead of shelling out when you're already in bun TS:
import { extract, resolveLit } from "../doc-extract/scripts/extract";
const lit = resolveLit([myRoot]); // also checks myRoot/node_modules/.bin/lit
const text = extract(lit, "/path/to/file.pdf"); // string | nullThe contracts skill consumes it this way (its ingest caching stays on the contracts side).
One plugin for healthcare work: skills for payer, provider, pharma, and general engineering, with hosted MCP servers connected. Skills only load when relevant, so the bundle stays cheap.
Extract structured data from clinical notes with span-level provenance and null-safety. Use when users say "extract [variables]…
Generate clinical trial protocols for medical devices or drugs. This skill should be used when users say "Create a clinical trial…
Answer a question across a corpus of contract documents with verified citations. Use when the user asks what a contract says,…
FHIR API development guide for building healthcare endpoints. Use when: (1) Creating FHIR REST endpoints (Patient, Observation,…
Connect to a hospital's FHIR R4 server (Epic, Oracle Health/Cerner, MEDITECH, athenahealth, or any SMART-on-FHIR endpoint), pull…
Screen a Medicare/Medicaid claims corpus for fraud, waste, and abuse and produce ranked, fully-cited investigation referrals for…
Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Search literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for…