/agent-loops:data-analysisfrom agent-loops
Iteratively explores a dataset by proposing one hypothesis at a time, writing and running analysis code to verify it, and recording only findings that survive re-computation at a meaningful effect size. Produces a reproducible findings report.
Ships in agent-loops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A hypothesis → verify reflection loop over a dataset. The artifact is a findings report; the feedback signal is verification — a finding only counts if re-running the computation confirms it at a meaningful effect size. The discipline this enforces: no insight without a number behind it. A plausible claim the data does not support is discarded, not softened; every line in the report can be reproduced from the dataset.
Use this for open-ended, self-checking exploration of a bound dataset where each finding must survive an independent re-computation. Default to broad exploration across the columns; if the user gives a focus question, let it steer the hypotheses. Not for diagnosing one known anomaly or for checking an external claim against the literature.
Resolve bindings interactively. If loop.run.yaml exists in the working dir, load it, confirm the
values in one line, and skip to the loop. Otherwise: on Claude Code (the AskUserQuestion tool is
available) infer a likely value for each binding and present it as the recommended option; on other
hosts ask each as a quoted plain-text prompt. Then write loop.run.yaml (format:
examples/run.example.yaml) and confirm the values before creating any other files.
| binding | meaning | default | how to infer |
|---|---|---|---|
<dataset> | data file to analyze (CSV/TSV/Parquet/…); read-only ground truth | — | scan the working dir for a data file |
<question> | optional analysis focus; omit to explore broadly | — | ask the user; else leave unbound |
<report> | output findings file | <sandbox_root>/findings.md | — |
<analysis_cmd> | interpreter that runs analysis snippets in the user's env | python3 | pyproject.toml/.venv/uv in the working dir |
<sandbox_root> | where snippets + ledger live | ./sandbox | — |
<budget> | max iterations | 8 | — |
<patience> | stop after N consecutive iters with no new verified finding | 2 | — |
Analysis snippets run in the user's environment via <analysis_cmd>, so they may use whatever the
user has installed. Keep helper code stdlib-first (csv, statistics): if a snippet needs
pandas/numpy, probe with try/except ImportError and degrade to a stdlib path, or offer a
consented uv pip install "pandas==<ver>" — never assume the package is installed.
Copy this checklist and tick items off:
<dataset> (shape, types, ranges, missingness); record nothing as a finding.<question>; not already settled).<sandbox_root>/iter<N>/analysis.py, run with <analysis_cmd>, redirect to out.txt.<report> (verified); else log refuted, do not add it.<patience>) or <budget>.Iteration 0 — profile. Write and run a snippet that reports the shape of <dataset>: columns,
inferred types, row count, and a quick summary (ranges, category counts, missingness). This grounds
the hypotheses; record nothing as a finding yet.
Then, until stop (dry or budget):
<question> steer it; do not repeat a hypothesis already settled.<sandbox_root>/iter<N>/analysis.py that loads <dataset> and computes the
relevant statistic plus an effect size (a group-mean difference, a rate gap, a correlation —
not just a yes/no). Run it with <analysis_cmd>, redirecting output to
<sandbox_root>/iter<N>/out.txt (never flood your context).<report>: the claim, the exact numbers, the effect size,
and the method (so it is reproducible). Mark it verified.refuted in the ledger and do not add it to
the report. A null result is a real outcome, not a failure to hide.<sandbox_root>/ledger.tsv, tab-separated, never commas in the text. Header:
iter hypothesis effect status
status ∈ {profile, verified, refuted}. Example:
iter hypothesis effect status
0 dataset profile - profile
1 enterprise orders average higher value than consumer 185 vs 109 (+70%) verified
2 returns differ by region North 0.16 vs South 0.14 (negligible) refuted
3 mobile has a higher return rate than web/store 0.30 vs 0.10 verified
Report the best outcome: the <report> path, the count of verified findings, and the hypotheses
refuted (so the user sees what was checked and ruled out, not just what survived).
<report> carries the figures and the
method that produced it; if you cannot compute it, you cannot claim it.<dataset> — never modify it, because it is the ground truth every finding is checked
against. The sandbox is self-contained (no ../ escapes).<patience> consecutive iterations add no new verified finding.<budget> iterations reached.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
25 skills in this plugin
/alpha-evolveUse when the user wants to evolve an ML model/program through population-based search rather than a single sequential refine loop — a generational evolution where parallel proposers each apply one small SEARCH/REPLACE diff to a parent, scored by a cascade-evaluated training run, and children are kept in a MAP-Elites archive across islands (with migration + checkpointing) so diverse high performers survive. A finite, bounded-parallelism re-creation of AlphaEvolve/OpenEvolve, bent for ML autoresearch. Runs to a fixed compute budget or until interrupted. Not for the sequential single-thread autoresearch loops (one change → measure → keep/revert), and not for verifying a known bug or external claim — this is parallel, diversity-preserving search over a program.
/anomaly-investigationUse when the user has a known, already-observed anomaly in their data — a metric spike or drop, an outlier, an unexpected number — and wants its root cause diagnosed, not guessed. Forms a slate of candidate causes, tests each against the data, and eliminates the ones the data refutes, narrowing the live candidates until exactly one survives refutation and passes a positive confirming test. The result is an investigation log with the confirmed root cause and the evidence that ruled out the alternatives. Not for open-ended discovery over a dataset with no specific anomaly in hand (that is data-analysis), and not for checking an external claim against sources (that is claim-verify) — this is reactive diagnosis of one anomaly you already know about.
/blue-teamUse when the user has concrete failing cases in code or a guardrail/classifier/filter/prompt/API they own — a red-team failure catalogue OR a CI/CD test-failure report (failing pytest/JUnit tests) — and wants the target patched until those failures are closed without breaking what already works. It points straight at the failed cases (normalize any source with tools/ingest.py), fixes one root-cause class per iteration, and re-checks with tools/verify.py — oracle mode against a red-team oracle, or tests mode against the test suite — keeping a patch only if it closes a class while nothing that passed before regresses, else reverting; loops until every class is closed (dry) or the budget runs out, then opens a pull request with the patch set. The defensive fixer half of a find→fix setup. Not for discovering new failures (that is red-team), and not for editing the oracle, tests, or holdout that define ground truth.
/claim-verifyUse when the user has a results draft or a set of data-backed claims and wants each one adversarially verified against the underlying dataset before publishing — a pre-publication red-team of the findings. Extracts the discrete checkable claims from the draft, reproduces each claim's number against the data, stress-tests it against the threats most likely to kill it (outliers, confounds, Simpson's reversals, tiny subgroups, alternative specifications), and marks it verified, fragile, or refuted; fragile and refuted claims are revised — hedged, scoped, or retracted — until every claim is verified or appropriately qualified. The result is a draft where every surviving claim has been reproduced and survived a stress test. Not for open-ended discovery of new findings over a dataset (that is a data-analysis task), and not for diagnosing a single known anomaly or pipeline failure — this is a gate over an existing draft.
/dueling-autoresearchUse when the user wants two approaches raced head-to-head on a single shared metric — e.g. a classical/algorithmic lane vs an ML/learned lane, or any two strategies for the same task. Each lane runs its own analysis-first research loop confined to its lane, the lanes share a scoreboard and may borrow ideas across the boundary without abandoning their identity, and a shared eval keeps the head-to-head honest; loops until interrupted, reporting the current leader. Not for improving a single approach in isolation (use a single-track research loop), and not for picking between two finished artifacts in one shot (that is a one-time comparison).
/exploratory-autoresearchUse when the user wants an autonomous ML research loop that explores the space broadly rather than hill-climbing one approach. A temperature scheduler replaces the usual hypothesis step: it forces several wild, diverse swings (full rewrites, different architectures/regimes) early, then enters an adaptive phase that picks swing / merge / exploit per iteration — with a hard stagnation guard that bans further small-step exploits once they run too long, forcing a pivot back to a swing or merge. Tracks an approaches.md registry and a move_type per iteration; analyses every run before the next move. One change per iteration; loops forever until interrupted. Not for the standard analysis-first ml-autoresearch (which lets analysis alone choose each change), one-off training runs, or sweeps.
npx claudepluginhub gaasher/agent-loop-skills --plugin agent-loopsOther plugins' skills for the same job