Agent skill

Scikit Survival

by aipoch in aipoch/medical-research-skills

A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or…

MITAuto-check passedData & Analytics

Install Scikit Survival

skills CLI
$ npx skills add aipoch/medical-research-skills --skill scikit-survival -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills scikit-survival --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'scientific-skills/Data Analysis/scikit-survival' .claude/skills/scikit-survival && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scikit-survival
GitHub stars
2k
Token cost
~1.6k tokens
SKILL.md length
360 words
Files
8 (incl. references)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or…

  • Works in 6 steps: Survival Target Representation (Surv) → Model Selection Heuristics → Preprocessing Requirements → …
  • You need to model censored time-to-event outcomes
  • SKILL.md covers When to Use, Key Features, Dependencies and Example Usage, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Scikit Survival is an agent skill from aipoch/medical-research-skills. A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or Survival SVMs, evaluate with C-index/Brier score, or handle competing risks.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/competing-risks.md`, `references/cox-models.md` and `references/data-handling.md`).

It sits in Data & Analytics. It works with Python and scikit-learn. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • You need to model censored time-to-event outcomes
  • Fit Cox/RSF/GB models
  • Evaluate with C-index/Brier score
  • Handle competing risks

Example prompts

  • “/scikit-survival”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Survival Target Representation (Surv)
  2. Model Selection Heuristics
  3. Preprocessing Requirements
  4. Evaluation Under Censoring
  5. Time-dependent Metrics (AUC, Brier/IBS)
  6. Competing Risks (Cumulative Incidence)

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scikit Survival loads about 1.6k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 72 tokens; SKILL.md has 360 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 360 words, ~1,635 tokens.

Download SKILL.mdSave it as .claude/skills/scikit-survival/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
scikit-survival
description
A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or Survival SVMs, evaluate with C-index/Brier score, or handle competing risks.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

When to Use

Use this skill when you need to:

  1. Model time-to-event outcomes with censoring (right/left/interval censored observations).
  2. Fit and interpret Cox Proportional Hazards models (including penalized Cox for high-dimensional data).
  3. Train non-linear survival models such as Random Survival Forests or Gradient Boosting survival models.
  4. Use Survival SVMs for margin-based survival prediction (linear or kernel).
  5. Evaluate survival predictions with censoring-aware metrics (Uno/Harrell C-index, time-dependent AUC, Brier/Integrated Brier Score) and/or perform competing risks analysis.

Key Features

  • Survival target construction via sksurv.util.Surv (arrays or DataFrame).
  • Model families
    • Cox models: CoxPHSurvivalAnalysis, CoxnetSurvivalAnalysis
    • Ensembles: RandomSurvivalForest, GradientBoostingSurvivalAnalysis, ExtraSurvivalTrees
    • SVM-based: FastSurvivalSVM, FastKernelSurvivalSVM
  • Non-parametric estimators: Kaplan–Meier and Nelson–Aalen.
  • Competing risks: cumulative incidence estimation.
  • scikit-learn compatibility: pipelines, cross-validation, and GridSearchCV with survival scorers.
  • Evaluation utilities: IPCW-based metrics (e.g., Uno’s C-index) and calibration-aware scores (IBS).

Additional topic guides may exist under:

  • references/cox-models.md
  • references/ensemble-models.md
  • references/svm-models.md
  • references/data-handling.md
  • references/evaluation-metrics.md
  • references/competing-risks.md

Dependencies

  • scikit-survival (recommended: >=0.22)
  • scikit-learn (recommended: >=1.2)
  • numpy (recommended: >=1.23)
  • pandas (recommended: >=1.5)

Example Usage

A complete, runnable example using a scikit-survival built-in dataset, a scikit-learn pipeline, and Uno’s C-index (IPCW):

python
import numpy as np

from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler

from sksurv.datasets import load_breast_cancer
from sksurv.linear_model import CoxPHSurvivalAnalysis
from sksurv.metrics import concordance_index_ipcw, as_concordance_index_ipcw_scorer

# 1) Load data (X: features, y: structured array with fields like ('event', 'time'))
X, y = load_breast_cancer()

# 2) Split (keep y_train for IPCW-based metrics)
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42
)

# 3) Build a pipeline (scaling is important for many survival models)
pipe = Pipeline([
    ("scaler", StandardScaler()),
    ("model", CoxPHSurvivalAnalysis()),
])

# 4) Optional: hyperparameter tuning (CoxPH has few knobs; shown for workflow completeness)
# If your version exposes regularization parameters, tune them here.
param_grid = {
    # Example placeholder; remove if unsupported in your installed version:
    # "model__alpha": [0.0, 1e-4, 1e-3]
}

if param_grid:
    search = GridSearchCV(
        pipe,
        param_grid=param_grid,
        scoring=as_concordance_index_ipcw_scorer(),
        cv=5,
        n_jobs=-1,
    )
    search.fit(X_train, y_train)
    best = search.best_estimator_
else:
    best = pipe.fit(X_train, y_train)

# 5) Predict risk scores (higher typically means higher risk / shorter survival)
risk_scores = best.predict(X_test)

# 6) Evaluate with Uno's C-index (IPCW)
c_uno = concordance_index_ipcw(y_train, y_test, risk_scores)[0]
print(f"Uno's C-index (IPCW): {c_uno:.3f}")

Implementation Details

1) Survival Target Representation (Surv)

scikit-survival expects outcomes as a structured array with at least:

  • an event indicator (boolean)
  • a time value (float/int)

Common construction patterns:

python
from sksurv.util import Surv

y = Surv.from_arrays(event=event_array, time=time_array)
# or
y = Surv.from_dataframe("event", "time", df)
Show full SKILL.md (156 more words)Show less
2) Model Selection Heuristics
  • High-dimensional (p > n): prefer CoxnetSurvivalAnalysis (Elastic Net) for stability and feature selection.
  • Interpretability required: prefer CoxPHSurvivalAnalysis (coefficients as log hazard ratios).
  • Strong non-linearities / interactions: prefer RandomSurvivalForest or GradientBoostingSurvivalAnalysis.
  • Kernelized decision boundaries: consider FastKernelSurvivalSVM (ensure scaling).
3) Preprocessing Requirements
  • Scaling: strongly recommended for SVMs and often beneficial for penalized Cox models.
  • Categoricals: encode (e.g., one-hot) before fitting most estimators.
  • Data validation: ensure non-negative times; verify enough events relative to feature count.
4) Evaluation Under Censoring
  • Harrell’s C-index (concordance_index_censored): common, but can be less robust with heavy censoring.
  • Uno’s C-index (concordance_index_ipcw): uses inverse probability of censoring weights and requires y_train to estimate censoring distribution.
python
from sksurv.metrics import concordance_index_censored, concordance_index_ipcw

c_harrell = concordance_index_censored(y_test["event"], y_test["time"], risk_scores)[0]
c_uno = concordance_index_ipcw(y_train, y_test, risk_scores)[0]
5) Time-dependent Metrics (AUC, Brier/IBS)
  • Time-dependent AUC evaluates discrimination at specific time horizons.
  • Brier score / Integrated Brier Score (IBS) evaluates calibration + discrimination over time and requires survival probabilities/functions.
python
from sksurv.metrics import cumulative_dynamic_auc

times = np.array([365, 730, 1095])  # example horizons
auc, mean_auc = cumulative_dynamic_auc(y_train, y_test, risk_scores, times)
6) Competing Risks (Cumulative Incidence)

Use competing risks methods when multiple mutually exclusive event types exist and one event prevents the others.

python
from sksurv.nonparametric import cumulative_incidence_competing_risks

# y must encode event types appropriately for competing risks workflows
time_points, cif1, cif2 = cumulative_incidence_competing_risks(y)

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in scientific-skills/Data Analysis/scikit-survival of aipoch/medical-research-skills.

  • SKILL.md
  • references/competing-risks.md
  • references/cox-models.md
  • references/data-handling.md
  • references/ensemble-models.md
  • references/evaluation-metrics.md
  • references/svm-models.md
  • scikit-survival_audit_result_v1.json

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Scikit Survival next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scikit Survival compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scikit Survival this skillaipoch/medical-research-skills2k—~1.6kAutomated safety check: PassMIT
Scikit LearnzLanqing/codex-claude-academic-skills4.6k17 repos~3.9kAutomated safety check: PassBSD-3-Clause
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
Senior Data ScientistRaidriar7170/hermes-skilleval1256 repos~1.4kAutomated safety check: PassMIT
Statistical Data Analysislingzhi227/agent-research-skills384—~886Automated safety check: PassNone
Time Series Analytics Useropen-edge-platform/edge-ai-libraries169—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 9 days ago
    Data & AnalyticsAuto-check passed
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 6 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Statistical Data Analysis

    lingzhi227/agent-research-skills

    Writes statistical analysis code for experimental data, runs it through a four-round review, and reports effect sizes, p-values and confidence intervals.

    384 GitHub stars~886 tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Time Series Analytics User

    open-edge-platform/edge-ai-libraries

    Build a new time-series analytics use case on top of the deployed Time Series Analytics microservice — bring it up with Docker Compose (from a repo clone, or by fetching the compose files from…

    169 GitHub stars~3.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Aeon Time Series Machine Learning

    davila7/claude-code-templates

    Guides time series machine learning with the aeon toolkit: classification, regression, clustering, forecasting, anomaly detection, segmentation and similarity search.

    32k GitHub starsUsed in 14 repos~2.6k tokens
    Data & AnalyticsAuto-check passed

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Questions about Scikit Survival

What does Scikit Survival do?

A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or…. Scikit Survival is an agent skill from aipoch/medical-research-skills. A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or Survival SVMs, evaluate with C-index/Brier score, or handle competing risks.

When should I use Scikit Survival?

Scikit Survival fits situations like: you need to model censored time-to-event outcomes; fit Cox/RSF/GB models; evaluate with C-index/Brier score; handle competing risks.

How do I install Scikit Survival in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill scikit-survival -a claude-code`. Or copy the skill folder (scientific-skills/Data Analysis/scikit-survival in aipoch/medical-research-skills) into .claude/skills/scikit-survival in your project. Claude Code loads it when a task matches its description.

How do I install Scikit Survival in Codex?

Run `npx skills add aipoch/medical-research-skills --skill scikit-survival -a codex`. Or copy the skill folder (scientific-skills/Data Analysis/scikit-survival in aipoch/medical-research-skills) into .agents/skills/scikit-survival in your project. Codex loads it when a task matches its description.

Can I use Scikit Survival in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill scikit-survival -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scikit-survival, .gemini/skills/scikit-survival, .github/skills/scikit-survival and .opencode/skills/scikit-survival in your project.

What does Scikit Survival need to run?

SKILL.md names no scripts, command-line tools or credentials: Scikit Survival is instructions for the agent only. Our summary lists: Python 3.

Does Scikit Survival access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Scikit Survival safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Scikit Survival use?

Scikit Survival is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scikit Survival use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 16k tokens, read only when the agent opens those files.

What are the alternatives to Scikit Survival?

Skills that share tags, products or a category with Scikit Survival: Scikit Learn (zLanqing/codex-claude-academic-skills, 4.6k stars), TimesFM Forecasting (google-research/timesfm, 34k stars), Senior Data Scientist (Raidriar7170/hermes-skilleval, 125 stars) and Statistical Data Analysis (lingzhi227/agent-research-skills, 384 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scikit Survival?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.