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 m4-apigit 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/m4-api)<a href="https://agentmods.dev/skills/hannesill/m4/m4-api"><img src="https://agentmods.dev/badge/skills/hannesill/m4/m4-api/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/m4-api"><img src="https://agentmods.dev/badge/skills/hannesill/m4/m4-api.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.00000 | $0.01658 |
| Opus 5.5 | $0.00000 | $0.00663 |
| Sonnet 5.5 | $0.00000 | $0.00332 |
| Haiku 4.5 | $0.00000 | $0.00166 |
Grade A, and why
m4-api 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 — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
M4 Python API
Every call names its dataset; M4 keeps no active dataset.
Every query
- Check which datasets are ready:
m4 list-datasets --json("prepared": true) orm4 status --all.list_datasets()returns every dataset M4 knows, downloaded or not. Adding data (m4 init,m4 download) needs the user's data access, so ask them first. - Find the tables and columns, then query with schema-qualified names:
from m4 import M4Client
db = M4Client(dataset="mimic-iv-demo")
db.schema()["tables"] # ["mimiciv_hosp.admissions", ...]
db.table_info("mimiciv_icu.icustays")["schema"] # columns (name, type); ["sample"] holds rows
df = db.query("""
SELECT first_careunit, COUNT(*) AS stays
FROM mimiciv_icu.icustays
GROUP BY first_careunit
ORDER BY stays DESC
""") # pandas DataFrame
execute_query(sql, dataset=...), get_schema(dataset=...), and
get_table_info(table, dataset=...) do the same without a client. From the shell:
m4 query --dataset mimic-iv-demo --sql "SELECT ...".
A query returns every row it selects: aggregate in SQL and keep row-level results in DataFrames, not in the conversation.
Datasets
| Dataset | Schemas | Access |
|---|---|---|
mimic-iv-demo |
mimiciv_hosp, mimiciv_icu |
open, 100 patients |
mimic-iv |
mimiciv_hosp, mimiciv_icu; mimiciv_derived after m4 init-derived |
credentialed |
mimic-iv-note |
mimiciv_note, for the notes functions only |
credentialed |
mimic-iv-ed-demo |
mimiciv_ed |
open, the MIMIC-IV demo's 100 patients |
mimic-iv-ed |
mimiciv_ed |
credentialed |
eicu-demo |
eicu_crd, as in eicu |
open, over 2,500 unit stays |
eicu |
eicu_crd (eicu_crd.patient, never bare patient) |
credentialed |
mimic-iii |
mimiciii_clinical |
credentialed |
mimic-cxr-jpg |
mimic_cxr: metadata, split, chexpert, negbio, test_labels, images |
credentialed, with a DUA of its own |
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 · +32 lines eef4cc6794d8
- 1mo ago Changed · +5 lines ca6eb4cb31e6
- 1mo ago Changed · -91 lines · -38 tokens per session a0f81fe08454
- 2mo ago Changed · +1 lines 4adec078945c
- 3mo ago First seen · 168 lines · 38 tokens per session scan A a6ae7b2497b3
m4-api is a skill published in the GitHub repository hannesill/m4 (53 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,658 tokens. 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.
m4-api compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| m4-apihannesill/m4 | Skill | 53 | 1mo ago | MIT | A | 0 | Claude Code, Codex |
| tooluniverse-protein-structure-predictionmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 71 | Claude Code |
| tooluniverse-single-cellmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 146 | Claude Code |
| tooluniverse-enzyme-designmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 85 | Claude Code |
| tooluniverse-protein-sae-variant-interpretationmims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 144 | Claude Code |
| tooluniverse-proteomics-analysismims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 76 | Claude Code |
| tooluniverse-spatial-omics-analysismims-harvard/ToolUniverse | Skill | 1.8k | yesterday | Apache-2.0 | A | 97 | Claude Code |