Generate forest plots for meta-analysis of survival data. Input is a CSV file containing study names, HR and 95% confidence intervals, output forest plot PNG and data table CSV. Supports both R and Python scripts.
55
63%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./scientific-skills/Data Analysis/meta-forest-model-plot/SKILL.mdscripts/forest_survival.py plus 1 additional script(s).Python: 3.10+. Repository baseline for current packaged skills.Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.cd "20260316/scientific-skills/Data Analytics/meta-forest-model-plot"
python -m py_compile scripts/forest_survival.py
python scripts/forest_survival.py --helpExample run plan:
CONFIG block or documented parameters if the script uses fixed settings.python scripts/forest_survival.py with the validated inputs.See ## Workflow above for related details.
scripts/forest_survival.py with additional helper scripts under scripts/.Run this minimal command first to verify the supported execution path:
python scripts/validate_skill.py --helpUsers need to provide a CSV file with the following columns:
| Column Name | Description | Example |
|---|---|---|
| study | Study name (author + year) | Smith 2020 |
| outcome_new | Outcome indicator name | Overall Survival |
| group1_HR | Hazard Ratio | 0.85 |
| group1_95%Lower CI or group1_95.Lower.CI | 95% Confidence Interval Lower Bound | 0.72 |
| group1_95%Upper CI or group1_95.Upper.CI | 95% Confidence Interval Upper Bound | 1.01 |
Note: HR, Lower CI, and Upper CI must all be positive numbers.
If there are data issues, prompt the user to correct and resubmit.
Command:
Rscript scripts/forest_survival.R "<csv_path>" "<outcome_name>" "<output_dir>"Command:
python scripts/forest_survival.py "<csv_path>" "<outcome_name>" "<output_dir>"Parameter Description (same for both scripts):
csv_path: Absolute path to the input CSV fileoutcome_name: Outcome indicator name (optional, default extracted from data)output_dir: Output directory (optional, default is current directory)Upon successful execution:
═══════════════════════════════════════════
Forest Plot Generation Complete
═══════════════════════════════════════════
【Outcome Indicator】{outcome_name}
【Included Studies】{n} studies
【Output Files】
• Forest Plot: {output_dir}/Survival_forest_{outcome}.png
• Data Table: {output_dir}/Survival_forest_{outcome}.csv
【Pooled Effect Size】
• HR = {value} [{lower}; {upper}]
• P value = {p_value}
【Heterogeneity】
• I² = {I2}%
• Tau² = {tau2}
• Q test P value = {pval_Q}
═══════════════════════════════════════════Install the following R packages:
If the user's environment is missing these packages, prompt them to run:
install.packages(c("meta", "metafor", "grid", "stringr"))Install the following Python packages (Python 3.7+ recommended):
If the user's environment is missing these packages, prompt them to run:
pip install pandas numpy matplotlib scipyOr in a virtual environment:
python -m pip install pandas numpy matplotlib scipymeta_forest_model_plot_result.md unless the skill documentation defines a better convention.Run this minimal verification path before full execution when possible:
python scripts/forest_survival.py --helpExpected output format:
Result file: meta_forest_model_plot_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if anyf5ef65b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.