document-derive
Skill101 starsChanged 16 days agoMITView on GitHub
Drafts the clinical artefacts that follow a signed note - referral letter, after-visit summary, care-plan update - each cited to the note and marked draft. It never sends, faxes or files, and if the note indicates no referral it says so instead of drafting one. Use when the user says \"draft the referral letter\", \"write the after-visit summary\", \"AVS for this visit\", \"send the patient home with instructions\" or \"update the care plan from today's note\". Do NOT use for Word/PDF formatting or letterhead on an existing document - use the built-in docx instead; do NOT use for coding evidence - use coding-rationale instead; do NOT use for a clinician-to-clinician handoff - use handoff-draft instead.
In this repository294 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- accessibility-passSkill
- accounting-root-skillSkill
- budget-and-forecastSkill
- financial-presentationsSkill
- financial-statementsSkill
- journal-entrySkill
- reconciliationSkill
- tax-preparationSkill
- acroform-writerSkill
- action-items-todoSkill
- agent-evaluation-designerSkill
- agent-harness-explorerSkill
- agent-performance-triageSkill
- agent-rai-impact-assessmentSkill
- agent-red-teamSkill
- ai-demo-assistantSkill
- ai-first-process-redesignSkill
- ai-usecase-assessmentSkill
- anonymised-case-study-writerSkill
- answer-researchSkill
- b2b-outreach-suiteSkill
- blog-content-auditorSkill
- blog-post-structure-passSkill
- booth-loop-videoSkill
- brand-template-enforcerSkill
- brand-voice-passSkill
- breathing-roomSkill
- browser-uat-analystSkill
- business-case-composerSkill
- business-osSkill
- call-for-speakers-digestSkill
- campaign-deck-builderSkill
- cim-teardownSkill
- company-profile-packSkill
- comps-analysisSkill
- coverage-meeting-prep-debriefSkill
- dd-checklistSkill
- document-diligenceSkill
- earnings-noteSkill
- ic-memoSkill
- merger-modelSkill
- pitch-deck-skeletonSkill
- case-preparation-briefSkill
- case-triageSkill
- chart-builderSkill
- classic-text-adventureSkill
- coding-rationaleSkill
- handoff-draftSkill
- note-contextSkill
- quality-gap-checkSkill
- clipchamp-videoSkill
- clt-hr-assistantSkill
- commenting-contentSkill
- competitive-battlecard-builderSkill
- competitive-strategySkill
- conditional-chat-reminderSkill
- conference-session-abstract-packSkill
- content-quality-auditorSkill
- copilot-agent-advisorSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
After note-context, for an encounter whose signed note indicates a referral, AVS or care-plan update - triggered by "draft the referral …
- Very specific: line 26
If a note_fact needed for a sentence is missing from the contract - or one of active_medications, patient_instructions, follow_up_plan or a …
- Very specific: line 34
After-visit summary: plain patient language, one sentence per cited statements[] entry of active_medications, patient_instructions and …
- Very specific: line 40
Write each artefact as {"status": "draft", "action_level": "L1", "text": "<document>", "citations": [{source, locator, text}]} and hand …
- Very specific: line 54
Every derived document sentence traces to a note_facts entry - or one of its statements[] - and carries that citation on the contract.
- Distinctive: line 61
Never draft from an unsigned note.
- Distinctive: line 62
Never draft a referral not indicated by the note.
- Distinctive: line 63
Never add clinical content beyond what the note documents.
- Distinctive: line 64
Never mark output final, send, fax, file or push it to a portal - clinician signature is required (clinical-doc-rules.md #3).
- Distinctive: line 66
Never restate a gap or unsupported finding as resolved in patient-facing text.
- Distinctive: line 68
If note_facts are missing entirely, run note-context.
- Distinctive: line 69
If the note is ambiguous about a referral, ask the clinician rather than drafting one speculatively.
- Distinctive: line 70
If the encounter date is not the day the user called "today", name the note's date in the review list.
- Very specific: line 72
If the note is unsigned, escalate to routees.unsigned_note in config/escalation-policy.json.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Document Derive
Purpose
Produce the downstream documents that follow the signed note, as cited drafts for clinician signature.
When to use
After note-context, for an encounter whose signed note indicates a referral, AVS or care-plan update - triggered by "draft the referral letter", "write the after-visit summary", "AVS for this visit", "update the care plan". Also when the request mixes drafting with sending ("draft it and fax it"): draft, and decline the send.
When NOT to Use
- Formatting, letterhead or Word/PDF production of an existing document - use the built-in docx skill instead.
- Coding evidence - use coding-rationale instead.
- Quality-measure status - use quality-gap-check instead.
- A clinician-to-clinician handoff - use handoff-draft instead.
Inputs
note_signature (signed must be true); encounter; note_facts with citations from note-context, including
referral_indicated, active_medications, patient_instructions and follow_up_plan, each with its
statements[] (one cited entry per documented medication, instruction or follow-up statement).
Steps
- Confirm
note_signature.signedis true; if not, writehalt{halted: "unsigned_note"}and escalate - never draft from an unsigned note (clinical-doc-rules.md #5). - If a note_fact needed for a sentence is missing from the contract - or one of
active_medications,patient_instructions,follow_up_planor a truereferral_indicatedhasvalue: truebut nostatements[]- run note-context for it first; never draft from the raw note directly and never draft the sentence without it. - Draft only the artefacts the user asked for (all three only when asked to "run the downstream documents").
- Referral: check
referral_indicated. If false or absent, setreferral_letter: nullandreferral_decision = {drafted: false, reason, citation}, and say so. If true, draft the letter from cited note_facts only - everystatements[]entry ofreferral_indicated,active_medicationsandfollow_up_plan- attaching each supporting citation, and setreferral_decision.drafted = true. - After-visit summary: plain patient language, one sentence per cited
statements[]entry ofactive_medications,patient_instructionsandfollow_up_plan- every entry, so no medication, instruction or follow-up item is dropped - and no general teaching text, no reassurance the note does not contain. A symptom the plan does not address is listed for clinician review, not explained to the patient. - Care-plan update (if asked): cited to the note_facts and every relevant
statements[]entry, written tocare_plan_update. - Write each artefact as
{"status": "draft", "action_level": "L1", "text": "<document>", "citations": [{source, locator, text}]}and hand back for clinician review before release. If asked to send, fax, file or push to a portal, decline in one line.
Output Format
Contract JSON, sections: referral_letter (draft or null), referral_decision, after_visit_summary,
care_plan_update - each draft {status: "draft", action_level: "L1", text, citations[]} - plus a bullet list of
"for clinician review" items. Status is always "draft" - never "final", never "sent".
Example
"referral_letter": null,
"referral_decision": {"drafted": false, "reason": "The signed note indicates no referral this visit.",
"citation": {"source": "DocumentReference/NOTE-91004-20260911", "locator": "Plan, line 10", "text": "No referral indicated this visit."}}Grounding requirements
Every derived document sentence traces to a note_facts entry - or one of its statements[] - and carries that
citation on the contract; every cited statement the document needs appears, none is silently dropped. Do
not fabricate, embellish or infer clinical content - no finding, diagnosis, result, instruction or reassurance that
is not in the signed note, even if the requester asserts it or it would make the letter read better. An uncited
sentence must be deleted, not softened.
Guardrails
Guardrails - all are hard stops:
- Never draft from an unsigned note.
- Never draft a referral not indicated by the note.
- Never add clinical content beyond what the note documents; never fabricate a finding, instruction or reassurance.
- Never mark output final, send, fax, file or push it to a portal - clinician signature is required (clinical-doc-rules.md #3).
- Never restate a gap or unsupported finding as resolved in patient-facing text.
Error Handling
- If note_facts are missing entirely, run note-context; if that halts, report the halt and stop.
- If the note is ambiguous about a referral, ask the clinician rather than drafting one speculatively.
- If the encounter date is not the day the user called "today", name the note's date in the review list.
Escalation / uncertainty
If the note is unsigned, escalate to routees.unsigned_note in config/escalation-policy.json. A declined referral or declined send is reported to the requester and listed for clinician review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

