Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

scikit-survival Survival Analysis Workflow

An expert skill for building, tuning, evaluating, and reporting right-censored and competing-risk survival models with scikit-survival, without data leakage.

Data & AnalyticsAdvanced33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

  • Enforces correct outcome construction: structured arrays via Surv.from_arrays (boolean event first, float time second), plus integer status coding (0=censored, 1..K=causes) for competing risks.
  • Provides a leakage-safe workflow: split before any learned transform, keep imputers/encoders/scalers inside a Pipeline, and tune with nested CV or a truly untouched holdout.
  • Model selection guidance across Cox PH, Coxnet (LASSO/elastic-net), IPCRidge (AFT), Random Survival Forest / ExtraSurvivalTrees, Gradient Boosting, and Survival SVMs — including what each predict actually returns.
  • Explicit metric contracts: Uno's C and cumulative/dynamic AUC take higher-is-riskier scores; Brier/IBS take survival probabilities shaped (n_test, n_times); censoring distributions are fit on training outcomes only.
  • Competing-risk CIF computation and a warning against the common 1 - Kaplan-Meier mistake.
  • Bundled offline CLIs for CSV validation, training, metric evaluation, CIF, and Markdown report generation.

Who it's for

  • Data scientists and biostatisticians working with clinical, epidemiological, or trial data.
  • ML engineers modeling time-to-event outcomes such as churn, hardware failure, or relapse.
  • Anyone who must document a defensible, reproducible evaluation protocol for review or publication.

Example uses

  1. "Train a Cox PH model on this patient CSV and produce a report with Uno's C, dynamic AUC, and IBS" → validate → train/tune → evaluate → model-report.md.
  2. "Use Coxnet for feature selection on high-dimensional omics data and plot survival curves" → set fit_baseline_model=True and tune l1_ratio/alpha with nested CV.
  3. "Compute cause-specific cumulative incidence when patients die of multiple competing causes" → integer status coding, then cumulative_incidence_competing_risks.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/scikit-survival/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/scikit-survival folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/scikit-survival/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/scikit-survival ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and go to your working directory.
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r scientific-agent-skills/skills/scikit-survival ~/.claude/skills/
  5. Set up Python (requires uv and Python 3.11+): uv venv --python 3.11 && source .venv/bin/activate
  6. Install the verified stack: uv pip install "scikit-survival==0.28.0" "scikit-learn==1.9.0" (see SKILL.md for the full pinned list).
  7. Restart Claude Code and ask for a "survival analysis with scikit-survival" task to confirm the skill activates.
  8. Note: upstream scikit-survival is GPL-3.0-or-later; review licensing before redistribution.