Agent skill

Sample Correlation Analysis

by aipoch in aipoch/medical-research-skills

A skill your agent uses when performing correlation analysis between two variables including Pearson and Spearman correlation methods.

MITAuto-check passedData & Analytics

Install Sample Correlation Analysis

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

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

GitHub CLI
$ gh skill install aipoch/medical-research-skills sample-correlation-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/sample-correlation-analysis' .claude/skills/sample-correlation-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
sample-correlation-analysis
GitHub stars
2k
Token cost
~1.3k tokens
SKILL.md length
423 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 performing correlation analysis between two variables including Pearson and Spearman correlation methods.

  • Works in 3 steps: Confirm the input file exists and… → Run scripts/main.R with the requested… → Check the output directory for result…
  • Performing correlation analysis between two variables including Pearson and Spearman correlation methods
  • SKILL.md covers Use This Skill When, Primary Command, Prerequisites and Core Arguments, plus 8 more sections
  • Runs R scripts from its folder; reaches cloud.r-project.org

What it does

Sample Correlation Analysis is an agent skill from aipoch/medical-research-skills. Use when performing correlation analysis between two variables including Pearson and Spearman correlation methods. Supports command-line parameter input, automatic data format detection, parameter validation, result directory creation, and CSV or TXT format result export.

Its SKILL.md is about 1.3k 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_sample-correlation-analysis_result.json`, `references/algorithm.md` and `references/cli-guide.md`).

It sits in Data & Analytics, covering CSV and tabular files. 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

  • Performing correlation analysis between two variables including Pearson and Spearman correlation methods
  • Tasks that involve CSV and tabular files

Example prompts

  • “/sample-correlation-analysis”

Workflow steps

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

  1. Confirm the input file exists and variable names are correct.
  2. Run scripts/main.R with the requested method and variable names.
  3. Check the output directory for result files under table/.

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

Sample Correlation Analysis loads about 1.3k tokens when it runs, and up to ~6.6k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 423 words of instructions outside code blocks.

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

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). 423 words, ~1,281 tokens.

Download SKILL.mdSave it as .claude/skills/sample-correlation-analysis/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
sample-correlation-analysis
description
Use when performing correlation analysis between two variables including Pearson and Spearman correlation methods. Supports command-line parameter input, automatic data format detection, parameter validation, result directory creation, and CSV or TXT format result export.
license
MIT
author
AIPOCH

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

Correlation Analysis

Use this skill to run correlation analysis on two variables from a tabular data file.

Use This Skill When

  • You need Pearson or Spearman correlation between two variables stored either as columns or as first-column row labels.
  • You need a command-line workflow with parameter validation.
  • You need standardized output files in CSV or TXT format.

Primary Command

bash
Rscript scripts/main.R \
  --data_file <input_file> \
  --method <pearson|spearman> \
  --x_var <variable_name> \
  --y_var <variable_name> \
  --output_dir <output_dir>

Prerequisites

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

Core Arguments

ArgumentRequiredDescription
--data_fileYesInput data file in CSV, TXT, or TSV format
--methodNoCorrelation method: pearson or spearman. Default pearson
--x_varNoFirst variable name. It can match a column name or a first-column row label. Default variable1
--y_varNoSecond variable name. It can match a column name or a first-column row label. Default variable2
--output_dirNoOutput directory, default ./Correlation_Results
--alternativeNotwo.sided, less, or greater. Default two.sided
--conf_levelNoConfidence level between 0 and 1, default 0.95
--output_formatNocsv or txt, default csv
--output_prefixNoOutput filename prefix, default correlation

Input Requirements

  • The input file must contain both target variables.
  • Both variables must contain numeric values.
  • If the first column stores variable names and the remaining columns are samples, the script automatically reads variables by row label.
  • Rows with missing values in either variable are excluded.
  • At least 3 complete observation pairs are needed.

Example input:

csv
variable1,variable2
10.2,8.5
11.5,9.2
9.8,7.9
Show full SKILL.md (186 more words)Show less

Minimal Workflow

  1. Confirm the input file exists and variable names are correct.
  2. Run scripts/main.R with the requested method and variable names.
  3. Check the output directory for result files under table/.

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

Outputs

Expected output structure:

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

Primary result file:

  • table/<output_prefix>_<method>.csv
  • table/<output_prefix>_<method>.txt

Result fields include:

  • method
  • correlation
  • statistic
  • p_value
  • conf_low
  • conf_high
  • sample_size
  • x_variable
  • y_variable
  • variable_orientation

Choose the Method

  • Use pearson for linear relationships between continuous variables.
  • Use spearman for monotonic relationships, non-normal data, or outlier-prone data.

Read These Files When Needed

NeedFile
Statistical details and assumptionsreferences/algorithm.md
More CLI examplesreferences/cli-guide.md
Error diagnosisreferences/troubleshooting.md
Main execution entry pointscripts/main.R
Sample test datatests/data/

Quick Examples

Pearson:

bash
Rscript scripts/main.R \
  --data_file tests/data/sample_correlation_1.csv \
  --method pearson \
  --x_var variable1 \
  --y_var variable2 \
  --output_dir tests/output_pearson

Spearman:

bash
Rscript scripts/main.R \
  --data_file tests/data/sample_correlation_3.csv \
  --method spearman \
  --x_var "Activated CD8 T cell" \
  --y_var "Central memory CD8 T cell" \
  --output_dir tests/output_spearman

Validation

bash
Rscript scripts/main.R --help
bash
Rscript scripts/main.R \
  --data_file tests/data/sample_correlation_1.csv \
  --method pearson \
  --x_var variable1 \
  --y_var variable2 \
  --output_dir tests/validation_output

After running analysis, verify that tests/validation_output/table/correlation_pearson.csv exists.

Common Errors

  • SKILL_FILE_NOT_FOUND: Input file path is wrong or inaccessible.
  • SKILL_MISSING_COLUMNS: One or both requested variables are missing.
  • SKILL_INVALID_DATA: Input data is malformed or unsuitable for analysis.
  • SKILL_INVALID_PARAMETER: An argument value is invalid.
  • SKILL_INSUFFICIENT_DATA: Too few complete observations remain after filtering.
  • SKILL_DEPENDENCY_MISSING: A required R package such as optparse or data.table 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/sample-correlation-analysis of aipoch/medical-research-skills.

  • SKILL.md
  • eval_report_sample-correlation-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/sample_correlation_1.csv
  • tests/data/sample_correlation_2.csv
  • tests/data/sample_correlation_3.csv

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Sample Correlation 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.

Sample Correlation Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sample Correlation Analysis this skillaipoch/medical-research-skills2k—~1.3kAutomated safety check: PassMIT
Excel and CSV Data Analysisbytedance/deer-flow83k4 repos~2.2kAutomated safety check: PassMIT
Exploratory Data AnalysisOleafly/Oleafly2063 repos~3.4kAutomated safety check: NotesMIT
CSV Data Summarizercoffeefuelbump/csv-data-summarizer-claude-skill4682 repos~1.4kAutomated safety check: PassNone
Raccoon DataanalysisSenseTime-Copilot/raccoon-dataanalysis-skill137—~1.9kAutomated safety check: PassNone
Football Match Reportricardoherediaj/football-analytics-tutorials119—~2.7kAutomated safety check: PassMIT

Similar skills

  • Excel and CSV Data Analysis

    bytedance/deer-flow

    Analyzes uploaded Excel and CSV files with SQL through DuckDB, producing schema inspections, statistical summaries and exports to CSV, JSON or Markdown.

    83k GitHub starsUsed in 4 repos~2.2k tokens
    Data & AnalyticsAuto-check passed
  • Perform bounded, local exploratory analysis of explicitly supported scientific files.

    206 GitHub starsUsed in 3 repos~3.4k tokens
    Data & AnalyticsAuto-check: notes
  • CSV Data Summarizer

    coffeefuelbump/csv-data-summarizer-claude-skill

    Analyzes CSV files, generates summary stats, and plots quick visualizations using Python and pandas.

    468 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Raccoon Dataanalysis

    SenseTime-Copilot/raccoon-dataanalysis-skill

    Raccoon (小浣熊) Data Analysis - Remote code interpreter and data visualization service powered by SenseTime.

    137 GitHub stars~1.9k tokensUpdated 6 mo ago
    Data & AnalyticsAuto-check passed
  • Football Match Report

    ricardoherediaj/football-analytics-tutorials

    Build post-match team + player reports (24-chart dashboard, per-player dashboards, stats CSV) from a WhoScored URL.

    119 GitHub stars~2.7k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed
  • CSV Data Analysis

    5zjk5/prompt-engineering

    This skill should be used when users need to analyze CSV or Excel files, understand data patterns, generate statistical summaries, or create data visualizations.

    127 GitHub stars~2.6k tokensUpdated 22 days ago
    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 Sample Correlation Analysis

What does Sample Correlation Analysis do?

A skill your agent uses when performing correlation analysis between two variables including Pearson and Spearman correlation methods. Sample Correlation Analysis is an agent skill from aipoch/medical-research-skills. Use when performing correlation analysis between two variables including Pearson and Spearman correlation methods.

When should I use Sample Correlation Analysis?

Sample Correlation Analysis fits situations like: performing correlation analysis between two variables including Pearson and Spearman correlation methods; tasks that involve CSV and tabular files.

How do I install Sample Correlation Analysis in Claude Code?

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

How do I install Sample Correlation Analysis in Codex?

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

Can I use Sample Correlation 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 sample-correlation-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/sample-correlation-analysis, .gemini/skills/sample-correlation-analysis, .github/skills/sample-correlation-analysis and .opencode/skills/sample-correlation-analysis in your project.

What does Sample Correlation Analysis need to run?

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

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

Sample Correlation 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 Sample Correlation Analysis use?

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

What are the alternatives to Sample Correlation Analysis?

Skills that share tags, products or a category with Sample Correlation Analysis: Excel and CSV Data Analysis (bytedance/deer-flow, 83k stars), Exploratory Data Analysis (Oleafly/Oleafly, 206 stars), CSV Data Summarizer (coffeefuelbump/csv-data-summarizer-claude-skill, 468 stars) and Raccoon Dataanalysis (SenseTime-Copilot/raccoon-dataanalysis-skill, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sample Correlation 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.