Skip to content

K-Dense-AI/scientific-agent-skills / skills/clinical-decision-support

clinical-decision-support

Verified

Prepares and validates research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Supports aggregate or synthetic research documentation and traceability, excluding patient care and live clinical operation.

references/survival_analysis.md

View on GitHub
# Survival-Analysis Planning

## Scope

The bundled script validates a plan. It does not read time-to-event rows, fit models, draw curves, or provide an individual prognosis.

## Start With the Estimand

Align:

1. **Population** — eligibility and analysis set.
2. **Condition/comparison** — intervention, exposure, or groups being contrasted.
3. **Variable/endpoint** — event definition and ascertainment.
4. **Intercurrent-event strategy** — how events such as discontinuation, rescue therapy, switching, or competing events relate to the question.
5. **Population-level summary** — risk, survival probability, restricted mean survival time, hazard contrast, quantile, or another justified measure.
6. **Time horizon** — clinically and statistically justified.

Record time zero, delayed entry, time scale, follow-up end, and calendar/data-cut date.

## Endpoint Definition

Specify:

- exact event;
- competing events;
- recurrent events if relevant;
- ascertainment schedule and adjudication;
- censoring rules;
- handling of same-day and tied events;
- loss to follow-up;
- administrative censoring;
- endpoint changes and versioning.

Do not treat a competing event as ordinary independent censoring when the target is absolute event probability.

## Descriptive Estimation

Kaplan-Meier estimates are suitable for survival from the event of interest under appropriate censoring assumptions. Report:

- numbers at risk;
- events and censoring;
- estimates at prespecified times with intervals;
- median only if estimable;
- follow-up distribution using an appropriate method;
- truncation where risk sets become uninformative.

When competing events exist, use cumulative-incidence methods for event probabilities. Naively censoring competing events in Kaplan-Meier can overestimate absolute incidence.

## Group Comparisons

The log-rank test compares event-time distributions and is most powerful under proportional alternatives. It does not quantify an effect. Pre-specify alternatives if curves may cross or effects may be delayed.

A Cox model estimates a hazard contrast conditional on model specification. Before presenting a single hazard ratio:

- assess proportional hazards graphically and analytically;
- examine functional forms;
- evaluate influential observations and interactions;
- define adjustment variables a priori;
- account for clustering or stratification;
- avoid interpreting `1 − HR` as a reduction in cumulative risk.

If proportional hazards is doubtful, consider:

- time-varying coefficients;
- piecewise effects;
- landmark effects;
- restricted mean survival time at a justified horizon;
- survival or cumulative-incidence differences at prespecified times;
- accelerated failure-time or flexible parametric models.

Report why the selected summary answers the research question.

## Competing Risks

Distinguish:

- cause-specific hazard questions;
- cumulative-incidence/absolute-risk questions;
- subdistribution-hazard modeling.

State which question the method answers. A subdistribution hazard ratio is not directly a risk ratio. When modeling several event types, check that resulting probability estimates are coherent.

Primary reference: [Austin, Lee, and Fine, competing risks](https://pmc.ncbi.nlm.nih.gov/articles/PMC4741409/).

## Bias and Missingness

Plan for:

- informative censoring;
- delayed entry/left truncation;
- immortal time;
- time-dependent confounding;
- interval censoring;
- outcome misclassification;
- missing covariates;
- competing events;
- informative visit schedules;
- treatment switching and rescue treatment;
- site and calendar effects.

Specify sensitivity analyses tied to plausible departures from assumptions. A “best/worst case” alone is rarely sufficient.

## Prediction Models

For time-to-event prediction:

- preserve the locked model and prediction horizon;
- evaluate calibration at prespecified times;
- report time-dependent discrimination with uncertainty;
- use appropriate handling of censoring;
- evaluate overall and subgroup performance;
- perform external validation in relevant settings;
- avoid selecting a horizon after viewing results.

Use TRIPOD+AI and PROBAST+AI.

## Biomarker Evaluation

For a prognostic biomarker:

- analyze continuous form where scientifically justified;
- pre-specify transformations and threshold;
- avoid minimum-p-value cut-point searches;
- report assay and specimen handling;
- adjust for established prognostic factors;
- validate externally.

For a predictive biomarker, estimate and report a treatment-by-biomarker interaction in an appropriate design. Separate prognostic association from treatment-effect modification.

## Uncertainty and Multiplicity

Include:

- confidence intervals for every primary effect;
- uncertainty in calibration/discrimination;
- prespecified alpha or interval interpretation;
- multiplicity strategy for outcomes, times, subgroups, and models;
- bootstrap or cross-validation details if used;
- sensitivity analyses;
- model optimism and overfitting assessment.

Do not turn a threshold-crossing p-value into clinical importance.

## Primary Method Sources

- [ICH E9(R1) estimands and sensitivity analysis](https://database.ich.org/sites/default/files/E9-R1_Step4_Guideline_2019_1203.pdf)
- [Royston and Parmar, restricted mean survival time](https://pubmed.ncbi.nlm.nih.gov/24314264/)
- [Austin and Fine, reporting competing-risk analyses](https://pmc.ncbi.nlm.nih.gov/articles/PMC5698744/)

## Plan Validator

```bash
python3 scripts/survival_plan_validator.py assets/survival_analysis_plan_template.json
```

An exit code of zero means required planning fields and selected consistency rules passed. It is not statistical approval.
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall