Agent skill

Xgboost Analysis

by aipoch in aipoch/medical-research-skills

A skill your agent uses when building XGBoost models on tabular data and returning feature importance ranking outputs.

MITAuto-check passedData & Analytics

Install Xgboost Analysis

skills CLI
$ npx skills add aipoch/medical-research-skills --skill xgboost-analysis -a claude-code

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

GitHub CLI
$ gh skill install aipoch/medical-research-skills xgboost-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/XGBoost-analysis' .claude/skills/xgboost-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
xgboost-analysis
GitHub stars
2k
Token cost
~1.9k tokens
SKILL.md length
648 words
Files
12 (incl. scripts, references)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building XGBoost models on tabular data and returning feature importance ranking outputs.

  • Works in 3 steps: Confirm the input file exists and the… → Run scripts/main.R with --data_file and… → Check the output directory for…
  • Building XGBoost models on tabular data and returning feature importance ranking outputs
  • SKILL.md covers Use This Skill When, Do Not Use This Skill When, Primary Command and Prerequisites, plus 9 more sections
  • Runs R scripts from its folder; reaches cloud.r-project.org

What it does

Xgboost Analysis is an agent skill from aipoch/medical-research-skills. Use when building XGBoost models on tabular data and returning feature importance ranking outputs. Supports binary classification and regression with automatic task detection, train-test split, performance tables, feature importance ranking tables, and PNG importance plots.

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

It sits in Data & Analytics, covering 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

  • Building XGBoost models on tabular data and returning feature importance ranking outputs
  • Tasks that involve Machine learning

Example prompts

  • “/xgboost-analysis”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the input file exists and the target column name is correct.
  2. Run scripts/main.R with --data_file and --target_var.
  3. Check the output directory for table/feature_importance_* and figure/feature_importance_*.

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

    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

Xgboost Analysis loads about 1.9k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 648 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.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). 648 words, ~1,857 tokens.

Download SKILL.mdSave it as .claude/skills/xgboost-analysis/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
xgboost-analysis
description
Use when building XGBoost models on tabular data and returning feature importance ranking outputs. Supports binary classification and regression with automatic task detection, train-test split, performance tables, feature importance ranking tables, and PNG importance plots.
license
MIT
author
AIPOCH

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

XGBoost Modeling And Feature Importance Ranking

Use this skill to train an XGBoost model from a tabular dataset and export both feature importance ranking tables and feature importance plots.

Use This Skill When

  • You need a command-line XGBoost workflow in R for tabular data.
  • You need a reproducible train-test split, model training, and evaluation.
  • You need feature importance ranking outputs as both a table and a figure.
  • You need automatic one-hot encoding for categorical predictors.
  • Your data may contain a first unnamed sample ID column such as V1 that should not enter the model.

Do Not Use This Skill When

  • Your classification target has more than 2 classes.
  • Your input is not tabular CSV, TXT, or TSV data.
  • You need causal interpretation, mechanism claims, or policy, business, or clinical conclusions.
  • You only need narrative interpretation or triage of an existing result rather than model training.

Primary Command

bash
Rscript scripts/main.R \
  --data_file <input_file> \
  --target_var <target_column> \
  --task_type <auto|classification|regression> \
  --output_dir <output_dir>

Prerequisites

  • Rscript is available in the shell.
  • Required R packages: optparse, data.table, Matrix, xgboost.
  • Install missing packages with Rscript -e 'install.packages(c("optparse", "data.table", "Matrix", "xgboost"), repos="https://cloud.r-project.org")'.

Core Arguments

ArgumentRequiredDescription
--data_fileYesInput CSV, TXT, or TSV file
--target_varYesTarget column used for modeling
--task_typeNoauto, classification, or regression. Default auto
--output_dirNoOutput directory, default ./XGBoost_Results
--ignore_varsNoComma-separated columns to exclude from predictors
--positive_classNoPositive class label for binary classification
--test_sizeNoTest set proportion between 0 and 1, default 0.2
--seedNoRandom seed, default 123
--nroundsNoMaximum boosting rounds, default 300
--max_depthNoTree depth, default 6
--etaNoLearning rate, default 0.1
--subsampleNoRow sampling ratio, default 0.8
--colsample_bytreeNoColumn sampling ratio, default 0.8
--min_child_weightNoMinimum child weight, default 1
--gammaNoMinimum split loss reduction, default 0
--lambdaNoL2 regularization, default 1
--alphaNoL1 regularization, default 0
--early_stopping_roundsNoEarly stopping rounds, default 20
--importance_metricNogain, cover, or frequency. Default gain
--top_nNoNumber of features to plot, default 20
--output_formatNoTable format: csv or txt, default csv
--output_prefixNoOutput filename prefix, default xgboost

