Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/realactivity/tula/med-pdfnpx skills add realactivity/tula --skill med-pdfgit clone --depth 1 https://github.com/realactivity/tulaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/realactivity/tula/med-pdf)<a href="https://agentmods.dev/skills/realactivity/tula/med-pdf"><img src="https://agentmods.dev/badge/skills/realactivity/tula/med-pdf.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00096 | $0.00930 |
| Opus 5 | $0.00048 | $0.00465 |
| Sonnet 5 | $0.00019 | $0.00186 |
| Haiku 4.5 | $0.00010 | $0.00093 |
Grade A, and why
med-pdf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
med-pdf
When to Use
✅ Use when:
- The user sends a medical PDF (labs, radiology, discharge, pathology)
- The user shares a screenshot/image of clinical results
- The user asks to compare results across visits or trend a value
- A MyChart/Epic export needs parsing before reasoning
When NOT to Use
❌ Don't use when:
- The PDF is non-medical (insurance, EOB, billing)
- The user wants to author a clinical message -> use
epic-note - Anything that would send PHI outside the workspace
Setup
Profile. Resolve from the precedence in
references/profile-schema.md
(skill config -> env var -> ~/.openclaw/workspace/memory/profile.yaml).
Use identity.short_name when addressing the user in summaries.
The skill never contains the profile.
Workflow
-
Extract -
node {baseDir}/scripts/extract.mjs <input.pdf> <outDir>outDirmust be inside~/.openclaw/workspace/. Suggested:~/.openclaw/workspace/.med-pdf-cache/<slug>/.- Outputs
text.txt,pageN.png,meta.json. Stdout JSON hasnumPages,hasText,textChars.
-
Branch on
hasText:true-> skip OCR, feedtext.txtto parsers.false-> image-only (MyChart/Epic). Use theimagetool onpageN.pngfor verbatim transcription. Save astext.txt, continue.
-
Parse:
- Imaging ->
node {baseDir}/scripts/parse_imaging.mjs <outDir> - Labs ->
node {baseDir}/scripts/parse_labs.mjs <outDir> - Both can run on a mixed document.
- Imaging ->
-
Reason. Pull abnormal flags, compare to prior values, surface what matters for healthspan - see
references/healthspan-priorities.md. Don't just summarize. -
Persist. Append to
~/.openclaw/workspace/memory/YYYY-MM-DD.mdand update trends inMEMORY.md. PHI stays in workspace memory only.
Scripts
See references/scripts.md for per-script flags,
output schemas, and dictionary maintenance for parse_labs.mjs.
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 95 lines · 96 tokens per session scan A d958dd2a0af9
med-pdf is a skill published in the GitHub repository realactivity/tula (45 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 96 tokens to every session and 930 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
lab-report-walkthrough
Walk a person through their lab report — read the original document, organize results by panel, flag out-of-range values against the printed reference ranges, compare with their history, and explain in plain language. Use when the user uploads a lab report (PDF/image) or asks what their blood test results mean.
emergency-card
生成紧急情况下快速访问的医疗信息摘要卡片。当用户需要旅行、就诊准备、紧急情况或询问"紧急信息"、"医疗卡片"、"急救信息"时使用此技能。提取关键信息(过敏、用药、急症、植入物),支持多格式输出(JSON、文本、二维码),用于急救或快速就医。.
wes-clinical-report-es
Generates professional clinical PDF reports in Spanish from WES (Whole Exome Sequencing) data with clinical interpretation, pharmacogenomic alerts, and follow-up recommendations.
wes-clinical-report-en
Generates professional clinical PDF reports in English from WES (Whole Exome Sequencing) data with clinical interpretation summary, pharmacogenomic alerts, and follow-up recommendations.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.