AIDRIN Skill
AIDRIN ships a Model Context Protocol (MCP) server and a Claude Code skill that together let Claude drive AIDRIN assessments on your behalf — running metrics, interpreting results, and writing a readiness report — all from a plain-language request.
No commands to remember, no argument ordering to look up. Claude handles it.
How It Works
Two components plug into Claude Code:
- MCP server (
aidrin-mcp) Exposes all AIDRIN metrics as tools that Claude can call directly. Claude sends named parameters; the server runs the metric and returns structured JSON. Image side-effects are suppressed by default, so only the JSON result comes back.
- Skill (
.claude/skills/aidrin/) Instructs Claude on the full assessment workflow: which metrics to run for which intent, what column roles to confirm before running privacy or fairness metrics, how to interpret scores, and how to format the report. The skill is read by Claude Code at session start when the AIDRIN directory is open.
Claude Code reads .mcp.json from the project root to start the MCP server automatically.
Both files ship with the AIDRIN repository — no extra configuration is required.
Prerequisites
Claude Code installed (CLI, desktop app, or IDE extension). See the Claude Code documentation.
AIDRIN installed in a Python 3.11+ environment with its conda/virtual environment activated. If you haven’t done this yet, follow CLI Installation first, then return here.
Setup
Step 1 — Install AIDRIN with MCP support
Once your environment is active, add the [mcp] extra from the repository root:
pip install -e '.[mcp]'
Or, with uv:
uv sync --group mcp
Verify the command is on your PATH before continuing:
which aidrin-mcp # should print a path inside your active environment
Custom criteria outlier rules can be supplied to run_custom_outlier_check
or run_aidrin_metric as inline rules_json or as rules_file. A
rules_file path is read on the MCP server host and must point to a UTF-8
JSON array in the same format as examples/custom_outlier_rules.json.
Set "target_match": "regex" on a rule to apply it to every target whose
complete column name or HDF5 dataset path matches target.
File manifests can be checked with the dedicated verify_file_references tool,
or with run_aidrin_metric using metric file-reference-validation and the
path_targets argument. Relative paths default to the manifest’s directory;
pass base_dir when they use another root. max_results caps invalid and
metadata details, while scan_limit optionally caps all inspected occurrences.
Set target_match="regex" to interpret each path_targets value as a
regular expression matched against the complete column or HDF5 dataset name.
Both the manifest and its referenced files are read from the MCP server host, not
the Claude client machine.
The local stdio MCP server intentionally does not apply the web interface’s
configured root allowlist. It uses the filesystem permissions of the account
that started aidrin-mcp and should be connected only to trusted clients.
Variable units can be audited with verify_variable_units or with
run_aidrin_metric using variable-unit-validation. With no sidecar,
the tools return an audit of existing metadata. Supply at most one of
unit_metadata_json and unit_metadata_file to apply resolutions and
revalidate the complete sidecar. File paths resolve on the execution host,
including a selected remote endpoint. See Unit Metadata Audit and Repair
for the canonical sidecar schema and deterministic validation rules.
Step 2 — Open the AIDRIN directory in Claude Code
The repository already contains .mcp.json at the root:
{
"mcpServers": {
"aidrin": {
"type": "stdio",
"command": "aidrin-mcp",
"args": [],
"env": {}
}
}
}
When you open this directory in Claude Code, the MCP server starts automatically and AIDRIN’s tools become available to Claude for that session.
Note
Using a different project directory? The skill ships inside the
aidrin package, so from your project root run:
aidrin skill install
This installs into every skills folder already present in the project
(.claude/skills, .agents/skills); pass --dir <folder> to
pick one explicitly or to create it. Then copy .mcp.json alongside
it; Claude Code picks both up on next launch. After
pip install -U aidrin, re-run aidrin skill install to refresh the
skill to the version that matches the package.
To skip the copying entirely, install the plugin instead (Alternative — Install as a Claude Code plugin): it carries both components and needs no per-project files.
Step 3 — Verify the connection
Start a Claude Code session in the AIDRIN directory and ask:
List the available AIDRIN metrics.
Claude should call the list_metrics tool and return the full metric catalogue grouped by
category. If it falls back to running aidrin list in the terminal instead, the MCP server
did not connect — check that aidrin-mcp is on your PATH (which aidrin-mcp).
Alternative — Install via skills.sh
The skill is also published on skills.sh and can be installed into any project, for any agent that supports the skills format (Claude Code, Codex, Gemini CLI, GitHub Copilot, OpenCode, and others), without cloning the repository:
npx skills add idtlab/aidrin
This installs only the skill. It drives AIDRIN through the aidrin command-line
interface, so AIDRIN must be installed and on your PATH (CLI Installation).
To use the MCP server instead, complete Steps 1–2 above as well.
Installing this way also keeps the skill easy to update: the CLI records the source
repository in a skills-lock.json next to the skill, and a single command pulls the
latest version from main — no release or manual copy needed:
npx skills update aidrin
Alternative — Install as a Claude Code plugin
AIDRIN is also packaged as a Claude Code plugin, which carries the skill and the MCP server together. Install it once and AIDRIN is available in every session, whatever directory you are in — no per-project files and no clone. Inside Claude Code:
/plugin install aidrin --marketplace idtlab/AIDRIN
Or from a terminal:
claude plugin marketplace add idtlab/AIDRIN
claude plugin install aidrin@idtlab
The plugin declares the server as uvx --from 'aidrin[mcp]' aidrin-mcp, so
uv is the only prerequisite: it installs AIDRIN and its
dependencies into an isolated environment on first use, leaving your active Python
environment untouched. Steps 1 and 2 above are not needed. Because the server is resolved
from PyPI rather than your checkout, it tracks the latest release; use the steps above
instead if you need the working tree’s code.
Verify from any directory:
claude mcp list # plugin:aidrin:aidrin ... ✔ Connected
The plugin’s components are namespaced — its tools appear as
mcp__plugin_aidrin_aidrin__* and its skill fires as aidrin:aidrin, against
mcp__aidrin__* and a bare aidrin for project-scoped copies. In a directory that also
has its own .mcp.json or .claude/skills/aidrin/, such as a clone of this repository,
both are present and their names collide, so those prefixes are how you tell which one
answered.
Available Tools
The MCP server exposes the following tools. You do not normally call these by name; Claude selects them from your request. They are listed here so you know what is reachable.
Tool |
What it does |
|---|---|
|
Lists all available metrics, grouped by category |
|
Describes a dataset’s numerical and categorical features |
|
Runs the three core data quality metrics: completeness, duplicity, outliers |
|
Runs a single built-in metric against a dataset |
|
Audits unit metadata or revalidates a complete inline or host-local sidecar |
|
Validates file references stored in selected dataset targets |
|
Runs Custom Criteria Outliers against selected targets |
|
Runs multiple metrics declared in a YAML or JSON batch config |
|
Generates a |
|
Runs the |
|
Runs the |
|
Builds the FAISS vector index from the domain-literature PDFs in the agentic config |
|
Runs the full agentic evaluation pipeline |
summarize_dataset, run_data_quality_check, and run_aidrin_metric accept an
optional loader (path/to/loader.py:function) for formats AIDRIN cannot read
natively; run_batch takes the same value as loader: in its config. The loader
must return a pandas DataFrame (see aidrin add-custom-loader in the CLI guide).
Warning
run_custom_metric, run_custom_remedy, the agentic tools, and any loader
execute Python from the files you point them at. Only use them with code you trust.
Running an Assessment
Point Claude at a dataset and describe your intent:
Is my dataset at /path/to/data.csv ready for training a classifier?
Check fairness and privacy in my CSV - the target is the "approved" column,
and "age", "zipcode", and "gender" may be quasi-identifiers.
Run a full data quality check on /path/to/data.csv and write a report.
Verify the file paths in the path and image_path columns of
/path/to/manifest.csv, resolving relative paths from /data/project.
Claude follows a structured workflow:
Confirms AIDRIN is available and lists the metrics.
Asks whether you have domain literature (PDFs, standards, regulations) the dataset should be evaluated against — see Agentic Pipeline via MCP below. If you say no, this step is a no-op and the rest of the workflow is unchanged. If your dataset isn’t a plain CSV, Claude writes a small loader for it automatically (or asks for one, if the format isn’t one AIDRIN already parses).
Inspects the dataset schema and sample statistics.
Proposes a metric plan matched to your intent and asks you to confirm column roles — plus, if you gave a literature path, the resource path and domain questions from step 2, before any of it runs.
Runs the metrics via MCP tools, and the agentic pipeline too if domain literature was provided.
Writes an interpreted markdown report with scores, their directional meaning, and suggested next steps — without declaring a ready/not-ready verdict (that judgment is yours).
Offers to evaluate custom metrics or apply remedies to the dataset.
Supported file formats: CSV, Excel (.xls / .xlsx / .xlsb / .xlsm), JSON,
NumPy (.npz), HDF5 (.h5), Parquet.
Agentic Pipeline via MCP
The agentic pipeline is also available through MCP, letting Claude orchestrate the full literature-grounded evaluation without you running any commands.
What it does: Takes domain-specific questions, retrieves relevant passages from indexed PDFs (research papers, standards, regulations), generates Python analysis code and runs it against your dataset, scores complexity, and produces remediation recommendations — all grounded in your domain literature.
When to use it: When you have domain PDFs and want to evaluate the dataset against field-specific standards rather than (or in addition to) generic quality metrics.
There are two ways to run it:
- Guided (recommended for most cases)
During a normal assessment (see Running an Assessment above), Claude asks up front whether you have domain literature. Give it a path and your domain questions, and Claude writes the config itself — dataset path, a short metadata description drawn from your stated intent and the inspected schema, your resource path, and your questions — then builds the index and runs the pipeline as part of the same session. No YAML to hand-write, and nothing runs before you’ve confirmed the plan.
- Standalone
Run it separately at any time, with full control over the config: point Claude at a config file you’ve authored yourself, or skip Claude entirely and run
aidrin agentic build-index/aidrin agentic runfrom the command line (see Agentic Evaluation (ADROIT: Agentic Data Readiness via Orchestrated Intelligent Toolkit)). Use this when you want to re-run with a different config, tune settings the guided path doesn’t ask about (retrievaltop_k, chunk size), or evaluate a dataset outside a full AIDRIN assessment. The rest of this section documents that config format.
Setup
Install agentic dependencies:
pip install -e ".[agentic]"
Pick one provider — OpenRouter or LBL CBORG, not both — and set its key:
export OPENROUTER_API_KEY="sk-or-..."
# — or —
export CBORG_API_KEY="sk-cborg-..."
Create an agentic config YAML. All paths are resolved relative to the config file. One
llm block sets the endpoint, chat model, and embedding model for the whole pipeline — every
stage below uses it, so there’s nothing to configure per stage:
llm:
base_url: "https://openrouter.ai/api/v1" # or "https://api.cborg.lbl.gov"
model: "openai/gpt-oss-120b"
embedding_model: "openai/text-embedding-3-large"
paths:
data_loader: "./loader.py:load_dataset" # Python function returning a DataFrame
# OR: data_csv: "./data/mydata.csv" # for plain CSV files
metadata_csv: "./data/metadata.txt" # required: plain-text dataset description
vector_store:
sources:
- ./sources # directory containing domain PDFs
vector_store_name: my_index
chunk_size: 1000
chunk_overlap: 200
retrieval:
enabled: true # false = skip RAG, use LLM knowledge only
top_k: 3
max_workers: 4 # questions run in parallel
question:
- "Does the age feature satisfy the HIPAA Safe Harbor de-identification standard?"
- "What resampling rate is recommended by IEC 62056 for smart meter data?"
executor:
enabled: true
max_attempts: 5
temperature: 0.0
complexity_scorer:
enabled: true
remediation:
enabled: true
Note
paths.metadata_csv is required. It is a plain-text file describing your dataset
(columns, units, provenance) — used to give the LLM structural context. Without it the
pipeline will not start.
Running (standalone, with your own config)
Tell Claude to run it:
Run an agentic evaluation using my config at /path/to/config.yaml
Claude will:
Call
agentic_build_indexto index your PDFs into a FAISS vector store (once; skipped automatically on subsequent runs if the index already exists).Call
agentic_runto execute the full pipeline.Return a combined JSON result:
profile,queries(one entry per question with retrieval passages, generated code, execution result, complexity score, and remediation recommendations), andtoken_usage.
To build the index separately first:
Build the agentic index using /path/to/config.yaml
Then run the pipeline, telling Claude to skip rebuilding the index:
Run the agentic pipeline with /path/to/config.yaml — skip the vector build.
For a full end-to-end example using a real dataset and literature, see the Agentic Evaluation (ADROIT: Agentic Data Readiness via Orchestrated Intelligent Toolkit) section on the CLI Usage page.