Input Requirements

  • The input file must contain the target column.
  • Predictor columns can be numeric, integer, logical, character, or factor-like text.
  • Character and factor predictors are one-hot encoded automatically.
  • A first unnamed identifier column such as V1 is automatically excluded when it contains unique sample IDs.
  • Rows with missing target values are removed before training.
  • For classification, exactly 2 classes are required.
  • For regression, the target column must be numeric.
  • Each class should have at least 2 rows so both training and test sets can be created.

Example input:

csv
,fustat,CAMK2N2,GGT6,GPR161,RAB26,RIBC2
TCGA-C5-A1M5,1,2.248291938,5.274690305,2.825215762,3.121114894,5.35318565
TCGA-EA-A5O9,0,3.346176843,5.404368414,2.604616977,0.629473197,4.429314674
TCGA-C5-A3HL,0,3.363100974,5.363314779,4.124799581,4.127228806,4.916596068
Show full SKILL.md (218 more words)Show less

Minimal Workflow

  1. Confirm the input file exists and the target column name is correct.
  2. Run scripts/main.R with --data_file and --target_var.
  3. Check the output directory for table/feature_importance_* and figure/feature_importance_*.

If you omit --data_file or --target_var, the script exits with SKILL_MISSING_INPUT.

Outputs

Expected output structure:

text
<output_dir>/
├── table/
├── figure/
└── data/

Primary outputs:

  • table/<output_prefix>_feature_importance.csv
  • table/<output_prefix>_model_performance.csv
  • figure/<output_prefix>_feature_importance_<importance_metric>.png

Additional outputs:

  • session_info.txt

Feature importance table fields include:

  • Rank
  • Feature
  • Gain
  • Cover
  • Frequency
  • SelectedMetric
  • SelectedValue

Feature Importance Metrics

  • gain: Average contribution to loss reduction. Recommended for most ranking use cases.
  • cover: Relative sample coverage contributed by a feature.
  • frequency: How often the feature is used in splits.

Read These Files When Needed

NeedFile
XGBoost method details and importance interpretationreferences/algorithm.md
More CLI examplesreferences/cli-guide.md
Error diagnosisreferences/troubleshooting.md
Main execution entry pointscripts/main.R
Bundled test datatests/data/

Quick Examples

Auto-detected binary classification on dt_sample1.csv:

bash
Rscript scripts/main.R \
  --data_file tests/data/dt_sample1.csv \
  --target_var fustat \
  --task_type auto \
  --output_dir tests/output_binary

Binary classification on dt_sample2.csv:

bash
Rscript scripts/main.R \
  --data_file tests/data/dt_sample2.csv \
  --target_var fustat \
  --task_type classification \
  --importance_metric gain \
  --output_dir tests/output_gain

Character-label classification on dt_sample3.txt:

bash
Rscript scripts/main.R \
  --data_file tests/data/dt_sample3.txt \
  --target_var Group \
  --task_type classification \
  --positive_class high \
  --top_n 15 \
  --output_dir tests/output_group

Validation

bash
Rscript scripts/main.R --help
bash
Rscript scripts/main.R \
  --data_file tests/data/dt_sample1.csv \
  --target_var fustat \
  --task_type classification \
  --output_dir tests/validation_output

After running analysis, verify that these files exist:

  • tests/validation_output/table/xgboost_feature_importance.csv
  • tests/validation_output/table/xgboost_model_performance.csv
  • tests/validation_output/figure/xgboost_feature_importance_gain.png

Common Errors

  • SKILL_FILE_NOT_FOUND: Input file path is wrong or inaccessible.
  • SKILL_MISSING_COLUMNS: The target column is missing.
  • SKILL_INVALID_DATA: Data is malformed, the target type is unsuitable, classification has more or fewer than 2 classes, or too few usable rows remain.
  • SKILL_INVALID_PARAMETER: An argument value is invalid.
  • SKILL_DEPENDENCY_MISSING: A required R package such as xgboost is unavailable.

