Agent skill

Rf Model Importance Analysis

by aipoch in aipoch/medical-research-skills

A skill your agent uses when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate…

MITAuto-check passedData & Analytics

Install Rf Model Importance Analysis

skills CLI
$ npx skills add aipoch/medical-research-skills --skill rf-model-importance-analysis -a claude-code

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

GitHub CLI
$ gh skill install aipoch/medical-research-skills rf-model-importance-analysis --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/rf-model-importance-analysis' .claude/skills/rf-model-importance-analysis && 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
rf-model-importance-analysis
GitHub stars
1.9k
Token cost
~2.7k tokens
SKILL.md length
1,000 words
Files
23 (incl. scripts, references)
Skills in repo
578
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate…

  • Works in 3 steps: Standard Run → Tuned Importance Run → Plot-Only Rerender
  • You need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix
  • SKILL.md covers Quick Start, When to Read External Files, Stop Conditions and Usage, plus 5 more sections
  • Runs R scripts from its folder

What it does

Rf Model Importance Analysis is an agent skill from aipoch/medical-research-skills. Use when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate reproducible error and importance plots. NOT for regression tasks, multi-class classification, missing-value imputation, preprocessing, or remote data fetching.

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

It sits in Data & Analytics, covering Data cleaning and Machine learning. 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

  • You need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix
  • Rank variable importance
  • Generate reproducible error and importance plots

Example prompts

  • “/rf-model-importance-analysis”

Workflow steps

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

  1. Standard Run
  2. Tuned Importance Run
  3. Plot-Only Rerender

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 13 files in scripts/ (R, from the files we listed), which the agent can run.

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

  • Network

    No URLs in SKILL.md.

    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

Rf Model Importance Analysis loads about 2.7k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 1,000 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
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
~6.8k

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,000 words, ~2,677 tokens.

