Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Complete survival analysis library in Python. Handles right-censored data, Kaplan-Meier curves, and Cox regression. Standard for clinical trial analysis and epidemiology.
.claude/skills/brycewang-stanford-lifelines/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 60% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -48% | 0% |
| case-01 | ✓→✓ | = Same ✓ | -5% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -2% | 0% |
In medicine, we often care about "Time to Event" (death, recovery, relapse). Lifelines handles the complexity of "censored" data (patients who left the study).
Patients who haven't experienced the event by the end of the study are "censored". Lifelines properly accounts for this.
In Cox regression, a hazard ratio > 1 means increased risk; < 1 means decreased risk.
Kaplan-Meier estimates the probability of survival over time without assuming a distribution.
pythonfrom lifelines import KaplanMeierFitter, CoxPHFitter from lifelines.statistics import logrank_test import pandas as pd
python# 1. Kaplan-Meier (Visualizing survival) kmf = KaplanMeierFitter() kmf.fit(durations=df['days'], event_observed=df['died']) kmf.plot_survival_function() kmf.median_survival_time_ # Time when 50% have died # 2. Cox Proportional Hazards (Risk factors) cph = CoxPHFitter() cph.fit(df, duration_col='days', event_col='died') cph.print_summary() # See hazard ratios for age, drug type, etc. cph.plot_partial_effects_on_outcome(covariates=['age'], values=[30, 50, 70])
cph.check_assumptions() to validate Cox model.pythonfrom lifelines.statistics import multivariate_logrank_test # Compare survival across treatment groups results = multivariate_logrank_test(df['days'], df['group'], df['died']) print(results.p_value)
pythonfrom lifelines import WeibullFitter, ExponentialFitter # When you need to extrapolate beyond observed data wf = WeibullFitter() wf.fit(df['days'], df['died']) wf.plot()
Lifelines transforms complex survival data into actionable medical insights, enabling evidence-based decisions in clinical research and practice.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 6,402 | 3,388 | -47% | 1 | 1 | 0% | 1,356 | 1,282 | -5% | 0 | 0 | — |
case-02 | pass→pass | 6,183 | 3,047 | -51% | 1 | 1 | 0% | 1,313 | 1,286 | -2% | 0 | 0 | — |
case-03 | pass→pass | 5,028 | 3,378 | -33% | 1 | 1 | 0% | 1,050 | 1,396 | +33% | 0 | 0 | — |
case-04 | pass→pass | 6,987 | 3,372 | -52% | 1 | 1 | 0% | 1,554 | 1,355 | -13% | 0 | 0 | — |
case-05 | pass→pass | 8,437 | 7,862 | -7% | 1 | 1 | 0% | 1,668 | 2,147 | +29% | 0 | 0 | — |
case-06 | pass→pass | 6,089 | 5,877 | -3% | 1 | 1 | 0% | 1,281 | 1,783 | +39% | 0 | 0 | — |
case-07 | fail→pass | 13,430 | 9,152 | -32% | 1 | 1 | 0% | 2,514 | 2,586 | +3% | 0 | 0 | — |
case-08 | fail→pass | 4,659 | 3,866 | -17% | 1 | 1 | 0% | 898 | 1,441 | +60% | 0 | 0 | — |
case-09 | fail→pass | 10,992 | 2,267 | -79% | 1 | 1 | 0% | 2,302 | 1,194 | -48% | 0 | 0 | — |
case-10 | pass→pass | 5,743 | 2,751 | -52% | 1 | 1 | 0% | 1,217 | 1,269 | +4% | 0 | 0 | — |
case-11 | pass→pass | 4,819 | 3,460 | -28% | 1 | 1 | 0% | 1,026 | 1,370 | +34% | 0 | 0 | — |
case-12 | pass→pass | 2,703 | 1,988 | -26% | 1 | 1 | 0% | 489 | 1,085 | +122% | 0 | 0 | — |
case-13 | pass→pass | 12,182 | 13,687 | +12% | 1 | 1 | 0% | 2,214 | 2,871 | +30% | 0 | 0 | — |
case-14 | pass→pass | 5,808 | 5,396 | -7% | 1 | 1 | 0% | 1,221 | 1,644 | +35% | 0 | 0 | — |
case-15 | pass→pass | 11,246 | 7,629 | -32% | 1 | 1 | 0% | 2,293 | 2,247 | -2% | 0 | 0 | — |
case-16 | pass→pass | 3,139 | 2,685 | -14% | 1 | 1 | 0% | 657 | 1,258 | +91% | 0 | 0 | — |
case-17 | pass→pass | 5,571 | 1,855 | -67% | 1 | 1 | 0% | 1,206 | 1,081 | -10% | 0 | 0 | — |
case-18 | pass→pass | 11,441 | 8,901 | -22% | 1 | 1 | 0% | 2,018 | 2,352 | +17% | 0 | 0 | — |
case-19 | pass→pass | 6,894 | 3,691 | -46% | 1 | 1 | 0% | 1,352 | 1,442 | +7% | 0 | 0 | — |
case-20 | pass→pass | 13,451 | 9,553 | -29% | 1 | 1 | 0% | 2,968 | 2,867 | -3% | 0 | 0 | — |
case-21 | pass→pass | 10,560 | 7,826 | -26% | 1 | 1 | 0% | 2,569 | 2,541 | -1% | 0 | 0 | — |
case-22 | pass→pass | 11,341 | 6,722 | -41% | 1 | 1 | 0% | 2,262 | 2,391 | +6% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.