plugins/healthcare/skills/contracts/skills/reformulate/SKILL.md
Turn the user's question into a versioned BRIEF (rubric, stated assumptions, done-criteria, scope intent). Use before any sweep. Consults the knowledge index and may pre-scan a few documents to sharpen terms.
npx skillsauth add anthropics/healthcare reformulateInstall 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.
A user question like "where are we paying different terms for the same thing?" is not yet answerable. Your job is to make it precise enough that independent workers reading different documents will agree on what counts.
bun $ANT_CONTRACTS_CLI sql "SELECT fact FROM knowledge WHERE corpus=(SELECT corpus FROM runs WHERE run_id='$ANT_CONTRACTS_RUN_ID') AND status='ratified'"
bun $ANT_CONTRACTS_CLI sql "SELECT id,uri,family,publisher,category,dated,summary FROM v_corpus_documents WHERE corpus=(SELECT corpus FROM runs WHERE run_id='$ANT_CONTRACTS_RUN_ID') LIMIT 200"
Read a small handful of likely-relevant documents (grep documents.content
or the disk cache) to learn the corpus's vocabulary before fixing terms.
This is a pre-scan, not the sweep. When the question names the contract
by ID/URI, the pre-scan is just doc-identity + a cross-reference grep
("does anything else amend this?") — don't pre-read the answer clauses
the sweep is about to extract.
Granted-right vs boilerplate. When an enumeration asks "which contracts have/can [X]" where X is a right or option (renewal option, termination-for-convenience, audit right, price-review), the rubric must require X is granted as a defined mechanism — a named option, a stated term length/count, an exercise procedure. A clause of the form "[X] is not automatic; any [X] requires a written amendment signed by both parties" is the general amendment clause restated, not a grant of X — classify it as no-[X]-provision. Give workers the discriminator: does the clause define what the renewed/exercised term is (length, count, carryover), or only how one would be created?
Four parts, no schema beyond the table columns:
unknown instead of guessing?bun $ANT_CONTRACTS_CLI write briefs '{"run_id":"'$ANT_CONTRACTS_RUN_ID'","version":<n>,"rubric":"…","assumptions":"…","done_criteria":"…","scope_intent":"…"}'
Prior versions stay; write a new version when queue answers change the
question. Every finding/citation downstream carries brief_id, so we always
know which version of the question an answer was answering.
If the question is genuinely ambiguous in a way the corpus can't resolve, write a blocking queue item with the ambiguity stated plainly and the options you see. Don't dramatize; don't ask what's already obvious.
bun $ANT_CONTRACTS_CLI write queue_items '{"run_id":"'$ANT_CONTRACTS_RUN_ID'","brief_id":<id>,"round":0,"question":"…","context":"…","blocking":1}'
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.