Download SKILL.mdSave it as .claude/skills/rf-model-importance-analysis/SKILL.md (or your agent's skills folder). This skill also uses 22 other files; get the full folder from GitHub.
name
rf-model-importance-analysis
description
Use when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate reproducible error and importance plots. NOT for regression tasks, multi-class classification, missing-value imputation, preprocessing, or remote data fetching.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

RF Model Importance Analysis

Quick Start

Use one of these three commands first, then consult the full argument table only if you need extra tuning.

1. Standard Run
bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --case_group AR \
  --control_group Control \
  --output_dir tests/output/manual-test \
  --seed 42 \
  --timeout_seconds 300
2. Tuned Importance Run
bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --case_group AR \
  --control_group Control \
  --output_dir tests/output/custom-importance \
  --seed 42 \
  --rf_ntree 800 \
  --rf_mtry 4 \
  --rf_imp_type 2 \
  --rf_imp_threshold 1 \
  --rf_top_n 8 \
  --rf_importance_top_n 8 \
  --timeout_seconds 300
3. Plot-Only Rerender

Run this only after a full analysis has already created output_dir/data/rf_result.rds.

bash
Rscript scripts/main.R \
  --plot_only TRUE \
  --output_dir tests/output/manual-test \
  --seed 42 \
  --timeout_seconds 300

When to Read External Files

SituationFile to ReadPurpose
Need algorithm detailsreferences/algorithm.mdExplain random forest modeling, importance metrics, assumptions, and result interpretation
Need to execute the analysisscripts/main.RRun the CLI entry point with a complete Rscript command
Encounter an errorreferences/troubleshooting.mdMap error codes to causes and fixes
Need CLI examplesreferences/cli-guide.mdSee installation steps and runnable command examples
Need a runnable smoke testtests/data/Use the bundled small dataset for verification

Stop Conditions

Do not use this skill when any of the following is true:

  • The task is regression, multiclass classification, time-series modeling, or remote data fetching.
  • The input still requires imputation, normalization, batch correction, or other preprocessing.
  • The feature matrix contains missing values, non-numeric feature columns, or mismatched sample IDs.

If one of those conditions applies, stop and hand off to a preprocessing or alternative modeling workflow before running this skill.

Usage

Before running the CLI, ensure the data is already cleaned for binary classification: samples in rows, numeric feature columns only, and no missing values. Imputation, normalization, and batch correction are outside this skill's scope.

bash
Rscript scripts/main.R \
  --input_file ./input/expression_matrix.csv \
  --group_file ./input/group_info.csv \
  --case_group Case \
  --control_group Control \
  --output_dir output/basic-run \
  --seed 42 \
  --timeout_seconds 600

Arguments

ShortLongTypeDefaultRequiredDescription
-i--input_filecharacternoneyes, unless --plot_only TRUEExpression matrix file with samples in rows and features in columns
-g--group_filecharacternoneyes, unless --plot_only TRUEGroup file with sample IDs in the first column
-c--case_groupcharacternoneyes, unless --plot_only TRUECase group label
-r--control_groupcharacternoneyes, unless --plot_only TRUEControl group label
-o--output_dircharacteroutputyesOutput directory inside the skill root
-p--plot_onlylogicalFALSEnoReuse output_dir/data/rf_result.rds and regenerate plots without retraining
-s--seedinteger42noRandom seed for reproducibility
-t--timeout_secondsinteger600noElapsed time limit for the run
--rf_ntreeinteger500noNumber of trees in the random forest
--rf_mtryintegerNAnoVariables sampled at each split; NA uses the package default
--rf_nodesizeintegerNAnoMinimum terminal node size; NA uses the package default
--rf_imp_typeinteger1noImportance metric type passed to randomForest::importance; allowed values are 1 or 2
--rf_imp_thresholdnumeric0noMinimum importance score retained in rf_top_features.csv
--rf_top_ninteger30noMaximum number of rows written to rf_top_features.csv
--rf_error_xlabcharacterNumber of TreesnoX-axis label for the RF error plot
--rf_error_ylabcharacterErrornoY-axis label for the RF error plot
--rf_error_line_sizenumeric0.6noLine width for the RF error plot
--rf_error_line_alphanumeric1noLine alpha for the RF error plot
--rf_error_line_colorcharacter#6C85F9,#D9503D,#939DE4,#DEA441,#A2C6D6,#E9B9E1,#BDD69F,#EBC98AnoComma-separated line colors for non-OOB curves
--rf_error_line_typecharacterdashednoLine type for class-specific error curves
--rf_error_line_oob_typecharactersolidnoLine type for the OOB curve
--rf_error_legend_positioncharacternonenoLegend position for the RF error plot
--rf_error_border_colorcharacterblacknoPanel border color for the RF error plot
--rf_error_border_fillcharacterNAnoPanel fill for the RF error plot; use NA or NULL as text
--rf_error_border_sizenumeric0.8noPanel border width for the RF error plot
--rf_error_base_sizenumeric14noBase font size for the RF error plot
--rf_error_widthnumeric6noRF error plot width in inches
--rf_error_heightnumeric5noRF error plot height in inches
--rf_importance_sortlogicalTRUEnoSort variables in the importance plot
--rf_importance_top_ninteger10noMaximum number of variables shown in the importance plot
--rf_importance_label_x_annlogicalTRUEnoShow x-axis tick labels in the importance plot
--rf_importance_label_colorcharacterblacknoText and point outline color in the importance plot
--rf_importance_label_cexnumeric0.9noLabel size in the importance plot
--rf_importance_point_cexnumeric0.9noPoint size in the importance plot
--rf_importance_point_shapeinteger23noPoint shape in the importance plot
--rf_importance_point_fillcharacterrednoPoint fill color in the importance plot
--rf_importance_line_colorcharactergraynoSegment color in the importance plot
--rf_importance_theme_borderlogicalTRUEnoDraw panel borders in the importance plot
--rf_importance_theme_offsetnumeric0.2noAxis expansion factor in the importance plot
--rf_importance_titlecharacterVariable ImportancenoMain title for the importance plot
--rf_importance_title_x_annlogicalTRUEnoShow title and axis annotations in the importance plot
--rf_importance_widthnumeric6noRF importance plot width in inches
--rf_importance_heightnumeric5noRF importance plot height in inches
Show full SKILL.md (263 more words)Show less

Input Format

Expression Matrix
  • CSV or TSV.
  • First column: sample IDs.
  • Remaining columns: numeric features.
  • Samples must be rows.
  • Missing or non-numeric feature values are not allowed.

Example:

csv
sample,HIF1A,NR4A1,SOCS1
S1,6.21,-1.34,2.01
S2,6.57,0.37,3.62
S3,7.05,2.12,5.01
Group File
  • CSV or TSV.
  • First column: sample IDs.
  • One additional column must contain both the case and control labels.
  • Exactly two groups are supported.

Example:

csv
sample,group
S1,Case
S2,Case
S3,Control

Output Files

FileFormatDescription
data/rf_result.rdsRDSSerialized model bundle with the trained random forest and metadata
table/rf_feature_importance.csvCSVFull ranked feature-importance table using the selected importance metric
table/rf_top_features.csvCSVFiltered top feature table after applying --rf_imp_threshold and --rf_top_n
plot/rf_error_plot.pdfPDFError curves across trees for OOB and class-specific classification error
plot/rf_importance_plot.pdfPDFVariable-importance plot generated by randomForest::varImpPlot()
session_info.txtTXTR version, platform, and package version information

Error Handling

  • Successful runs exit with status code 0.
  • Failed runs exit with status code 1.
  • Error messages use standardized names such as SKILL_FILE_NOT_FOUND and SKILL_INVALID_PARAMETER.
  • Output paths are validated so that --output_dir cannot write outside the skill root.
  • The analysis never performs network requests and never executes user input through eval(), exec(), or system().

Common codes:

Error CodeMeaning
SKILL_FILE_NOT_FOUNDAn input file or required plot-only artifact does not exist
SKILL_MISSING_COLUMNSThe input file does not contain the required columns
SKILL_EMPTY_DATAAn input file is empty or a required model table is unavailable
SKILL_INVALID_PARAMETERA CLI argument, group setting, numeric constraint, or path is invalid
SKILL_SAMPLE_MISMATCHSample IDs do not match between the expression matrix and group file
SKILL_PACKAGE_NOT_FOUNDOne or more required CRAN packages are missing

For detailed fixes, READ: references/troubleshooting.md

Testing

Help Check
bash
Rscript scripts/main.R --help
Full Test Run
bash
Rscript tests/run_tests.R
Direct Test Command
bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --case_group AR \
  --control_group Control \
  --output_dir tests/output/manual-test \
  --seed 42 \
  --rf_ntree 200 \
  --rf_top_n 5 \
  --rf_importance_top_n 5 \
  --timeout_seconds 300

© 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 22 other files (scripts, references) in awesome-med-research-skills/Data Analysis/rf-model-importance-analysis of aipoch/medical-research-skills.

  • SKILL.md
  • eval_report_rf-model-importance-analysis_result.json
  • references/algorithm.md
  • references/cli-guide.md
  • references/troubleshooting.md
  • scripts/cli_options.R
  • scripts/core_option_groups.R
  • scripts/functions.R
  • scripts/io.R
  • scripts/main.R
  • scripts/option_validation.R
  • scripts/path_utils.R
  • scripts/plot_option_groups.R
  • scripts/recording.R
  • scripts/run_analysis.R
  • scripts/utils.R
  • scripts/validation_utils.R
  • scripts/visualization.R
  • tests
  • … and 4 more

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Rf Model Importance Analysis 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.

Rf Model Importance Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rf Model Importance Analysis this skillaipoch/medical-research-skills1.9k—~2.7kAutomated safety check: PassMIT
Sap Hana Cloud Data Intelligencesecondsky/sap-skills462—~3.2kAutomated safety check: PassGPL-3.0
Splitting Datasetsjeremylongshore/tons-of-skills-marketplace2.8k—~836Automated safety check: PassMIT
Scientific Data Preprocessingforyourhealth111-pixel/Vibe-Skills3.6k—~5kAutomated safety check: PassApache-2.0
ML Data Leakage Guardforyourhealth111-pixel/Vibe-Skills3.6k—~3.4kAutomated safety check: PassApache-2.0
Data Cleanbrycewang-stanford/Auto-Empirical-Research-Skills4.6k—~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Develops data processing pipelines, integrations, and machine learning scenarios in SAP Data Intelligence Cloud.

    462 GitHub stars~3.2k tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • Splitting Datasets

    jeremylongshore/tons-of-skills-marketplace

    Process split datasets into training, validation, and testing sets for ML model development.

    2.8k GitHub stars~836 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Scientific Data Preprocessing

    foryourhealth111-pixel/Vibe-Skills

    ⚠️ CRITICAL USER EXPERIENCE-BASED SKILL - ALWAYS CONSULT BEFORE DATA PREPROCESSING ⚠️ Prevents catastrophic errors (88.9% error rate in V1.0 case study) through multi-level feature analysis, data…

    3.6k GitHub stars~5k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • ML Data Leakage Guard

    foryourhealth111-pixel/Vibe-Skills

    Detects and prevents data leakage in machine learning and mathematical modeling.

    3.6k GitHub stars~3.4k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Data Clean

    brycewang-stanford/Auto-Empirical-Research-Skills

    Produce documented data cleaning scripts that log every transformation with N before/after each step, generate a CONSORT-style exclusion flow diagram, create decision log entries for every…

    4.6k GitHub stars~1.1k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check passed
  • Nan Safe Correlation

    jaechang-hits/SciAgent-Skills

    Per-feature NaN-safe Spearman/Pearson correlation across many features (genes, proteins, variants) with missing values.

    374 GitHub starsUsed in 1 repo~2.9k tokens
    Data & AnalyticsAuto-check passed

More from aipoch/medical-research-skills

All 578 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…

    1.9k GitHub stars~2.2k tokensUpdated 23 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.

    1.9k GitHub stars~1.4k tokensUpdated 23 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.

    1.9k GitHub stars~3.7k tokensUpdated 23 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

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

    1.9k GitHub stars~1.8k tokensUpdated 23 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…

    1.9k GitHub stars~1.7k tokensUpdated 23 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

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

    1.9k GitHub stars~1.3k tokensUpdated 23 days ago
    Auto-check passed

Questions about Rf Model Importance Analysis

What does Rf Model Importance Analysis do?

A skill your agent uses when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate…. Rf Model Importance Analysis is an agent skill from aipoch/medical-research-skills. Use when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate reproducible error and importance plots.

When should I use Rf Model Importance Analysis?

Rf Model Importance Analysis fits situations like: you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix; rank variable importance; generate reproducible error and importance plots.

How do I install Rf Model Importance Analysis in Claude Code?

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

How do I install Rf Model Importance Analysis in Codex?

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

Can I use Rf Model Importance Analysis 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 rf-model-importance-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rf-model-importance-analysis, .gemini/skills/rf-model-importance-analysis, .github/skills/rf-model-importance-analysis and .opencode/skills/rf-model-importance-analysis in your project.

What does Rf Model Importance Analysis need to run?

Going by SKILL.md and its folder, Rf Model Importance Analysis needs R for the scripts in its folder.

Does Rf Model Importance Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rf Model Importance Analysis 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 Rf Model Importance Analysis use?

Rf Model Importance Analysis 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 Rf Model Importance Analysis 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 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Rf Model Importance Analysis?

Skills that share tags, products or a category with Rf Model Importance Analysis: Sap Hana Cloud Data Intelligence (secondsky/sap-skills, 462 stars), Splitting Datasets (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Scientific Data Preprocessing (foryourhealth111-pixel/Vibe-Skills, 3.6k stars) and ML Data Leakage Guard (foryourhealth111-pixel/Vibe-Skills, 3.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rf Model Importance Analysis?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,937 GitHub stars. The repository holds 578 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.