Agent skill

Pca Dimensionality Reduction

by aipoch in aipoch/medical-research-skills

A skill your agent uses when performing PCA principal component dimensionality reduction on tabular numeric data.

MITAuto-check passedData & Analytics

Install Pca Dimensionality Reduction

skills CLI
$ npx skills add aipoch/medical-research-skills --skill pca-dimensionality-reduction -a claude-code

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

GitHub CLI
$ gh skill install aipoch/medical-research-skills pca-dimensionality-reduction --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/pca-dimensionality-reduction' .claude/skills/pca-dimensionality-reduction && 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
pca-dimensionality-reduction
GitHub stars
2k
Token cost
~1.5k tokens
SKILL.md length
499 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 PCA principal component dimensionality reduction on tabular numeric data.

  • Works in 3 steps: Confirm the input file exists and… → Run scripts/main.R with the requested… → Check the output directory for result…
  • Performing PCA principal component dimensionality reduction on tabular numeric data
  • 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

Pca Dimensionality Reduction is an agent skill from aipoch/medical-research-skills. Use when performing PCA principal component dimensionality reduction on tabular numeric data. Supports command-line parameter input, automatic numeric feature selection, parameter validation, result directory creation, and CSV or TXT format result export.

Its SKILL.md is about 1.5k 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_pca-dimensionality-reduction_result.json`, `references/algorithm.md` and `references/cli-guide.md`).

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

  • Performing PCA principal component dimensionality reduction on tabular numeric data
  • Tasks that involve CSV and tabular files
  • Tasks that involve Machine learning

Example prompts

  • “/pca-dimensionality-reduction”

Workflow steps

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

  1. Confirm the input file exists and identify the numeric feature columns for PCA.
  2. Run scripts/main.R with the requested output directory and optional feature, ID, or group columns.
  3. Check the output directory for result files under table/, data/, and figure/.

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

Pca Dimensionality Reduction loads about 1.5k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 499 words of instructions outside code blocks.

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

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). 499 words, ~1,503 tokens.

Download SKILL.mdSave it as .claude/skills/pca-dimensionality-reduction/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
pca-dimensionality-reduction
description
Use when performing PCA principal component dimensionality reduction on tabular numeric data. Supports command-line parameter input, automatic numeric feature selection, parameter validation, result directory creation, and CSV or TXT format result export.
license
MIT
author
AIPOCH

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

PCA Dimensionality Reduction Analysis

Use this skill to run principal component analysis on a tabular dataset and export explained variance, sample scores, feature loadings, and diagnostic figures.

Use This Skill When

  • You need to reduce multiple numeric variables into a smaller set of principal components.
  • You need a command-line PCA workflow with parameter validation.
  • You need standardized output files for downstream analysis.

Primary Command

bash
Rscript scripts/main.R \
  --data_file <input_file> \
  --output_dir <output_dir> \
  --feature_columns <comma_separated_numeric_columns>

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
--output_dirNoOutput directory, default ./PCA_Results
--feature_columnsNoComma-separated numeric feature columns. Default uses all numeric columns except ID/group columns
--sample_id_columnNoOptional sample ID column. If omitted and the first column is non-numeric with unique values, it is used automatically
--group_columnNoOptional grouping column to carry into score output and score plot
--n_componentsNoMaximum number of principal components to export, default 5
--center_dataNotrue or false, default true
--scale_dataNotrue or false, default true
--top_loadingsNoNumber of top absolute loadings to export per component, default 10
--output_formatNocsv or txt, default csv
--output_prefixNoOutput filename prefix, default pca

Input Requirements

  • The input file must contain at least 2 usable numeric feature columns.
  • PCA is run on rows as samples and columns as features.
  • Missing or non-finite values in selected feature columns are removed row-wise before analysis.
  • At least 2 complete samples must remain after filtering.
  • Selected feature columns must have non-zero variance after filtering.

Example input:

csv
SampleID,Group,GeneA,GeneB,GeneC,GeneD
S01,Control,2.1,1.9,8.2,4.3
S02,Control,2.4,2.2,8.0,4.6
S03,Treated,6.1,5.7,2.8,8.1

Minimal Workflow

  1. Confirm the input file exists and identify the numeric feature columns for PCA.
  2. Run scripts/main.R with the requested output directory and optional feature, ID, or group columns.
  3. Check the output directory for result files under table/, data/, and figure/.

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

Show full SKILL.md (179 more words)Show less

Outputs

Expected output structure:

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

Primary result files:

  • table/<output_prefix>_summary.csv
  • table/<output_prefix>_scores.csv
  • table/<output_prefix>_loadings.csv
  • table/<output_prefix>_top_loadings.csv

Figure files:

  • figure/<output_prefix>_scree_plot.png
  • figure/<output_prefix>_score_plot.png

Key fields include:

  • component
  • standard_deviation
  • variance
  • proportion_variance
  • cumulative_variance
  • sample_id
  • feature
  • loading

Interpretation Guide

  • Use proportion_variance and cumulative_variance to decide how many components to retain.
  • Use the score table to inspect sample separation in PC space.
  • Use the loading tables to identify which original variables drive each component.

Read These Files When Needed

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

Quick Examples

Basic PCA with explicit feature columns:

bash
Rscript scripts/main.R \
  --data_file tests/data/sample_pca_1.csv \
  --sample_id_column SampleID \
  --group_column Group \
  --feature_columns GeneA,GeneB,GeneC,GeneD,GeneE \
  --output_dir tests/output_basic

Auto-detect all numeric columns:

bash
Rscript scripts/main.R \
  --data_file tests/data/sample_pca_2.csv \
  --n_components 3 \
  --output_dir tests/output_numeric_only

Disable scaling:

bash
Rscript scripts/main.R \
  --data_file tests/data/sample_pca_1.csv \
  --sample_id_column SampleID \
  --group_column Group \
  --scale_data false \
  --output_dir tests/output_unscaled

Validation

bash
Rscript scripts/main.R --help
bash
Rscript scripts/main.R \
  --data_file tests/data/sample_pca_1.csv \
  --sample_id_column SampleID \
  --group_column Group \
  --feature_columns GeneA,GeneB,GeneC,GeneD,GeneE \
  --output_dir tests/validation_output

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

Common Errors

  • SKILL_FILE_NOT_FOUND: Input file path is wrong or inaccessible.
  • SKILL_MISSING_COLUMNS: A requested feature, sample ID, or group column is missing.
  • SKILL_INVALID_DATA: Input data is malformed or unsuitable for PCA.
  • SKILL_INVALID_PARAMETER: An argument value is invalid.
  • SKILL_INSUFFICIENT_DATA: Too few complete samples or features remain for PCA.
  • 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/pca-dimensionality-reduction of aipoch/medical-research-skills.

  • SKILL.md
  • eval_report_pca-dimensionality-reduction_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_pca_1.csv
  • tests/data/sample_pca_2.csv
  • tests/data/sample_pca_3.csv

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Pca Dimensionality Reduction 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.

Pca Dimensionality Reduction compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pca Dimensionality Reduction this skillaipoch/medical-research-skills2k—~1.5kAutomated safety check: PassMIT
Flowiodavila7/claude-code-templates32k10 repos~4.2kAutomated safety check: PassMIT
Splitting Datasetsjeremylongshore/tons-of-skills-marketplace2.8k1 repos~836Automated safety check: PassMIT
Unimoljinzhezenggroup/computational-chemistry-agent-skills1481 repos~1.5kAutomated safety check: PassLGPL-3.0-or-later
Excel and CSV Data Analysisbytedance/deer-flow83k4 repos~2.2kAutomated safety check: PassMIT
Exploratory Data AnalysisOleafly/Oleafly2063 repos~3.4kAutomated safety check: NotesMIT

Similar skills

  • Flowio

    davila7/claude-code-templates

    Parse FCS (Flow Cytometry Standard) files v2.0-3.1. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 10 repos~4.2k tokens
    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 starsUsed in 1 repo~836 tokens
    Data & AnalyticsAuto-check passed
  • Unimol

    jinzhezenggroup/computational-chemistry-agent-skills

    A standardized CLI wrapper for Uni-Mol molecular ML workflows that handles representation extraction (embeddings), model training (regression/classification), and property prediction with built-in…

    148 GitHub starsUsed in 1 repo~1.5k tokens
    AI & LLM EngineeringAuto-check passed
  • 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

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 Pca Dimensionality Reduction

What does Pca Dimensionality Reduction do?

A skill your agent uses when performing PCA principal component dimensionality reduction on tabular numeric data. Pca Dimensionality Reduction is an agent skill from aipoch/medical-research-skills. Use when performing PCA principal component dimensionality reduction on tabular numeric data.

When should I use Pca Dimensionality Reduction?

Pca Dimensionality Reduction fits situations like: performing PCA principal component dimensionality reduction on tabular numeric data; tasks that involve CSV and tabular files; tasks that involve Machine learning.

How do I install Pca Dimensionality Reduction in Claude Code?

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

How do I install Pca Dimensionality Reduction in Codex?

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

Can I use Pca Dimensionality Reduction 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 pca-dimensionality-reduction -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pca-dimensionality-reduction, .gemini/skills/pca-dimensionality-reduction, .github/skills/pca-dimensionality-reduction and .opencode/skills/pca-dimensionality-reduction in your project.

What does Pca Dimensionality Reduction need to run?

Going by SKILL.md and its folder, Pca Dimensionality Reduction needs R for the scripts in its folder.

Does Pca Dimensionality Reduction 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 Pca Dimensionality Reduction 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 Pca Dimensionality Reduction use?

Pca Dimensionality Reduction 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 Pca Dimensionality Reduction use?

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

What are the alternatives to Pca Dimensionality Reduction?

Skills that share tags, products or a category with Pca Dimensionality Reduction: Flowio (davila7/claude-code-templates, 32k stars), Splitting Datasets (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Unimol (jinzhezenggroup/computational-chemistry-agent-skills, 148 stars) and Excel and CSV Data Analysis (bytedance/deer-flow, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pca Dimensionality Reduction?

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.