scikit-survival
Skill by K-Dense-AI
Guides building, evaluating and auditing survival workflows with scikit-survival 0.28.0. It targets right-censored outcomes and nonparametric competing-risk cumulative incidence, for researchers and data scientists.
Install scikit-survival
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/scikit-survival ~/.claude/skills/scikit-survivalRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/scikit-survival ~/.gemini/antigravity-cli/skills/scikit-survivalAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill guides survival analysis work with scikit-survival 0.28.0. It covers right-censored outcomes and models such as Cox PH, Coxnet, IPC ridge, survival trees, forests, boosting and SVMs. For competing risks, it covers nonparametric cumulative incidence only, and the source states that it does not provide Fine-Gray regression.
The skill sets out a fixed workflow: define the event coding, split data before any learned preprocessing, and fit preprocessing inside scikit-learn pipelines. It also covers nested tuning and censoring-aware metrics such as Uno C, cumulative dynamic AUC and Brier scores. Bundled command line helpers validate CSV data, train models and evaluate metrics locally, with no network calls by default. It is written for people doing time-to-event analysis, and the source says its outputs are not clinical advice.
Written from the project's SKILL.md and checked against it.
What it can do
- Outcome constructionBuilds structured right-censored outcomes with Surv from arrays or dataframes.
- Leakage-safe pipelinesFits imputers, encoders and scalers on training data only, inside scikit-learn pipelines.
- Model choice guidanceExplains Cox PH, Coxnet, IPC ridge, survival forests, boosting and SVM models and their outputs.
- Censoring-aware metricsCovers IPCW concordance, cumulative dynamic AUC, Brier score and integrated Brier score.
- Nested tuningWraps metrics as estimators for GridSearchCV with inner and outer cross-validation.
- Competing risksComputes nonparametric cumulative incidence with cumulative_incidence_competing_risks.
- Bundled CLIsRuns validate_survival_csv.py, train_survival_model.py and evaluate_survival_metrics.py locally.
What you need
- Python 3.11 or later
- uv
- scikit-survival 0.28.0 stack for executable examples
Try asking
- Build a Cox PH survival pipeline with leakage-safe preprocessing for my data.
- Compute the Uno C-index and integrated Brier score for my survival model.
- Estimate cumulative incidence for competing causes in my follow-up data.
Good to know
- Competing-risk support is nonparametric cumulative incidence only, with no Fine-Gray regression.
- scikit-survival 0.28 has no dedicated calibration-curve API.
- Upstream scikit-survival is GPL-3.0-or-later, while this skill is MIT-licensed.
- Outputs are not clinical advice, causal evidence or proof of clinical utility.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/scikit-survival/SKILL.md, skills/scikit-survival/scripts/_common.py, skills/scikit-survival/scripts/competing_risk_cif.py, skills/scikit-survival/scripts/evaluate_survival_metrics.py, skills/scikit-survival/scripts/model_report.py, skills/scikit-survival/scripts/train_survival_model.py, skills/scikit-survival/scripts/validate_survival_csv.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Write Edit Bash
-
SKILL.md16 KB -
references/competing-risks.md11 KB -
references/cox-models.md9 KB -
references/data-handling.md10 KB -
references/ensemble-models.md11 KB
Show all 13 files
-
references/evaluation-metrics.md15 KB -
references/svm-models.md10 KB -
scripts/_common.py15 KB -
scripts/competing_risk_cif.py12 KB -
scripts/evaluate_survival_metrics.py12 KB -
scripts/model_report.py11 KB -
scripts/train_survival_model.py19 KB -
scripts/validate_survival_csv.py6 KB
Alternatives to scikit-survival
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
scikit-survival: common questions
Does scikit-survival support competing risks?
Its built-in competing-risk support is nonparametric cumulative incidence. The source states it does not provide Fine-Gray regression.
Do the bundled scripts access the network?
The source says the bundled CLIs are local and network-free by default. They reject URLs and symlinks and avoid unsafe pickle loading.
Can this skill check calibration?
The source says calibration needs horizon-specific predicted-versus-observed checks on independent data, since scikit-survival 0.28 has no dedicated calibration-curve API.
How do I install scikit-survival?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is scikit-survival free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is scikit-survival safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to scikit-survival?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
