survminer

survminer is a skill for Claude Code, Codex from LeoLin990405/r-analytics-skill. It costs 24 tokens per session (1,194 once invoked), scanned A, original, MIT.

An R guide for creating charts of survival data, which shows how long it takes for an event to happen, such as recovery or equipment failure.

In plain words
What is it for?
Use it to create Kaplan-Meier plots, forest plots, grouped or combined survival charts, and publication-ready visualizations.
Why use it?
It helps you compare groups and present survival results with confidence ranges, risk tables, median survival times, and statistical values.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create Kaplan-Meier plots, forest plots, grouped or combined survival charts, and publication-ready visualizations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/survminer
Install

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.

Any agent
npx skills add LeoLin990405/r-analytics-skill --skill survminer
Clone the repo
git clone --depth 1 https://github.com/LeoLin990405/r-analytics-skill

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for survminer

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/survminer.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/survminer)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/survminer"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/survminer.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.01194
Opus 5 $0.00012 $0.00597
Sonnet 5 $0.00005 $0.00239
Haiku 4.5 $0.00002 $0.00119

Measured 4d ago against content hash 46bf4318e142, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

survminer 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.

sub-skills/r-ml/r-ml-survival/survminer/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

survminer

Publication-ready survival analysis plots.

Kaplan-Meier Plots

library(survminer)
library(survival)

# Fit survival
fit <- survfit(Surv(time, status) ~ sex, data = lung)

# Basic plot
ggsurvplot(fit, data = lung)

# With confidence intervals
ggsurvplot(fit, data = lung, conf.int = TRUE)

# With risk table
ggsurvplot(fit, data = lung, risk.table = TRUE)

# With p-value
ggsurvplot(fit, data = lung, pval = TRUE)

# With median survival
ggsurvplot(fit, data = lung, surv.median.line = "hv")

Customization

ggsurvplot(fit, data = lung,
  # Colors
  palette = c("#E7B800", "#2E9FDF"),

  # Line types
  linetype = "strata",

  # Confidence interval
  conf.int = TRUE,
  conf.int.style = "ribbon",

  # Risk table
  risk.table = TRUE,
  risk.table.col = "strata",

  # Labels
  legend.title = "Sex",
  legend.labs = c("Male", "Female"),
  xlab = "Time (days)",
  ylab = "Survival probability",

  # Theme
  ggtheme = theme_bw()
)

Faceted Plots

# Facet by variable
ggsurvplot_facet(fit, data = lung, facet.by = "ph.ecog")

# Multiple groups
ggsurvplot_list(list(fit1, fit2), data = lung)

# Combined plot
ggsurvplot_combine(list(fit1, fit2), data = lung)

Risk Tables

ggsurvplot(fit, data = lung,
  risk.table = TRUE,
  risk.table.height = 0.25,
  risk.table.y.text = FALSE,
  risk.table.title = "Number at risk",
  tables.theme = theme_cleantable()
)

# Cumulative events
ggsurvplot(fit, data = lung,
  cumevents = TRUE,
  cumcensor = TRUE
)

Cox Model Visualization

# Fit Cox model
cox_fit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, data = lung)

# Forest plot
ggforest(cox_fit, data = lung)

# Adjusted survival curves
ggadjustedcurves(cox_fit, data = lung, variable = "sex")

# Survival curves at specific covariate values
new_data <- data.frame(age = c(50, 70), sex = 1, ph.ecog = 1)
fit_cox <- survfit(cox_fit, newdata = new_data)
ggsurvplot(fit_cox, data = lung)

Statistical Tests

# Log-rank test
surv_diff <- survdiff(Surv(time, status) ~ sex, data = lung)

# Pairwise comparisons
pairwise_survdiff(Surv(time, status) ~ ph.ecog, data = lung)

# Add p-value to plot
ggsurvplot(fit, data = lung,
  pval = TRUE,
  pval.method = TRUE,
  log.rank.weights = "1"  # Log-rank
)

Read the full file on GitHub · 201 lines

Changes

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.

  1. 4d ago First seen · 201 lines · 24 tokens per session scan A 46bf4318e142

Subscribe to this mod's changes

survminer is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 1,194 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

advanced-string-structures

Build tries, Aho-Corasick, and suffix arrays with Kasai LCP to index DNA/text and match many patterns in one pass. Use for genome motif scanning, k-mer indexing, longest-repeat search, or BWA/FM-index groundwork.

Pavel-Kravchenko/Bioinformatics · 55 tokens

bio-applied-bio-data-formats

Parse/write FASTA, FASTQ, SAM/BAM, VCF, BED, GFF/GTF with pysam and pure Python; decode SAM FLAG/CIGAR; reconcile 0-based vs 1-based coordinates. Use for custom format parsers or off-by-one coordinate bugs.

Pavel-Kravchenko/Bioinformatics · 67 tokens

bio-applied-cancer-transcriptomics

Classify tumor RNA-seq into subtypes (melanoma Tirosh/Harbst on TCGA-SKCM): log1p/z-score, PCA/t-SNE, hierarchical clustering, random forest, Kaplan-Meier survival. Use when subtyping cBioPortal expression data.

Pavel-Kravchenko/Bioinformatics · 67 tokens

bio-applied-gene-regulatory-networks

Infer TF-target regulatory networks via correlation, ARACNE mutual information, and GENIE3 random-forest importance; find feed-forward loops; validate against TRRUST. Use when building a GRN or asked about GENIE3, ARACNE, or regulons.

Pavel-Kravchenko/Bioinformatics · 65 tokens

bio-applied-mageck-gene-essentiality

Run MAGeCK count/test on pooled CRISPR sgRNA screens, scoring gene essentiality via RRA, FDR, and log2 fold-change. Use when analyzing CRISPR screen FASTQ/count data, calling essential or drug-resistance genes, or benchmarking vs DepMap.

Pavel-Kravchenko/Bioinformatics · 69 tokens

bio-applied-molecular-evolution

Test Hardy-Weinberg equilibrium, simulate Wright-Fisher drift/selection, and compute dN/dS, Tajima's D, and Fst with NumPy/SciPy. Use for neutral theory, molecular clock divergence time, selection scans, or effective population size (Ne) questions.

Pavel-Kravchenko/Bioinformatics · 67 tokens