Agent skill

Nomogram Construction

by aipoch in aipoch/medical-research-skills

A skill your agent uses when constructing a prognosis nomogram from survival-related clinical predictors, exporting the nomogram bundle and C-index table, and optionally rendering the final nomogram…

MITAuto-check passedDocuments & Office

Install Nomogram Construction

skills CLI
$ npx skills add aipoch/medical-research-skills --skill nomogram-construction -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills nomogram-construction --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/nomogram-construction' .claude/skills/nomogram-construction && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nomogram-construction
GitHub stars
2k
Token cost
~2.7k tokens
SKILL.md length
1,041 words
Files
24 (incl. scripts, references)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when constructing a prognosis nomogram from survival-related clinical predictors, exporting the nomogram bundle and C-index table, and optionally rendering the final nomogram…

  • Works in 5 steps: Validate Input → Prepare Modeling Dataset → Fit Cox-Based Nomogram Model → …
  • Constructing a prognosis nomogram from survival-related clinical predictors
  • SKILL.md covers When to Use, When Not to Use, When to Read External Files and Input Validation, plus 9 more sections
  • Runs R scripts from its folder; calls bash; reaches cloud.r-project.org

What it does

Nomogram Construction is an agent skill from aipoch/medical-research-skills. 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.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 29 other files, including scripts and reference files (for example `eval_report_nomogram-construction_result.json`, `references/algorithm.md` and `references/cli-guide.md`).

It sits in Documents & Office, covering Performance reviews and PDF. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • Constructing a prognosis nomogram from survival-related clinical predictors
  • Exporting the nomogram bundle and C-index table
  • Optionally rendering the final nomogram PDF

