Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

scikit-survival Workflow Skill

An expert-level guide for building, tuning, and auditing right-censored and competing-risk survival models with scikit-survival.

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

What it does

Covers the full survival-analysis lifecycle against scikit-survival 0.28.0:

  • Correct outcome construction: structured (event bool, time float) arrays via Surv.from_arrays / Surv.from_dataframe
  • Leakage-safe pipelines: split first, fit imputers/encoders/scalers only on training folds inside a ColumnTransformer
  • Model selection: Cox PH, Coxnet, IPCRidge, Random Survival Forest, Gradient Boosting, Survival SVMs — with each model's prediction semantics and limits
  • Metric contracts: Harrell/Uno C-index and dynamic AUC take risk scores; Brier score and IBS take survival probabilities shaped (n_test, n_times)
  • Competing risks: nonparametric cause-specific CIF, plus explicit warnings against misusing 1 - Kaplan-Meier
  • Five bundled local CLIs: CSV validation, training, metric evaluation, CIF, and Markdown reporting — network-free by default

Who it's for

  • Clinical, epidemiological, and biostatistics researchers building prognostic models
  • Data scientists working on time-to-event problems (churn, time-to-failure, relapse)
  • Anyone who needs reproducible, defensible modeling procedures for papers or audits
  • Less suitable if you lack a background in censoring and survival statistics

Examples

  1. Cox model on a clinical cohort: "Build a CoxPH pipeline from this CSV, tune alpha with nested CV, and report Uno's C and IBS" — the skill enforces split-before-preprocess and training-only censoring estimation.
  2. Competing-risk incidence: "Two causes of death here — plot cause-specific cumulative incidence" — guides integer status coding (0=censored, 1..K) and CIF row layout.
  3. Automated report: chain train_survival_model.pyevaluate_survival_metrics.pymodel_report.py to produce a Markdown model report.

· · · Install guide · · ·

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 /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/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 move to the folder where you keep tools.
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Copy the skill into Claude's skills folder: mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/scikit-survival ~/.claude/skills/
  4. Confirm Python 3.11 or newer: python3 --version
  5. Create and activate a virtual environment: uv venv --python 3.11 && source .venv/bin/activate (install uv first with pip install uv if needed).
  6. Install the pinned stack: uv pip install "scikit-survival==0.28.0" "scikit-learn==1.9.0" plus the numpy/pandas/scipy pins listed in the skill.
  7. Restart Claude Code and trigger it with prompts like "fit a survival model on this dataset" or "evaluate with time-dependent AUC".
  8. Note: upstream scikit-survival is GPL-3.0-or-later — review licensing before redistributing anything built on it.