Data Analysis

univariate-multivariable-cox-regression

Use when running prognostic survival analysis on a clinical cohort with time-to-event data to estimate univariate and multivariable Cox proportional hazards models, export result tables, and generate forest plots. NOT for: nomogram construction, calibration curves, time-dependent ROC analysis, or model training/feature selection beyond the built-in univariate screening rule.

86100Total Score
Core Capability
92 / 100
Functional Suitability
12 / 12
Reliability
10 / 12
Performance & Context
7 / 8
Agent Usability
15 / 16
Human Usability
7 / 8
Security
11 / 12
Maintainability
12 / 12
Agent-Specific
18 / 20
Medical Task
23 / 25 Passed
86Basic analyze command on sample clinical data
5/5
84Forest plot generation from existing result table
5/5
81skip_univariate mode and insufficient event count
4/5
83Timeout parameter and multiple feature columns
5/5
78Missing required columns and Cox fitting failure
4/5

Veto GatesRequired pass for any deployment consideration

Skill Veto✓ All 4 gates passed
✓
Operational Stability
System remains stable across varied inputs and edge cases
PASS
✓
Structural Consistency
Output structure conforms to expected skill contract format
PASS
✓
Result Determinism
Equivalent inputs produce semantically equivalent outputs
PASS
✓
System Security
No prompt injection, data leakage, or unsafe tool use detected
PASS
Research Veto✓ PASS — Applicable
DimensionResultDetail
Scientific IntegrityPASS
No fabricated statistics; Cox PH models use standard survival package; HR tables export computed values only; three canonical references cited
Practice BoundariesPASS
No diagnostic conclusions; skill is scoped to HR table and forest plot generation; When Not to Use section explicitly excludes clinical decision tools
Methodological GroundPASS
Univariate screening with p<0.05 threshold then multivariable model is standard practice; fallback to all features if fewer than 3 significant is appropriate and documented; no causal claims made
Code UsabilityPASS
Script syntax valid; set.seed(options$seed) present; modular 8-file structure; dependency check fires with named packages; no logic errors detected in code review

Core Capability92 / 100 — 8 Categories

Functional Suitability
Three subcommands (analyze, forest-plot, multi-forest-plot) cover full workflow; all documented use cases covered with examples
12 / 12
100%
Reliability
SKILL_* codes comprehensive; set.seed() present; Cox fitting failure handled with SKILL_INVALID_PARAMETER; minor gap: no explicit warning when fallback logic triggers
10 / 12
83%
Performance & Context
SKILL.md is 327 lines — slightly over the 500-line threshold but within acceptable range; modular references and scripts well-utilized
7 / 8
88%
Agent Usability
Subcommand routing is clear; output columns documented with field descriptions; minor gap: forest-plot required columns may confuse if analyze was run with skip_univariate
15 / 16
94%
Human Usability
When to Use / When Not to Use sections well-structured with typical user request phrasings; high discoverability
7 / 8
88%
Security
No credentials or secrets; set.seed prevents side-channel variance; file path inputs accepted without explicit sanitization
11 / 12
92%
Maintainability
Eight-file modular structure; smoke test script (run_smoke_test.R) and shell wrapper included; test data bundled; references documented
12 / 12
100%
Agent-Specific
Trigger description precise with NOT-for exclusions; progressive disclosure excellent; escape hatches clearly stated; minor composability friction from xlsx output format dependency
18 / 20
90%
Core Capability Total92 / 100

Medical TaskExecution Average: 82.4 / 100 — Assertions: 23/25 Passed

86
Canonical
Basic analyze command on sample clinical data
5/5 ✓
84
Variant A
Forest plot generation from existing result table
5/5 ✓
81
Edge
skip_univariate mode and insufficient event count
4/5 ✓
83
Variant B
Timeout parameter and multiple feature columns
5/5 ✓
78
Stress
Missing required columns and Cox fitting failure
4/5 ✓
86
CanonicalPass
Basic analyze command on sample clinical data

openxlsx and survival packages missing; --help renders correctly; SKILL_PACKAGE_NOT_FOUND fires correctly naming packages; set.seed confirmed

Basic 34/40|Specialized 52/60|Total 86/100
A1--help renders three subcommand descriptions without error
A2SKILL_PACKAGE_NOT_FOUND fires with named package list
A3set.seed() present in main.R
A4Modular 8-file script structure confirmed
A5No security issues in script code
Pass rate: 5 / 5
84
Variant APass
Forest plot generation from existing result table

Subcommand routing confirmed; forestplot package dependency check fires; required plot table columns documented

Basic 33/40|Specialized 51/60|Total 84/100
A1forest-plot and multi-forest-plot subcommands routed correctly in main.R
A2Required plot table columns documented
A3SKILL_PACKAGE_NOT_FOUND fires for forestplot dependency
A4--plot_save argument documented as required for plot commands
A5Plot dimension customization arguments documented
Pass rate: 5 / 5
81
EdgePass
skip_univariate mode and insufficient event count

skip_univariate argument documented; event-count threshold documented; fallback logic documented; runtime verification blocked by missing packages

Basic 32/40|Specialized 49/60|Total 81/100
A1--skip_univariate argument documented for bypassing univariate screening
A2Minimum 2 events and 10 complete samples requirement documented
A3Multivariable fallback logic documented
A4Runtime behavior of skip_univariate verified in live execution
A5SKILL_INVALID_PARAMETER documented for Cox model fitting failures
Pass rate: 4 / 5
83
Variant BPass
Timeout parameter and multiple feature columns

Timeout and seed arguments confirmed; overwrite flag documented; canonical references present; output file list comprehensive

Basic 33/40|Specialized 50/60|Total 83/100
A1--timeout_seconds and --seed arguments documented in both analyze and plot commands
A2--overwrite flag documented for non-empty output directories
A3Three canonical survival analysis references included
A4Output files for analyze command are comprehensive
A5Implementation Checklist confirms major design decisions
Pass rate: 5 / 5
78
StressPass
Missing required columns and Cox fitting failure

SKILL_MISSING_COLUMNS and SKILL_INVALID_PARAMETER documented; time column validation requirements confirmed; runtime blocked by missing packages

Basic 31/40|Specialized 47/60|Total 78/100
A1SKILL_MISSING_COLUMNS documented for absent required columns
A2SKILL_INVALID_PARAMETER documented for Cox model fitting failure
A3time_col must contain finite values greater than 0 is documented
A4Live Cox fitting failure error handling verified
A5Character predictors converted to factors documented in Workflow
Pass rate: 4 / 5
Medical Task Total82.4 / 100

Key Strengths

  • Three-subcommand architecture (analyze, forest-plot, multi-forest-plot) cleanly separates analysis from visualization
  • Automated smoke test script (run_smoke_test.R) and shell wrapper enable easy regression testing
  • set.seed() present with configurable --seed argument ensuring full reproducibility
  • Multivariable fallback logic (use all features if fewer than 3 significant) is explicitly documented
  • When Not to Use section precisely excludes nomograms, calibration, and time-dependent ROC, preventing misuse