Example prompts

  • “/nomogram-construction”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Validate Input
  2. Prepare Modeling Dataset
  3. Fit Cox-Based Nomogram Model
  4. Evaluate Performance
  5. Save And Plot

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (R, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cloud.r-project.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nomogram Construction loads about 2.7k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 1,041 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 1,041 words, ~2,748 tokens.

Download SKILL.mdSave it as .claude/skills/nomogram-construction/SKILL.md (or your agent's skills folder). This skill also uses 23 other files; get the full folder from GitHub.
name
nomogram-construction
description
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.
license
MIT
skill-author
AIPOCH

Nomogram Construction

When to Use

Use this skill when you need to:

  • build a prognosis nomogram from already selected clinical prognostic variables;
  • estimate model discrimination with a C-index table;
  • export a nomogram bundle and generate a publication-ready nomogram PDF.

Typical user requests:

  • "Build a prognosis nomogram from age, stage, and risk score."
  • "Use these Cox-selected predictors to construct a nomogram and calculate the C-index."
  • "Generate a nomogram PDF from a survival prediction model."

When Not to Use

Do not use this skill for:

  • screening prognostic variables from scratch with Cox regression;
  • ROC curves, calibration curves, or decision-curve analysis;
  • diagnosis models, binary classification, or non-survival outcomes;
  • single-cell, differential-expression, or pathway analysis.

When to Read External Files

SituationFile to ReadPurpose
Need algorithm detailsreferences/algorithm.mdCox-based nomogram workflow, C-index, and assumptions
Need to run analysisscripts/main.RExecute Rscript scripts/main.R --mode build ... or --mode plot ...
Encounter errorsreferences/troubleshooting.mdCommon SKILL_* errors and solutions
Need CLI examplesreferences/cli-guide.mdDetailed command-line examples
Need test datatests/data/Example clinical CSV for smoke testing

Input Validation

This skill accepts:

  • A clinical CSV file with survival time, event indicator, and pre-selected prognostic features
  • Requests to build a Cox-based prognostic nomogram and compute the C-index
  • Requests to re-render a nomogram PDF from an existing .qs bundle (plot mode)

If the user's request does not involve nomogram construction from survival data — for example, asking to screen features with Cox regression, generate calibration curves, perform ROC analysis, or analyze non-survival binary outcomes — do not proceed with this workflow. Instead respond:

"nomogram-construction is designed to build a prognosis nomogram from pre-selected survival predictors and export the nomogram bundle with C-index table. Your request appears to be outside this scope. Please use a Cox feature-screening skill for variable selection, or a calibration-curve/ROC skill for model validation."


Prerequisites

R packages required: rms, openxlsx, qs, optparse.

Install with:

r
install.packages(c("rms", "openxlsx", "qs", "optparse"), repos = "https://cloud.r-project.org")

Or run the bootstrap installer:

bash
Rscript scripts/install_dependencies.R

Note: --help requires optparse to be loaded. If the package check fires before option parsing, install optparse first, then run --help.


Usage

Build Nomogram Bundle
bash
Rscript scripts/main.R \
  --mode build \
  --data_file ./clinical_data.csv \
  --features age,stage,risk \
  --time_col futime \
  --event_col fustat \
  --years 1,2,3 \
  --output_dir ./output/ \
  --seed 42
Render Nomogram Plot
bash
Rscript scripts/main.R \
  --mode plot \
  --nomo_data_file ./output/data/Nomogram_list.qs \
  --plot_save ./output/plot/nomogram_plot.pdf

Arguments

ShortLongTypeDefaultDescription
-m--modecharacterbuildExecution mode: build or plot
-d--data_filecharacterrequired for buildClinical CSV file with sample IDs as row names
-f--featurescharacterrequired for buildComma-separated prognostic features
-t--time_colcharacterfutimeSurvival time column
-e--event_colcharacterfustatEvent column encoded as 1=event, 0=censored
-y--yearscharacter1,2,3Prediction time points in years
-o--output_dircharacter./output/Output directory for build mode
--overwriteflagFALSEAllow writing into a non-empty output directory
-n--nomo_data_filecharacterrequired for plotNomogram bundle in .qs format
-p--plot_savecharacterrequired for plotOutput PDF path
-w--plot_widthdouble11Plot width in inches
-H--plot_heightdouble8Plot height in inches
-F--font_sizedouble8Plot font size
-l--line_widthdouble5Plot line width
--font_familycharactersansFont family for PDF output
-s--seedinteger42Random seed for reproducibility
-T--timeout_secondsinteger0Elapsed time limit in seconds; 0 disables timeout

Input Format

Clinical Data (data_file)

CSV file with sample IDs as row names and one column per feature/end-point variable.

csv
",age,stage,risk,futime,fustat
SAMPLE_001,65,StageIII,high,365,1
SAMPLE_002,52,StageII,low,730,0
SAMPLE_003,78,StageIV,high,180,1

Requirements

  • File format must be CSV.
  • Sample IDs must be stored in the first column as row names.
  • At least 3 prognostic features are required.
  • time_col must contain finite numeric values greater than 0.
  • event_col must contain only 0 and 1.
  • At least 20 complete samples and at least 10 events are required after filtering incomplete rows.
Nomogram Bundle (nomo_data_file)

The plot mode reads the .qs bundle produced by build mode.

Required bundle objects:

  • nomogram
  • c_index
  • model
  • data
  • features
  • time_points

Output Files

Build Mode
FileDescription
data/Nomogram_list.qsSerialized nomogram bundle
data/analysis_data.rdsComplete-case dataset used for modeling
table/nomogram_c_index.xlsxNomogram discrimination summary
session_info.txtSession information and build parameters
Show full SKILL.md (417 more words)Show less
Plot Mode
FileDescription
plot/nomogram_plot.pdfRendered nomogram PDF
plot/session_info.txtPlotting session information and parameters
nomogram_c_index.xlsx
ColumnDescription
metricReported metric name
valueMetric value

Workflow

Step 1: Validate Input
  • Check file existence and CSV format.
  • Validate required feature, time, and event columns.
  • Validate time/event values and minimum sample/event counts.
Step 2: Prepare Modeling Dataset
  • Keep only requested features and outcome columns.
  • Convert character predictors to factors.
  • Remove incomplete rows across model variables.
Step 3: Fit Cox-Based Nomogram Model
  • Fit an rms::cph survival model.
  • Build survival functions at requested time points.
  • Construct the nomogram object.
Step 4: Evaluate Performance
  • Compute the model C-index.
  • Save a compact discrimination summary table.
Step 5: Save And Plot
  • Save the nomogram bundle and analysis dataset.
  • Render the nomogram PDF in plot mode.

Examples

Basic Build
bash
Rscript scripts/main.R \
  --mode build \
  -d clinical_data.csv \
  -f age,stage,risk \
  -o ./output/
Custom Prediction Horizons
bash
Rscript scripts/main.R \
  --mode build \
  -d clinical_data.csv \
  -f age,stage,risk,treatment \
  -y 1,3,5 \
  -o ./output/
Plot Existing Bundle
bash
Rscript scripts/main.R \
  --mode plot \
  -n ./output/data/Nomogram_list.qs \
  -p ./output/plot/nomogram_plot.pdf \
  -w 12 -H 9 -F 10

Error Handling

ErrorCauseSolution
SKILL_FILE_NOT_FOUNDInput file does not existVerify the file path
SKILL_EMPTY_DATAInput file is empty or has no usable rows and columnsRe-export the input file with valid rows and columns
SKILL_MISSING_COLUMNSRequired columns are absent from the clinical dataCheck column names and spelling
SKILL_INVALID_DATAInvalid time/event encoding, malformed bundle, or unreadable CSV/QS fileCheck input values and file integrity
SKILL_INSUFFICIENT_DATAToo few features, complete samples, or eventsProvide more valid predictors or samples
SKILL_ANALYSIS_ERRORcph() fitting, nomogram construction, or output writing failedCheck data quality, factor levels, and event distribution
SKILL_INVALID_PARAMETERMissing required CLI value, invalid mode, invalid years, or overwrite conflictReview command-line arguments
SKILL_PACKAGE_NOT_FOUNDRequired R package is not installedInstall with: Rscript -e "install.packages(c('rms', 'openxlsx', 'qs'), repos='https://cloud.r-project.org')"
SKILL_TIMEOUTThe configured timeout was exceededIncrease --timeout_seconds or reduce workload

IF error persists, READ: references/troubleshooting.md


Testing

Smoke Test With Included Data
bash
Rscript scripts/main.R --help

Rscript scripts/main.R \
  --mode build \
  -d tests/data/yuhou_cli_data.csv \
  -f age,gender,risk \
  -o tests/expected_output/ \
  --overwrite

Rscript scripts/main.R \
  --mode plot \
  -n tests/expected_output/data/Nomogram_list.qs \
  -p tests/expected_output/plot/nomogram_plot.pdf
Automated Smoke Test Script
bash
Rscript tests/run_smoke_test.R

Optional shell wrapper:

bash
bash tests/run_smoke_test.sh
Expected Output
text
tests/expected_output/
|-- data/analysis_data.rds
|-- data/Nomogram_list.qs
|-- plot/nomogram_plot.pdf
|-- plot/session_info.txt
|-- session_info.txt
`-- table/nomogram_c_index.xlsx

Historical development artifacts may still exist in tests/output/, but standardized validation uses tests/expected_output/.


References

  1. Harrell FE (2015). Regression Modeling Strategies.
  2. Iasonos A et al. (2008). How to build and interpret a nomogram for cancer prognosis. Journal of Clinical Oncology.
  3. Balachandran VP et al. (2015). Nomograms in oncology: more than meets the eye. The Lancet Oncology.

For detailed algorithm, READ: references/algorithm.md


Implementation Checklist

  • CLI parsing with optparse
  • set.seed() for reproducibility
  • requireNamespace() dependency checks
  • Session info recording
  • Timeout parameter exposed as CLI option
  • File reading instructions in SKILL.md
  • Modular script structure in scripts/
  • Test data provided in tests/data/
  • Error handling with SKILL_* codes
  • References documented in references/

Last updated: 2026-04-27 | Version: 2.1.0

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 23 other files (scripts, references) in awesome-med-research-skills/Data Analysis/nomogram-construction of aipoch/medical-research-skills.

  • SKILL.md
  • eval_report_nomogram-construction_result.json
  • references/algorithm.md
  • references/cli-guide.md
  • references/troubleshooting.md
  • scripts/functions.R
  • scripts/io.R
  • scripts/main.R
  • scripts/run_analysis.R
  • scripts/utils.R
  • scripts/validation.R
  • tests/data/yuhou_cli_data.csv
  • tests/expected_output/data/Nomogram_list.qs
  • tests/expected_output/data/analysis_data.rds
  • tests/expected_output/plot
  • … and 9 more

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Nomogram Construction next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nomogram Construction compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nomogram Construction this skillaipoch/medical-research-skills2k—~2.7kAutomated safety check: PassMIT
Find Skillsfastclaw-ai/fastclaw1.4k—~2.3kAutomated safety check: WarnCustom licence
Latchshot Page Capturegithub/awesome-copilot40k—~1.3kAutomated safety check: PassMIT
Steel Browseraiskillstore/marketplace430—~2kAutomated safety check: PassNone
Jev SEOAgriciDaniel/jev-seo527—~2.5kAutomated safety check: NotesMIT
Market Analysisqusong0627/QuantMind1.7k—~1kAutomated safety check: PassAGPL-3.0

Similar skills

  • Find Skills

    fastclaw-ai/fastclaw

    Run this BEFORE any package install (pip / npm / apt / brew / cargo / gem / go install) you would otherwise execute via the exec tool — including when the user asks for a deliverable that needs…

    1.4k GitHub stars~2.3k tokensUpdated yesterday
    Documents & OfficeAuto-check: warnings
  • Latchshot Page Capture

    github/awesome-copilot

    Official

    A skill your agent uses when a user needs a screenshot, website thumbnail, full-page capture, or PDF of a public HTTP(S) webpage saved as a local artifact through Latchshot, including report, QA…

    40k GitHub stars~1.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Steel Browser

    aiskillstore/marketplace

    Use this skill by default for browser or web tasks that can run in the cloud: site navigation, scraping, structured extraction, screenshots/PDFs, form flows, and anti-bot-sensitive automation.

    430 GitHub stars~2k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Jev SEO

    AgriciDaniel/jev-seo

    Full live SEO audit of any website from its homepage URL, powered by Jev (TypeSafe's System One model).

    527 GitHub stars~2.5k tokensUpdated 16 days ago
    Documents & OfficeAuto-check: notes
  • Market Analysis

    qusong0627/QuantMind

    市场分析报告(大盘快照版)— 复用市场分析页面全部数据能力:核心指数、市场广度与情绪温度、行业板块/热门概念热力图、行业多日涨跌幅对比(1/3/5日)、板块资金流(1日/5日/10日)、个股主力资金 Top20、标签体系统计。用户说「市场分析」「大盘分析」「行情分析」「今天市场怎么样」「市场报告」时使用:跑取数脚本(marketanalysis.py)→ AI 基于 facts 撰写解读 →…

    1.7k GitHub stars~1k tokensUpdated today
    Documents & OfficeAuto-check passed
  • PDF

    benchflow-ai/skillsbench

    ALWAYS use this skill instead of the Read tool for PDF files.

    1.8k GitHub stars~1.6k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Questions about Nomogram Construction

What does Nomogram Construction do?

A skill your agent uses when constructing a prognosis nomogram from survival-related clinical predictors, exporting the nomogram bundle and C-index table, and optionally rendering the final nomogram…. Nomogram Construction is an agent skill from aipoch/medical-research-skills. 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.

When should I use Nomogram Construction?

Nomogram Construction fits situations like: constructing a prognosis nomogram from survival-related clinical predictors; exporting the nomogram bundle and C-index table; optionally rendering the final nomogram PDF.

How do I install Nomogram Construction in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill nomogram-construction -a claude-code`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/nomogram-construction in aipoch/medical-research-skills) into .claude/skills/nomogram-construction in your project. Claude Code loads it when a task matches its description.

How do I install Nomogram Construction in Codex?

Run `npx skills add aipoch/medical-research-skills --skill nomogram-construction -a codex`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/nomogram-construction in aipoch/medical-research-skills) into .agents/skills/nomogram-construction in your project. Codex loads it when a task matches its description.

Can I use Nomogram Construction in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill nomogram-construction -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nomogram-construction, .gemini/skills/nomogram-construction, .github/skills/nomogram-construction and .opencode/skills/nomogram-construction in your project.

What does Nomogram Construction need to run?

Going by SKILL.md and its folder, Nomogram Construction needs R for the scripts in its folder and the command-line tools its instructions call (bash).

Does Nomogram Construction access the network?

SKILL.md names 1 domain. In commands or code: cloud.r-project.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Nomogram Construction safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Nomogram Construction use?

Nomogram Construction is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nomogram Construction use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Nomogram Construction?

Skills that share tags, products or a category with Nomogram Construction: Find Skills (fastclaw-ai/fastclaw, 1.4k stars), Latchshot Page Capture (github/awesome-copilot, 40k stars), Steel Browser (aiskillstore/marketplace, 430 stars) and Jev SEO (AgriciDaniel/jev-seo, 527 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nomogram Construction?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.