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/hannesill/m4/m4-setupnpx skills add hannesill/m4 --skill m4-setupgit 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-setup)<a href="https://agentmods.dev/skills/hannesill/m4/m4-setup"><img src="https://agentmods.dev/badge/skills/hannesill/m4/m4-setup.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.00044 | $0.00932 |
| Opus 5 | $0.00022 | $0.00466 |
| Sonnet 5 | $0.00009 | $0.00186 |
| Haiku 4.5 | $0.00004 | $0.00093 |
Grade A, and why
m4-setup 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 — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
M4 Setup And Repair
Use this skill when the M4 environment looks incomplete, a dataset is missing, skills are stale, or vitrine is unavailable.
When to Use This Skill
from m4 import ...fails or the wrong Python environment is activelist_datasets()orm4 status --alldoes not show expected datasets- M4 skills are missing, stale, or inconsistent across tools
- DuckDB/BigQuery backend configuration is wrong
vitrineimports fail or the display server is not reachable
Fast Diagnostics
Run commands from the M4 repo root unless the user is intentionally working elsewhere.
pwd
uv run python - <<'PY'
from m4 import list_datasets
print("datasets:", list_datasets())
PY
uv run m4 status --all
uv run m4 agent-env --dataset mimic-iv-demo --json
uv run m4 skills --list
uv run vitrine status
If plain python cannot import m4, use uv run python; M4 is usually installed in the project virtual environment.
Dataset Checks
Expected built-in datasets:
| Dataset | Notes |
|---|---|
mimic-iv-demo |
Local demo tabular dataset |
mimic-iv |
MIMIC-IV tabular data and derived tables |
mimic-iv-note |
MIMIC-IV notes |
eicu |
eICU tabular data |
Custom datasets live under the M4 data directory in datasets/*.json and should
appear in m4 status --all. By default the data directory is m4_data; if
M4_DATA_DIR is set, it must point directly at the data directory.
Common checks:
uv run m4 agent-env --json
M4_CONFIG_DIR="${M4_HOME:-${M4_DATA_DIR:-m4_data}}"
cat "$M4_CONFIG_DIR/config.json"
find "${M4_DATA_DIR:-m4_data}/databases" -maxdepth 1 -type f -name '*.duckdb' -print
find "${M4_DATA_DIR:-m4_data}/datasets" -maxdepth 1 -type f -name '*.json' -print
Pass dataset="name" when querying, then inspect schema with get_schema(dataset=...) and get_table_info(..., dataset=...).
Skill Installation Repair
The canonical bundled skills are under src/m4/skills. Installed tool directories are generated copies.
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.
- 4d ago First seen · 108 lines · 44 tokens per session scan A 835e7a1c75d7
m4-setup is a skill published in the GitHub repository hannesill/m4 (43 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 932 once invoked, about $0.0002 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
screen_lock
Password-lock the machine's screen while every process keeps running.
drone_commands
Execute drone commands -- the AIPass CLI interface for all module operations.
system_status
Check system health -- disk usage, memory, running processes, uptime.
branch_health
Quick health check -- test counts and file stats for AIPass branches.
heartbeat
Lightweight system health monitoring skill.
system-info
Get system information including CPU usage, memory, disk space, battery status, and network info. Read-only and safe to use.