{
  "schemaVersion": "1.0",
  "item": {
    "slug": "survival-analysis-km",
    "name": "Survival Analysis (KM)",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/AIPOCH-AI/survival-analysis-km",
    "canonicalUrl": "https://clawhub.ai/AIPOCH-AI/survival-analysis-km",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/survival-analysis-km",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=survival-analysis-km",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "requirements.txt",
      "SKILL.md",
      "scripts/main.py",
      "references/README.md",
      "references/sample_data.csv"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/survival-analysis-km"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/survival-analysis-km",
    "agentPageUrl": "https://openagent3.xyz/skills/survival-analysis-km/agent",
    "manifestUrl": "https://openagent3.xyz/skills/survival-analysis-km/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/survival-analysis-km/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Survival Analysis (Kaplan-Meier)",
        "body": "Kaplan-Meier survival analysis tool for clinical and biological research. Generates publication-ready survival curves with statistical tests."
      },
      {
        "title": "Features",
        "body": "Kaplan-Meier Curve Generation: Publication-quality survival plots with confidence intervals\nStatistical Tests: Log-rank test, Wilcoxon test, Peto-Peto test\nHazard Ratios: Cox proportional hazards regression with 95% CI\nSummary Statistics: Median survival time, restricted mean survival time (RMST)\nMulti-group Analysis: Supports 2+ comparison groups\nRisk Tables: Optional at-risk table below curves"
      },
      {
        "title": "Python Script",
        "body": "python scripts/main.py --input data.csv --time time_col --event event_col --group group_col --output results/"
      },
      {
        "title": "Arguments",
        "body": "ArgumentDescriptionRequired--inputInput CSV file pathYes--timeColumn name for survival timeYes--eventColumn name for event indicator (1=event, 0=censored)Yes--groupColumn name for grouping variableOptional--outputOutput directory for resultsYes--conf-levelConfidence level (default: 0.95)Optional--risk-tableInclude risk table in plotOptional"
      },
      {
        "title": "Input Format",
        "body": "CSV with columns:\n\nTime column: Numeric, time to event or censoring\nEvent column: Binary (1 = event occurred, 0 = censored/right-censored)\nGroup column: Categorical variable for stratification\n\nExample:\n\npatient_id,time_months,death,treatment_group\nP001,24.5,1,Drug_A\nP002,36.2,0,Drug_A\nP003,18.7,1,Placebo"
      },
      {
        "title": "Output Files",
        "body": "km_curve.png: Kaplan-Meier survival curve\nkm_curve.pdf: Vector version for publications\nsurvival_stats.csv: Statistical summary (median survival, confidence intervals)\nhazard_ratios.csv: Cox regression results with HR and 95% CI\n`logrank_test.csv**: Pairwise comparison p-values\n`report.txt**: Human-readable summary report"
      },
      {
        "title": "Statistical Methods",
        "body": "Kaplan-Meier Estimator: Non-parametric maximum likelihood estimate of survival function\n\nProduct-limit estimator: Ŝ(t) = Π(tᵢ≤t) (1 - dᵢ/nᵢ)\nGreenwood's formula for variance estimation\n\n\n\nLog-Rank Test: Most widely used test for comparing survival curves\n\nNull hypothesis: No difference between groups\nWeighted by number at risk at each event time\n\n\n\nCox Proportional Hazards: Semi-parametric regression model\n\nh(t|X) = h₀(t) × exp(β₁X₁ + β₂X₂ + ...)\nProportional hazards assumption checked via Schoenfeld residuals"
      },
      {
        "title": "Dependencies",
        "body": "lifelines: Core survival analysis library\nmatplotlib, seaborn: Visualization\npandas, numpy: Data handling\nscipy: Statistical tests"
      },
      {
        "title": "Technical Difficulty: High ⚠️",
        "body": "This skill involves advanced statistical modeling. Results should be reviewed by a biostatistician, especially for:\n\nProportional hazards assumption violations\nSmall sample sizes (< 30 per group)\nHeavy censoring (> 50%)\nTime-varying covariates"
      },
      {
        "title": "References",
        "body": "See references/ folder for:\n\nKaplan EL, Meier P (1958) original paper\nCox DR (1972) regression models paper\nSample datasets for testing\nClinical reporting guidelines (ATN, CONSORT)"
      },
      {
        "title": "Parameters",
        "body": "ParameterTypeDefaultDescription--inputstrRequiredInput CSV file path--timestrRequiredColumn name for survival time--eventstrRequired--groupstrRequired--outputstrRequiredOutput directory for results--conf-levelfloat0.95--risk-tablestrRequiredInclude risk table in plot--figsizestr'10--dpiint300"
      },
      {
        "title": "Example",
        "body": "# Basic survival curve\npython scripts/main.py \\\n  --input clinical_data.csv \\\n  --time overall_survival_months \\\n  --event death \\\n  --group treatment_arm \\\n  --output ./results/ \\\n  --risk-table\n\nOutput includes:\n\nSurvival curves with 95% confidence bands\nMedian survival: Drug A = 28.4 months (95% CI: 24.1-32.7), Placebo = 18.2 months (95% CI: 15.3-21.1)\nLog-rank test p-value: 0.0023\nHazard ratio: 0.62 (95% CI: 0.45-0.85), p = 0.003"
      },
      {
        "title": "Risk Assessment",
        "body": "Risk IndicatorAssessmentLevelCode ExecutionPython/R scripts executed locallyMediumNetwork AccessNo external API callsLowFile System AccessRead input files, write output filesMediumInstruction TamperingStandard prompt guidelinesLowData ExposureOutput files saved to workspaceLow"
      },
      {
        "title": "Security Checklist",
        "body": "No hardcoded credentials or API keys\n No unauthorized file system access (../)\n Output does not expose sensitive information\n Prompt injection protections in place\n Input file paths validated (no ../ traversal)\n Output directory restricted to workspace\n Script execution in sandboxed environment\n Error messages sanitized (no stack traces exposed)\n Dependencies audited"
      },
      {
        "title": "Prerequisites",
        "body": "# Python dependencies\npip install -r requirements.txt"
      },
      {
        "title": "Success Metrics",
        "body": "Successfully executes main functionality\n Output meets quality standards\n Handles edge cases gracefully\n Performance is acceptable"
      },
      {
        "title": "Test Cases",
        "body": "Basic Functionality: Standard input → Expected output\nEdge Case: Invalid input → Graceful error handling\nPerformance: Large dataset → Acceptable processing time"
      },
      {
        "title": "Lifecycle Status",
        "body": "Current Stage: Draft\nNext Review Date: 2026-03-06\nKnown Issues: None\nPlanned Improvements:\n\nPerformance optimization\nAdditional feature support"
      }
    ],
    "body": "Survival Analysis (Kaplan-Meier)\n\nKaplan-Meier survival analysis tool for clinical and biological research. Generates publication-ready survival curves with statistical tests.\n\nFeatures\nKaplan-Meier Curve Generation: Publication-quality survival plots with confidence intervals\nStatistical Tests: Log-rank test, Wilcoxon test, Peto-Peto test\nHazard Ratios: Cox proportional hazards regression with 95% CI\nSummary Statistics: Median survival time, restricted mean survival time (RMST)\nMulti-group Analysis: Supports 2+ comparison groups\nRisk Tables: Optional at-risk table below curves\nUsage\nPython Script\npython scripts/main.py --input data.csv --time time_col --event event_col --group group_col --output results/\n\nArguments\nArgument\tDescription\tRequired\n--input\tInput CSV file path\tYes\n--time\tColumn name for survival time\tYes\n--event\tColumn name for event indicator (1=event, 0=censored)\tYes\n--group\tColumn name for grouping variable\tOptional\n--output\tOutput directory for results\tYes\n--conf-level\tConfidence level (default: 0.95)\tOptional\n--risk-table\tInclude risk table in plot\tOptional\nInput Format\n\nCSV with columns:\n\nTime column: Numeric, time to event or censoring\nEvent column: Binary (1 = event occurred, 0 = censored/right-censored)\nGroup column: Categorical variable for stratification\n\nExample:\n\npatient_id,time_months,death,treatment_group\nP001,24.5,1,Drug_A\nP002,36.2,0,Drug_A\nP003,18.7,1,Placebo\n\nOutput Files\nkm_curve.png: Kaplan-Meier survival curve\nkm_curve.pdf: Vector version for publications\nsurvival_stats.csv: Statistical summary (median survival, confidence intervals)\nhazard_ratios.csv: Cox regression results with HR and 95% CI\n`logrank_test.csv**: Pairwise comparison p-values\n`report.txt**: Human-readable summary report\nTechnical Details\nStatistical Methods\n\nKaplan-Meier Estimator: Non-parametric maximum likelihood estimate of survival function\n\nProduct-limit estimator: Ŝ(t) = Π(tᵢ≤t) (1 - dᵢ/nᵢ)\nGreenwood's formula for variance estimation\n\nLog-Rank Test: Most widely used test for comparing survival curves\n\nNull hypothesis: No difference between groups\nWeighted by number at risk at each event time\n\nCox Proportional Hazards: Semi-parametric regression model\n\nh(t|X) = h₀(t) × exp(β₁X₁ + β₂X₂ + ...)\nProportional hazards assumption checked via Schoenfeld residuals\nDependencies\nlifelines: Core survival analysis library\nmatplotlib, seaborn: Visualization\npandas, numpy: Data handling\nscipy: Statistical tests\nTechnical Difficulty: High ⚠️\n\nThis skill involves advanced statistical modeling. Results should be reviewed by a biostatistician, especially for:\n\nProportional hazards assumption violations\nSmall sample sizes (< 30 per group)\nHeavy censoring (> 50%)\nTime-varying covariates\nReferences\n\nSee references/ folder for:\n\nKaplan EL, Meier P (1958) original paper\nCox DR (1972) regression models paper\nSample datasets for testing\nClinical reporting guidelines (ATN, CONSORT)\nParameters\nParameter\tType\tDefault\tDescription\n--input\tstr\tRequired\tInput CSV file path\n--time\tstr\tRequired\tColumn name for survival time\n--event\tstr\tRequired\t\n--group\tstr\tRequired\t\n--output\tstr\tRequired\tOutput directory for results\n--conf-level\tfloat\t0.95\t\n--risk-table\tstr\tRequired\tInclude risk table in plot\n--figsize\tstr\t'10\t\n--dpi\tint\t300\t\nExample\n# Basic survival curve\npython scripts/main.py \\\n  --input clinical_data.csv \\\n  --time overall_survival_months \\\n  --event death \\\n  --group treatment_arm \\\n  --output ./results/ \\\n  --risk-table\n\n\nOutput includes:\n\nSurvival curves with 95% confidence bands\nMedian survival: Drug A = 28.4 months (95% CI: 24.1-32.7), Placebo = 18.2 months (95% CI: 15.3-21.1)\nLog-rank test p-value: 0.0023\nHazard ratio: 0.62 (95% CI: 0.45-0.85), p = 0.003\nRisk Assessment\nRisk Indicator\tAssessment\tLevel\nCode Execution\tPython/R scripts executed locally\tMedium\nNetwork Access\tNo external API calls\tLow\nFile System Access\tRead input files, write output files\tMedium\nInstruction Tampering\tStandard prompt guidelines\tLow\nData Exposure\tOutput files saved to workspace\tLow\nSecurity Checklist\n No hardcoded credentials or API keys\n No unauthorized file system access (../)\n Output does not expose sensitive information\n Prompt injection protections in place\n Input file paths validated (no ../ traversal)\n Output directory restricted to workspace\n Script execution in sandboxed environment\n Error messages sanitized (no stack traces exposed)\n Dependencies audited\nPrerequisites\n# Python dependencies\npip install -r requirements.txt\n\nEvaluation Criteria\nSuccess Metrics\n Successfully executes main functionality\n Output meets quality standards\n Handles edge cases gracefully\n Performance is acceptable\nTest Cases\nBasic Functionality: Standard input → Expected output\nEdge Case: Invalid input → Graceful error handling\nPerformance: Large dataset → Acceptable processing time\nLifecycle Status\nCurrent Stage: Draft\nNext Review Date: 2026-03-06\nKnown Issues: None\nPlanned Improvements:\nPerformance optimization\nAdditional feature support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/AIPOCH-AI/survival-analysis-km",
    "publisherUrl": "https://clawhub.ai/AIPOCH-AI/survival-analysis-km",
    "owner": "AIPOCH-AI",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/survival-analysis-km",
    "downloadUrl": "https://openagent3.xyz/downloads/survival-analysis-km",
    "agentUrl": "https://openagent3.xyz/skills/survival-analysis-km/agent",
    "manifestUrl": "https://openagent3.xyz/skills/survival-analysis-km/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/survival-analysis-km/agent.md"
  }
}