Install
openclaw skills install @j3ffyang/medical-record-reviewReview personal or family health records (lab results, imaging, prescriptions, medication, symptom notes): compare every metric across the full history, draw time trends, report and track data conflicts, grade evidence, and highlight clinical risks. Generic layer — it contains no patient data. The project layer injects the profile and all paths. Triggers: health record, medical record, lab result, bloodtest, imaging, prescription, medication, symptom, trend, review, analysis, intake, index, registry, merge, rename, audit, 健康档案, 化验, 处方, 用药, 趋势, 复阅, 分析, 建档, 整理, 合并, 更名, 审计, 注册表. Never diagnose, never prescribe, never edit source data.
openclaw skills install @j3ffyang/medical-record-reviewThis is the generic layer. It carries no patient data, no patient paths, and no patient values. The project layer injects the profile and the directory layout (see §0). Authority chain: project
AGENTS.md> project-layer skill > this generic skill. If they conflict, the higher layer wins. Name the conflicting clause. One record folder = one person. Multiple people means multiple folders. Folders never reference each other. Terms. A record is one file inDOCS_DIR. The person is the subject of the record. The user is the operator of this skill. Use these three names only.
Companion article: Health Records an Agent Can Audit — why the layers split, and what the skill cannot do yet.
⚠️ DISCLAIMER — AI × MEDICAL IS A PRACTICE, NOT A MEDICAL DEVICE
This skill is an experiment. It combines AI with personal medical record keeping. It is an engineering exercise in structure, traceability, and evidence discipline. It is not a medical device. No regulator has validated, certified, or reviewed it.
Its output is NOT an official medical suggestion, recommendation, diagnosis, prescription, or treatment decision. No licensed clinician writes or reviews this output. Every value, trend, correlation, risk flag, and citation is a machine draft. That draft may be confidently wrong.
Do not act on the output without a clinician. Never change medication, insulin doses, diet, or treatment on the strength of this output alone. Bring the output to a qualified professional. That professional knows the full history and makes the decision.
Use at your own risk. The author gives no warranty and accepts no liability. The skill ships "as is". The author accepts no responsibility for any consequence of use or misuse. Consequences include wrong or harmful action, missed or delayed action, misread data, and data loss. They also include privacy or regulatory harm from the user's own deployment. Sending records to a hosted model, a third-party service, or a shared device is such a deployment.
The user carries the responsibilities. The user chooses the model and its egress. The user stores and shares the records. The user protects the identifiers. The user complies with local health-data law. If you cannot accept these terms, do not use this skill.
| Phase | Sections | Purpose |
|---|---|---|
| Ingest | §0–§2 | resolve configuration, clear egress, file the raw source |
| Analyse | §3–§6 | profile, registry, full history, enabled modules |
| Output | §7–§10 | conflicts and gates, evidence, risk lanes, output skeleton |
| Maintain | §11–§15 | housekeeping, structure, compression, TCM sub-flow, checklist |
A thirty-second answer may drop the optional work. It may never drop the safety rails.
| May skip on a quick answer | Never skipped, at any speed |
|---|---|
| ASCII mini-trends · re-reading the entire registry · optional modules | Egress pre-check (§1) · conflict protocol and change gate (§7) · evidence grading (§8) · one folder per person · never editing a data row |
Read the nine keys that the project layer supplies. If a required key is missing, ask the user. Never guess.
| Key | Meaning | If missing |
|---|---|---|
AUTHORITY | Highest rules file, usually the project AGENTS.md | Stop and ask |
PROFILE | Where the profile comes from: AGENTS.md, profile.md, or the user's dictation | Stop and ask |
DOCS_DIR | Record directory (default docs/) | Use the default |
IMGS_DIR | Raw scan directory (default imgs/) | Use the default |
REGISTRY | Trend-registry filename | Create it on first run, per §4 |
INDEX / INDEX_CMD | Index file and its generator command | Maintain by hand. Mark the index as hand-maintained |
LANG | Writing language, and whether existing records are bilingual | Follow the target record's existing language |
MODULES | Enabled analysis modules (see §6) | Enable western only |
UNWRAP_CMD | Optional prose-rewrap command | Skip it. Never block on it |
AGENTS.md or a standalone profile.md may hold it instead. PROFILE names the source.AUTHORITY may point at any rules file the agent already loads. A patient-free starter ships in references/AGENTS.example.md. Copy it to the project root as AGENTS.md, or point AUTHORITY at the host's existing file (AGENTS.md, CLAUDE.md, or equivalent). The starter carries placeholders only, never a value.DOCS_DIR at a mixed folder; §3 reads every record in it.AUTHORITY govern the details. This skill does not restate them.IMGS_DIR. Never overwrite one. Never convert one in place. You can regenerate a derived file. You cannot regenerate an original.{{DOCS_DIR}}/{{YYMMDD}}-{{topic}}.md. Keep every transcribed value verbatim. Do not interpret it. Do not correct it.INDEX_CMD is configured, refresh the index after filing.IMGS_DIR stays untouched (§1).patient report, undated or patient report, 2026-10. A document that disagrees with it is a conflict (§7). A remembered dose is not a weaker number. It is a number from a different source.IMGS_DIR.date, type, and tags to shortlist. Then read the full text. The index is a locator, not a data source. Every fact still comes from the record.REGISTRY is absent, create it. Date it by its first creation day. If it exists, read it and reuse it.date | value | reference range | status | source record | note.onset | end | severity | attribution status (baseline / after drug X) | sourceformula | herb count | per-dose grams | doses | course | relation to previous formula | sourcemodality | date | finding | positive? | follow-up | sourcelow-confidence. Never present a derived value as a measurement.MODULES)western (default on): glucose, HbA1c, lipids, liver and kidney function, weight trend, regimen plausibility. Regimen plausibility covers basal-to-bolus ratio, dawn phenomenon, post-meal peaks, and hypoglycaemia protection.tcm (optional): pattern differentiation, formula decomposition, dose check, warming-cooling balance, decoction and dosing method, course length, dietary restrictions. Sub-flow in §14.imaging (optional): structured transcription of imaging and functional tests, positive findings, follow-up prompts. Never mix modalities.cgm (optional): time in range, time above and below range, mean glucose, estimated HbA1c, intraday curve. State the wear period and the coverage.meds (optional): dosing times, dose-change history, interactions, adherence.low-confidence.Triggers for a conflict:
Procedure:
Log every reported conflict in the pending table. After the decision, mark it resolved and record the decided value. Never delete an undecided conflict.
Never do these three things. Never pick one value silently. Never "fix" the original silently. Never write an uncertain value into a trend as fact.
Change gate — every data edit passes it, not only conflicts:
Scope of an exemption: a user exemption covers process notes and analysis lines only. The user may allow a rewrite or a deletion there. Data rows are never editable. Data rows are values, source columns, reference ranges, and measurement-condition flags. You can append a data row or resolve it. You cannot rewrite it.
Every external claim passes five tests. If a claim fails one test, it drops to low-confidence.
low-confidence. A demoted claim goes to "clinician review".Always emit a risk block with three lanes:
Actionable: clear evidence and a defined target.
Monitor: evidence is insufficient now. Add the item to the next review.
Clinician review: the claim fails the five tests in §8, or it lies outside this skill's boundary. Diagnosis and prescribing lie outside that boundary.
Every risk carries its evidence source. Analysis is informational. It never replaces medical advice.
Never claim a review that did not happen. Do not label output "verified", "approved", "clinically validated", or "confirmed by a clinician". Use such a label only after a named clinician read that output. Automation is not review.
A full review follows this order. A quick answer may compress to ②④⑤.
| # | Block | Content |
|---|---|---|
| ① | Baseline profile | one source per line |
| ② | Metric trends | new value against full history, plus ASCII |
| ③ | Arithmetic check | totals, products, units, date consistency |
| ④ | Conflicts | new reports, pending-table sync |
| ⑤ | Analysis | in MODULES order. Each module splits into record facts and external inference |
| ⑥ | Risks | actionable / monitor / clinician review, each with evidence |
| ⑦ | Housekeeping | stale marks, heading levels, naming, index refresh result |
## and ### only. Never add a second #. Keep one H1 per record.YYMMDD-topic. The topic must match the content. It answers one question: what data would I open this for.awk 'gsub(/\*\*/,"")%2==1 {print FILENAME": "FNR}' <file>. Horizontal rules of *** are false positives. Inspect the suspect lines only.grep -nP '^([0-9]+\.|- )\*\*[^:]+?\*\*(?!:)' <file>. This check covers Chinese punctuation only. Compare within one list level. Lookaround needs grep -P. Built-in grep and ripgrep lack it.oldString must contain the previous entry in full. newString keeps that entry verbatim and appends the new one.oldString holds part of the previous entry, and newString holds only the new one. The previous entry is then destroyed.grep -c that every entry appears exactly once.<3 as \<3. Write a standalone $ as \$. Otherwise the renderer eats them.provenance: <model> · <date> · <skill version>. Models change. Without the stamp, nobody can re-judge a five-year-old paragraph.Classify the record before you write.
| Class | Rule |
|---|---|
| Event record | One record per episode. The filename date is the event date. A follow-up joins its own episode record |
| Series record | Multiple rounds from one source. Append, never fork. The filename carries the latest data round's date. The header states "rename and re-point references when a new round lands" |
| Analysis record | Derived from other records. Mark it "inference / review". It produces no raw data. The filename date is the creation date |
| Historical archive | No follow-up value. Excluded from metric tables. Kept as-is |
sed ranges or a raw copy. Never retype. Never rewrite.grep on the historical log lines to prove they are untouched. A bulk replace once rewrote a history line. That failure is recorded.grep -rn, ignored directories included. Confirm that nothing lives outside this repository.Four audit steps:
Two preconditions:
Execution: candidate → machine check → swap. This path covers compression, excision, and merge.
/tmp.MODULES includes tcm)0. Collect this field set before analysis. Never guess a missing field. Mark it "not recorded (pending)".
Then run six checks:
IMGS_DIR originals untouched. Nothing deleted or overwritten in placeOne block per metric: a Markdown timeline table and a mini-trend. Scale the trend to the historical range, oldest to newest.
<metric> (<unit>) — <period old→new>
<high mark> | ● ← <date> <note>
<mid mark> | ●
<low mark> | ●
+------------------------→ time (old→new)
---
date: YYYY-MM-DD # event record = event date; series = latest data round; analysis = creation date
type: event | series | analysis | archive
topic: short-slug # must answer "what data would I open this for"
source: where the data came from (file / round / transcription method)
status: trust flag (official / estimated / model-transcribed, unchecked ...)
tags: [keyword, keyword]
---
hand-maintained: true. Readers then treat it as a hint, not as a machine-truth source. They re-verify every field against the record it points to.no-frontmatter.This skill deliberately embeds no precedents. Precedents belong to specific records and specific institutions. The project layer keeps a table with at least three columns: precedent, ruling, and origin. The precedent is what happened. The ruling is what to do next time. The origin is the record and the date.
version field and in the project layer's change log. A structural change also updates the completion checklist.The workflow is language-neutral. Set LANG in the project layer, then apply the conventions below.
| Concern | Chinese (zh) | English (en) |
|---|---|---|
| Paragraph wrapping | One paragraph per line, never hard-wrapped mid-sentence | Same |
| Joining rewrapped prose | No space between CJK characters, a single space otherwise | Single space |
| Punctuation | Full-width ,。:;「」 inside prose. The colon check in §11 targets **label:** | ASCII punctuation. The grep -P colon heuristic does not apply |
| Headings and tables | Chinese accepted inside headings and cells | English throughout |
| Bilingual records | Append in the record's existing language. A new standalone record may be monolingual | Same |
| Transliteration | Pinyin only for rare or easily misread characters | None |
| Quote marks | 「…」 in Chinese prose. Do not mix with "…" in one record | "…" or '…', consistently |
| Escapes | <3 → \<3. Standalone $ → \$ | Same |
| Traditional / Simplified | State which variant the record uses. Convert with a deterministic tool, never by hand | Not applicable |
This appendix aligns vocabulary. It does not add authority. The companion article Health Records an Agent Can Audit is a reference. It explains why the procedure exists and what it cannot do. This skill is the procedure. Where the article's shorthand and this skill differ, this skill wins. Nothing in either document is a medical device, official medical advice, a diagnosis, a prescription, or a treatment decision. The user carries the risk. If either document and a clinician disagree, the clinician wins.
Term map. The article names the rules informally. Use these sections.
| Article term | Where this skill defines it |
|---|---|
| Append-only data rows | §4 |
| Conflict protocol | §7 |
| Change gate | §7 |
| Exemption scope | §7 |
| Evidence five | §8 |
| Applicability | §6 (applicability check) |
| Attribution timeline | §6 (attribution gate) |
| Single copy | §13 steps 3–4; Appendix B |
| Derived-value arithmetic | §5 |
| Provenance stamp | §11 |
Shorthands that need a precise reading.
{{DOCS_DIR}} path templates and default docs/ and imgs/ folders. It carries no patient paths and no patient values.PROFILE names. AGENTS.example.md also carries a profile section, boundaries, and the completeness check; those are instructions, not patient data.references/AGENTS.example.md. It is a template, not an active authority file. Copy it, or point AUTHORITY at an existing rules file.AGENTS.md section that AUTHORITY names. The nine keys live in one place, not both.Precision notes.
hand-maintained: true. Readers re-verify every field against the record. Appendix B.low-confidence. A missing element of the citation trio also demotes it to low-confidence. A demoted claim goes to clinician review. §8.AGENTS.example.md §2–§6.