If the issue is not obvious, read references/troubleshooting.md.

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

  • SKILL.md
  • eval_report_xgboost-analysis_result.json
  • references/algorithm.md
  • references/cli-guide.md
  • references/troubleshooting.md
  • scripts/functions.R
  • scripts/main.R
  • scripts/run_analysis.R
  • scripts/utils.R
  • tests/data/dt_sample1.csv
  • tests/data/dt_sample2.csv
  • tests/data/dt_sample3.txt

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Xgboost 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.

Xgboost Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xgboost Analysis this skillaipoch/medical-research-skills2k—~1.9kAutomated safety check: PassMIT
Scikit LearnzLanqing/codex-claude-academic-skills4.6k17 repos~3.9kAutomated safety check: PassBSD-3-Clause
Senior Data ScientistRaidriar7170/hermes-skilleval1256 repos~1.4kAutomated safety check: PassMIT
Agentic Kaggle WorkflowFrankS-IntelLab/agentic-kaggle-skill188—~4kAutomated safety check: PassMIT
Retention Analysisliangdabiao/claude-data-analysis-ultra-main2901 repos~1.3kAutomated safety check: NotesNone
Geomlitalo-goncalves/geoML109—~4.2kAutomated safety check: PassGPL-3.0

Similar skills

  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 6 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Agentic Kaggle Workflow

    FrankS-IntelLab/agentic-kaggle-skill

    Takes a Kaggle competition from rules and validation design through baselines, ensembling and notebook architecture to a scored submission.

    188 GitHub stars~4k tokensUpdated 3 mo ago
    Data & AnalyticsAuto-check passed
  • Retention Analysis

    liangdabiao/claude-data-analysis-ultra-main

    Analyze user retention and churn using survival analysis, cohort analysis, and machine learning.

    290 GitHub starsUsed in 1 repo~1.3k tokens
    Data & AnalyticsAuto-check: notes
  • Geoml

    italo-goncalves/geoML

    Working knowledge of the geoML Python package (github.com/italo-goncalves/geoML): variational Gaussian processes for spatial data, implicit geological modelling, block models, drillhole data…

    109 GitHub stars~4.2k tokensUpdated 6 days ago
    Data & AnalyticsAuto-check passed
  • Radiomics ML

    Aperivue/medsci-skills

    A skill your agent uses when building or auditing a radiomics or tabular clinical-ML prediction model with a classical learner (LASSO, SVM, random forest, XGBoost and similar).

    329 GitHub starsUsed in 1 repo~2.7k tokens
    Data & AnalyticsAuto-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 Xgboost Analysis

What does Xgboost Analysis do?

A skill your agent uses when building XGBoost models on tabular data and returning feature importance ranking outputs. Xgboost Analysis is an agent skill from aipoch/medical-research-skills. Use when building XGBoost models on tabular data and returning feature importance ranking outputs.

When should I use Xgboost Analysis?

Xgboost Analysis fits situations like: building XGBoost models on tabular data and returning feature importance ranking outputs; tasks that involve Machine learning.

How do I install Xgboost Analysis in Claude Code?

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

How do I install Xgboost Analysis in Codex?

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

Can I use Xgboost 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 xgboost-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/xgboost-analysis, .gemini/skills/xgboost-analysis, .github/skills/xgboost-analysis and .opencode/skills/xgboost-analysis in your project.

What does Xgboost Analysis need to run?

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

Does Xgboost Analysis 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 Xgboost 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 Xgboost Analysis use?

Xgboost 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 Xgboost Analysis use?

About 1.9k tokens (SKILL.md is roughly 7.4k 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.9k tokens, read only when the agent opens those files.

What are the alternatives to Xgboost Analysis?

Skills that share tags, products or a category with Xgboost Analysis: Scikit Learn (zLanqing/codex-claude-academic-skills, 4.6k stars), Senior Data Scientist (Raidriar7170/hermes-skilleval, 125 stars), Agentic Kaggle Workflow (FrankS-IntelLab/agentic-kaggle-skill, 188 stars) and Retention Analysis (liangdabiao/claude-data-analysis-ultra-main, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xgboost Analysis?

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.