plugins/healthcare/skills/contracts/skills/citations/SKILL.md
How to mint a citation. Every fact FKs to a citations row; citations verify against documents.content (never disk) at insert time and are immutable after.
npx skillsauth add anthropics/healthcare citationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
bun $ANT_CONTRACTS_CLI cite <doc_id> <brief_id> <by> - [start end] [--near <off>] <<'Q'
<quote>
Q
Quote goes on stdin (the - arg) via a quoted heredoc — the
'Q' quotes disable all shell expansion, so $500,000, $(…),
backticks, "Term", it's survive unchanged. --near <offset> picks the occurrence
closest to where you were reading — pass it whenever the quote is short
or boilerplate. created_by is your worker label. The trigger
re-verifies on insert; a bad cite ABORTs.
Sweep workers: prefer bun $ANT_CONTRACTS_CLI find (see the sweep skill) — it
does cite + finding + link in one transaction.
documents.content.
Don't supply offsets; cite locates it. Aim for this — quote what's
literally there, including the document's whitespace and quote marks.model: "haiku", pass the span and the quote, prompt
"Is every value/label/term in QUOTE faithfully present in PASSAGE with
the same meaning? Paraphrases are NOT present. Reply {present, reason}."
If present, write the verdict:
bun $ANT_CONTRACTS_CLI write audits '{"run_id":"'$ANT_CONTRACTS_RUN_ID'","kind":"citation_judge","result":"<reason, one line>"}'
then re-cite with the span and --audit <id>. The trigger requires that
audit FK for kind='judged'.cite returns {id, kind, start_off, end_off}. Link it:
bun $ANT_CONTRACTS_CLI write finding_citations '{"finding_id":<f>,"citation_id":<c>}'
(or queue_citations / claim_citations / knowledge_citations as fits.)
tools
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.
testing
Answer a question across a corpus of contract documents with verified citations. Use when the user asks what a contract says, which contracts have a clause, what changed between amendments, or any question that needs reading and citing across a set of contract files. The corpus must be on the local filesystem (see README).
tools
Connect to a hospital's FHIR R4 server (Epic, Oracle Health/Cerner, MEDITECH, athenahealth, or any SMART-on-FHIR endpoint), pull a patient's clinical data and notes, and extract structured findings. Use when users say "connect to the EHR", "connect to Epic/Cerner", "pull notes for patient X", "what do the last 6 months of notes say about Y", or any task that starts from a live EHR rather than pasted text.
tools
Assign CPT and HCPCS Level II procedure codes from clinical documentation the way a professional coder builds the claim. Use when users say "code this encounter for procedures", "what CPT codes apply", "assign HCPCS codes", "code this op note", or when turning visit notes or operative reports into claim-ready procedure codes.