plugins/healthcare/skills/contracts/skills/knowledge-harvest/SKILL.md
After a run completes, propose durable facts learned during the run for the knowledge index. A human ratifies — always. Proposals ride the queue.
npx skillsauth add anthropics/healthcare knowledge-harvestInstall 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.
The knowledge index informs future reformulations. Auto-ratification is a feedback loop (one wrong fact biases every future brief that reads it), so you propose; a human ratifies.
Skip harvest entirely when: (a) single-doc fact-lookup with a correct answer — there's no cross-doc structure to learn; or (b) the candidate fact is already verbatim in this run's brief or scope rationale (it's already recorded).
Check what's already there before proposing anything:
bun $ANT_CONTRACTS_CLI sql "SELECT fact FROM knowledge WHERE corpus=?"
Don't propose a near-duplicate.
Durable facts about the corpus that a future run would want to know during reformulation: "Ohio NextGen contracts use 'prompt pay' not 'clean claim' for the §4.2 timing clause"; "Acme amendments are cumulative, not replacing"; "the CCS framework's £100k cap is a framework-level figure, not per-call-off". Not findings about the question — those live in the report.
bun $ANT_CONTRACTS_CLI write knowledge '{"corpus":"<corpus>","fact":"…","source_run_id":"'$ANT_CONTRACTS_RUN_ID'","source_queue_item_id":<q or null>}'
bun $ANT_CONTRACTS_CLI write knowledge_citations '{"knowledge_id":<k>,"citation_id":<c>}'
Then surface it for ratification via the queue (the one human channel).
The queue item's question is the fact itself, stated as a plain
declarative — NOT wrapped in "Ratify …?" (that reads as a question
about a question). State facts positively; avoid "does not imply" /
double negatives. The ratification ask goes in context:
bun $ANT_CONTRACTS_CLI write queue_items '{"run_id":"'$ANT_CONTRACTS_RUN_ID'","brief_id":<b>,"round":<r>,"question":"<the fact, plainly>","context":"Proposed knowledge entry #<k> from this run — ratify or reject. Cites <doc.uri>.","blocking":0}'
Ratification happens in the chat front-end or inspector (writes
ratified_by then status). The trigger refuses status=ratified without
ratified_by. You never ratify yourself.
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.