pca-dimensionality-reduction

pca-dimensionality-reduction is a skill for Claude Code, Codex from aipoch/medical-research-skills. It costs 48 tokens per session (1,504 once invoked), scanned A, original, MIT.

A command-line workflow for principal component analysis, a method that condenses many numeric measurements into fewer combined variables.

In plain words
What is it for?
It is for processing CSV, TXT, or TSV tables and exporting explained variance, sample scores, feature loadings, and diagnostic figures.
Why use it?
It standardizes data checks and exports so reduced-dimension results can be reused in later analysis.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for processing CSV, TXT, or TSV tables and exporting explained variance, sample scores, feature loadings, and diagnostic figures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aipoch/medical-research-skills/pca-dimensionality-reduction
About the project

Medical Research Agent Skills is a library of agent instructions for medical and biomedical research, covering evidence analysis, study protocol design, data analysis, and academic writing. Researchers use it to guide compatible coding agents through common scientific workflows. The catalogue contains many of the library's skills and commands.

aipoch/medical-research-skills · 1,860 stars · on GitHub · aipoch.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aipoch/medical-research-skills --skill pca-dimensionality-reduction
Clone the repo
git clone --depth 1 https://github.com/aipoch/medical-research-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pca-dimensionality-reduction

README.md
[![agentmods](https://agentmods.dev/badge/skills/aipoch/medical-research-skills/pca-dimensionality-reduction/github.svg)](https://agentmods.dev/skills/aipoch/medical-research-skills/pca-dimensionality-reduction)
Your own site
<a href="https://agentmods.dev/skills/aipoch/medical-research-skills/pca-dimensionality-reduction"><img src="https://agentmods.dev/badge/skills/aipoch/medical-research-skills/pca-dimensionality-reduction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pca-dimensionality-reduction

Your own site · 80×15
<a href="https://agentmods.dev/skills/aipoch/medical-research-skills/pca-dimensionality-reduction"><img src="https://agentmods.dev/badge/skills/aipoch/medical-research-skills/pca-dimensionality-reduction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01504
Opus 5 $0.00024 $0.00752
Sonnet 5 $0.00010 $0.00301
Haiku 4.5 $0.00005 $0.00150

Measured 13d ago against content hash 89b118a51852, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pca-dimensionality-reduction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

awesome-med-research-skills/Data Analysis/pca-dimensionality-reduction/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

Argument Required Description
--data_file Yes Input data file in CSV, TXT, or TSV format
--output_dir No Output directory, default ./PCA_Results
--feature_columns No Comma-separated numeric feature columns. Default uses all numeric columns except ID/group columns
--sample_id_column No Optional sample ID column. If omitted and the first column is non-numeric with unique values, it is used automatically
--group_column No Optional grouping column to carry into score output and score plot
--n_components No Maximum number of principal components to export, default 5
--center_data No true or false, default true
--scale_data No true or false, default true
--top_loadings No Number of top absolute loadings to export per component, default 10
--output_format No csv or txt, default csv
--output_prefix No Output filename prefix, default pca

Read the full file on GitHub · 185 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 185 lines · 48 tokens per session scan A 89b118a51852

Subscribe to this mod's changes

pca-dimensionality-reduction is a skill published in the GitHub repository aipoch/medical-research-skills (1,860 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 1,504 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.