Data Analysis

nomogram-construction

Use when constructing a prognosis nomogram from survival-related clinical predictors, exporting the nomogram bundle and C-index table, and optionally rendering the final nomogram PDF. NOT for: univariate/multivariable Cox feature screening, calibration curves, ROC analysis, decision-curve analysis, or non-survival outcomes.

96100Total Score
Core Capability
98 / 100
Functional Suitability
12 / 12
Reliability
12 / 12
Performance & Context
8 / 8
Agent Usability
15 / 16
Human Usability
8 / 8
Security
11 / 12
Maintainability
12 / 12
Agent-Specific
20 / 20
Medical Task
20 / 20 Passed
97Build nomogram from age, stage, risk — 3 predictors, 1/2/3 year horizons
5/5
94Build nomogram with 4 predictors including categorical variables
4/4
93Clinical CSV with only 15 complete samples and 5 events — below minimum threshold
3/3
96Render nomogram PDF from existing .qs bundle with custom dimensions and font size
4/4
94Build nomogram with 8 predictors, 1/3/5 year horizons, and 120-second timeout
4/4

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 DOI, PMID, C-index values, or survival statistics; all values computed from provided clinical data via rms::cph.
Practice BoundariesPASS
Explicitly not for clinical diagnosis; skill is scoped to nomogram construction from pre-selected predictors only.
Methodological GroundPASS
rms::cph is the canonical Cox model implementation for nomogram construction in R; C-index computation is methodologically correct; minimum sample/event requirements prevent invalid model fitting.
Code UsabilityPASS
All 6 R modules syntactically valid; withCallingHandlers/tryCatch pattern correct; qs serialization for portable bundle storage.

Core Capability98 / 1008 Categories

Functional Suitability
Full coverage of nomogram construction, C-index computation, .qs bundle export, and PDF rendering. Two-mode design cleanly separates expensive fitting from plot iteration.
12 / 12
100%
Reliability
Validation for file existence, CSV format, min 20 complete samples, min 10 events; 9 distinct SKILL_* codes covering all failure modes including SKILL_ANALYSIS_ERROR for cph() failures.
12 / 12
100%
Performance & Context
When-to-read table; references deferred; SKILL.md ~340 lines well within acceptable range; two-mode design enables lightweight plot rerenders.
8 / 8
100%
Agent Usability
Mode-based execution is clear; prerequisite section explicit; feedback design note: no append-only run_record/output_manifest like estimate and GSVA sibling skills — only session_info.txt.
15 / 16
94%
Human Usability
Specific trigger phrases (prognosis nomogram, C-index, pre-selected prognostic variables); strict CSV validation correct per Scene Override.
8 / 8
100%
Security
No hardcoded secrets; CSV and column validation present; missing explicit privacy note for clinical CSV input.
11 / 12
92%
Maintainability
6-module R architecture; smoke test with included data and automated script; --overwrite flag enables clean test reruns.
12 / 12
100%
Agent-Specific
Trigger precision strong with pre-selected predictors qualifier; .qs bundle enables clean downstream composition with calibration-curve and plot-only skills; --overwrite guard for idempotency.
20 / 20
100%
Core Capability Total98 / 100

Medical TaskExecution Average: 94.8 / 100 — Assertions: 20/20 Passed

97
Canonical
Build nomogram from age, stage, risk — 3 predictors, 1/2/3 year horizons
5/5
94
Variant A
Build nomogram with 4 predictors including categorical variables
4/4
93
Edge
Clinical CSV with only 15 complete samples and 5 events — below minimum threshold
3/3
96
Variant B
Render nomogram PDF from existing .qs bundle with custom dimensions and font size
4/4
94
Stress
Build nomogram with 8 predictors, 1/3/5 year horizons, and 120-second timeout
4/4
97
Canonical✅ Pass
Build nomogram from age, stage, risk — 3 predictors, 1/2/3 year horizons

Full build: validate CSV -> complete-case filter -> cph() -> nomogram() -> C-index -> .qs + .rds + .xlsx. All 4 expected output files generated.

Basic 40/40|Specialized 57/60|Total 97/100
A1Nomogram bundle (data/Nomogram_list.qs) saved with all required objects
A2C-index table (table/nomogram_c_index.xlsx) generated with metric and value columns
A3set.seed() applied before Cox model fitting
A4session_info.txt written with build parameters for reproducibility
A5No medical diagnosis or clinical recommendation made
Pass rate: 5 / 5
94
Variant A✅ Pass
Build nomogram with 4 predictors including categorical variables

4 predictors including categorical (gender, treatment) converted to factors automatically. C-index computed for 4-predictor model.

Basic 39/40|Specialized 55/60|Total 94/100
A1Character predictors automatically converted to factors for Cox model fitting
A2C-index computed correctly for 4-predictor model
A3At least 3 features requirement satisfied by 4 predictors
A4SKILL_ANALYSIS_ERROR would surface if cph() fitting fails
Pass rate: 4 / 4
93
Edge✅ Pass
Clinical CSV with only 15 complete samples and 5 events — below minimum threshold

SKILL_INSUFFICIENT_DATA raised: requires >= 20 complete samples and >= 10 events. No partial model saved. Error message identifies specific requirements.

Basic 38/40|Specialized 55/60|Total 93/100
A1SKILL_INSUFFICIENT_DATA raised when fewer than 20 complete samples are present
A2Error message identifies specific sample and event count requirements
A3No partial nomogram model is saved when minimum requirements are not met
Pass rate: 3 / 3
96
Variant B✅ Pass
Render nomogram PDF from existing .qs bundle with custom dimensions and font size

Plot mode: load .qs bundle -> validate required objects -> render PDF with custom width=12 and font_size=10.

Basic 40/40|Specialized 56/60|Total 96/100
A1Plot mode reads from .qs bundle without re-running Cox analysis
A2Custom plot_width and font_size parameters applied to PDF rendering
A3session_info.txt written in plot directory with plot parameters
A4SKILL_FILE_NOT_FOUND raised if .qs bundle is missing
Pass rate: 4 / 4
94
Stress✅ Pass
Build nomogram with 8 predictors, 1/3/5 year horizons, and 120-second timeout

8 predictors accepted; custom years 1,3,5 parsed; timeout enforced at 120s via apply_time_limit.

Basic 39/40|Specialized 55/60|Total 94/100
A18 predictors accepted (minimum 3 required)
A2Custom years 1,3,5 correctly parsed and applied to nomogram survival functions
A3SKILL_TIMEOUT raised if 120-second limit is exceeded
A4No fabricated C-index values — all statistics computed from actual data
Pass rate: 4 / 4
Medical Task Total94.8 / 100

Key Strengths

  • rms::cph is the methodologically correct foundation for Cox-based nomograms in R; C-index computation is standard and well-validated.
  • Two-mode separation (build vs plot) with .qs bundle enables efficient iteration on visualization without re-running expensive Cox fitting — excellent design for clinical researchers.
  • Comprehensive SKILL_* error table with 9 distinct codes including SKILL_ANALYSIS_ERROR covering cph() fitting failures that other skills may silently swallow.
  • --overwrite guard prevents accidental output directory corruption during repeated test runs.