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 hfrsgit 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/hfrs)<a href="https://agentmods.dev/skills/hannesill/m4/hfrs"><img src="https://agentmods.dev/badge/skills/hannesill/m4/hfrs.svg" alt="Measured on agentmods" 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.00061 | $0.00949 |
| Opus 5 | $0.00030 | $0.00475 |
| Sonnet 5 | $0.00012 | $0.00190 |
| Haiku 4.5 | $0.00006 | $0.00095 |
Grade A, and why
hfrs 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 8d 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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hospital Frailty Risk Score (HFRS)
Calculate HFRS from ICD diagnosis codes. Based on Gilbert et al. (2018) Lancet methodology with 109 weighted ICD-10 codes.
When to Use This Skill
- Assessing frailty in ICU or hospitalized patients
- Risk stratification for older adults
- Predicting 30-day mortality, prolonged length of stay, or readmission
- Research requiring a validated frailty metric from administrative data
Methodology
Per the original publication, HFRS is calculated using diagnoses from:
- The current (index) admission
- All emergency admissions in the preceding 2 years
Each unique ICD code is counted only once, even if it appears in multiple admissions.
Risk Categories
| Score | Category | 30-day Mortality OR |
|---|---|---|
| < 5 | Low | Reference |
| 5-15 | Intermediate | 1.65 (1.62-1.68) |
| > 15 | High | 1.71 (1.68-1.75) |
Critical Implementation Notes
-
ICD-9 mappings are NOT part of the original publication. They have been added for MIMIC-IV compatibility, which contains both ICD-9 and ICD-10 coded admissions. Use ICD-9 mappings with appropriate caution.
-
Emergency admission types in MIMIC-IV: The SQL implementation considers
EMERGENCY,URGENT, andEW EMER.as emergency admissions. -
Code matching uses 3-character prefix for ICD-10 (e.g.,
F05matchesF05.0,F05.1). ICD-9 uses variable-length matching.
Top Contributing Codes
| ICD-10 | Points | Description |
|---|---|---|
| F00 | 7.1 | Dementia in Alzheimer's |
| G81 | 4.4 | Hemiplegia |
| G30 | 4.0 | Alzheimer's disease |
| I69 | 3.7 | Sequelae of CVD |
| R29 | 3.6 | Tendency to fall |
| F05 | 3.2 | Delirium |
| N39 | 3.2 | UTI/incontinence |
| W19 | 3.2 | Unspecified fall |
Full 109-code list: references/hfrs_icd_codes.csv
Example Queries
Calculate HFRS for all admissions
-- See scripts/calculate_hfrs.sql for the complete query
-- Key tables used:
-- - mimiciv_hosp.admissions (admission dates and types)
-- - mimiciv_hosp.diagnoses_icd (ICD codes)
-- Simplified example: score a single admission
SELECT
a.subject_id,
a.hadm_id,
SUM(w.points) AS hfrs_score
FROM mimiciv_hosp.diagnoses_icd d
JOIN mimiciv_hosp.admissions a ON d.hadm_id = a.hadm_id
JOIN hfrs_weights w ON d.icd_code LIKE w.icd_prefix || '%'
AND d.icd_version = w.icd_version
GROUP BY a.subject_id, a.hadm_id;
What ships with it
5 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.
- 8d ago First seen · 97 lines · 61 tokens per session scan A 04a2e37a3b6e
hfrs is a skill published in the GitHub repository hannesill/m4 (43 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 949 once invoked, about $0.0003 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
arbor-agent-orchestrator
Top-level controller for recreating the open-source AutoResearch workflow as a suite of skills. Use when the user asks to run, emulate, extract, validate, or refine Arbor/AutoResearch behavior, especially when a coordinator must load phase skills for setup, ideation, executors, merge evaluation, novelty search…
dfam-check
Measure mesh files against Design for Additive Manufacturing (DfAM) rules and report printability findings per process (FDM, SLS, SLA/DLP, metal PBF, MJF). Use when the user asks whether a part is printable, wants overhang/wall-thickness/support analysis of an .stl, .obj, .ply, or .3mf mesh, wants a build-orientation…
tooluniverse-gene-enrichment
Gene-set enrichment analysis — GO (Biological Process, Molecular Function, Cellular Component), KEGG, Reactome pathway enrichment via clusterProfiler, gseapy, ORA, GSEA. Use for interpreting DEG lists, screen hit lists, or any gene-list-to-pathways query. Includes simplify-cutoff handling and union-vs-total…
tooluniverse-phylogenetics
Phylogenetic analysis — de novo multiple sequence alignment (Clustal Omega/MUSCLE/MAFFT via EBImsaalign) and neighbour-joining/UPGMA tree building (EBIbuildphylogenetictree) from your own sequences, plus tree analysis, treeness, saturation (PhyKIT), parsimony-informative sites, alignment gap analysis, DVMC…
tooluniverse-variant-analysis
VCF and variant analysis — parsing, annotation, classification (synonymous, missense, frameshift, stopgained), VAF filtering, coding vs non-coding categorization, multi-condition variant comparison. Use for VCF parsing, variant fraction calculations (denominator = coding subset only, NOT all variants), and per-sample…
tooluniverse-cell-line-profiling
Cancer cell-line selection and profiling for experimental model choice. Cross-references DepMap, Cellosaurus, COSMIC, PharmacoDB to deliver identity verification, mutation/CNV profile, gene dependencies, drug sensitivities, and druggable targets. Use to answer 'which cell line should I use for studying gene X?' or 'is…