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 skills add hannesill/m4 --skill mimic-table-relationshipsgit clone --depth 1 https://github.com/hannesill/m4Wrote 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/hannesill/m4/mimic-table-relationships)<a href="https://agentmods.dev/skills/hannesill/m4/mimic-table-relationships"><img src="https://agentmods.dev/badge/skills/hannesill/m4/mimic-table-relationships/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hannesill/m4/mimic-table-relationships"><img src="https://agentmods.dev/badge/skills/hannesill/m4/mimic-table-relationships.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00056 | $0.01050 |
| Opus 5.5 | $0.00022 | $0.00420 |
| Sonnet 5.5 | $0.00011 | $0.00210 |
| Haiku 4.5 | $0.00006 | $0.00105 |
Grade A, and why
mimic-table-relationships 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 1mo 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MIMIC-IV Table Relationships
subject_id (patient) → hadm_id (hospital admission) → stay_id (ICU stay). One admission can hold several ICU stays, so each event needs the right key and a time window.
1. Join on the key the table is recorded under
| Key | Tables |
|---|---|
stay_id |
chartevents, inputevents, ingredientevents, outputevents, procedureevents, datetimeevents. Derived: vitalsign, gcs, urine_output, first_day_*, scores (sofa: stay_id + hr) |
hadm_id |
admissions, diagnoses_icd, procedures_icd, prescriptions, pharmacy, emar, services. Derived: charlson |
subject_id + time |
labevents, microbiologyevents, omr. Derived lab panels, one row per specimen: chemistry, complete_blood_count, bg, ... |
hadm_id is NULL for labs and cultures taken outside an admission, including ED draws before an ICU admission: 26% of labevents and 33% of microbiologyevents in the demo, and the derived lab panels inherit the NULLs. Join these on subject_id plus a time window; a hadm_id join drops them.
diagnoses_icd and procedures_icd have no time and repeat for every ICU stay of the admission.
2. Bound every event by the stay's time window
Without a window, a hadm_id or subject_id join copies each event to every ICU stay of the admission or patient. M4's first_day_lab uses intime - 6 h to intime + 24 h:
-- Highest creatinine (itemid 50912) from 6 h before to 24 h after ICU admission
SELECT ie.stay_id, MAX(le.valuenum) AS creatinine_max
FROM mimiciv_icu.icustays ie
LEFT JOIN mimiciv_hosp.labevents le
ON le.subject_id = ie.subject_id
AND le.itemid = 50912
AND le.charttime >= ie.intime - INTERVAL 6 HOUR
AND le.charttime <= ie.intime + INTERVAL 1 DAY
GROUP BY ie.stay_id;
Put the window in the LEFT JOIN ... ON clause to keep stays without a value. Back-to-back stays can have overlapping windows, so one lab can count for both; that is intended for per-stay features.
Check a join for duplication:
SELECT COUNT(*) AS joined_rows,
COUNT(*) - COUNT(DISTINCT le.labevent_id) AS duplicated_rows
FROM mimiciv_icu.icustays ie
JOIN mimiciv_hosp.labevents le ON le.hadm_id = ie.hadm_id; -- unbounded: duplicates
What ships with it
1 file 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.
- 1mo ago Changed · -115 lines · +20 tokens per session 32be4507039f
- 2mo ago Changed · +1 lines da7a2aeede8e
- 3mo ago First seen · 189 lines · 36 tokens per session scan A 64e4c0dcce83
mimic-table-relationships is a skill published in the GitHub repository hannesill/m4 (52 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 1,050 once invoked, about $0.0002 per session on Opus 5.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.
mimic-table-relationships compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mimic-table-relationshipshannesill/m4 | Skill | 52 | 1mo ago | MIT | A | 56 | Claude Code, Codex |
| arbor-agent-orchestratorRUC-NLPIR/Arbor | Skill | 1.2k | 27d ago | Apache-2.0 | A | 77 | Claude Code, Codex |
| embeddingsruvnet/ruflo | Skill | 83k | today | MIT | A | 62 | Claude Code |
| migration-reviewrohitg00/ai-engineering-from-scratch | Skill | 81k | today | MIT | A | 35 | Claude Code |
| tooluniverse-phylogeneticsmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 155 | Claude Code |
| tooluniverse-cancer-variant-interpretationmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 93 | Claude Code |
| tooluniverse-cell-line-profilingmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 100 | Claude Code |