/probabl-skills:setup-ml-projectfrom probabl-skills
Bootstraps a machine learning workspace by interactively setting up Python environment, workspace layout, editable install, Git, and environment manager. Asks only for pending pieces and persists choices.
Ships in probabl-skills. 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.
Ordering only. Never run a skipped skill's steps from memory.
Details: setup-workspace references/human_facing_prose.md.
Questions use data-science labels only (Python environment,
workspace layout, editable install, Git, environment manager,
whether we manage the Python environment, Python import name,
automatic commits). Do not put skill ids, G-* names, or the
wrapper CLI in the question.
Run status and env detect first. Take the first row that
matches. Do not stop after reading the table.
setup.pending | Then |
|---|---|
| empty | step 9. Do not ask. |
| every pending piece's skill id is false | name the missing skills in one line, then step 9 |
| non-empty | step 3 multi-select, then step 4, then the stop row, then the choice table |
Stop row: editable is selected, has_src is false, and workspace
is not selected → one-line stop. Do not ask the remaining choices.
Do not scaffold from this skill.
Choice table. Apply every row that matches. Skip a row whose piece was not selected, was not on the board, or whose value is already recorded. Ask and persist before any write.
| Selected piece | Recorded state | Action |
|---|---|---|
| Python environment | detected manager is not "none", not ambiguous, not a mismatch, and policy.env_manager is unset | persist that manager. Do not ask. |
| Python environment | env_manager is "none" and policy.env_manager is unset, or ambiguous, or mismatch | ask, then policy set env_manager |
| Python environment | policy.env.managed is null | ask whether we manage the env (default yes), then persist |
| Workspace layout | fresh or manager-only, policy.package unset, src/<pkg>/ does not name it | ask the import name (folder name is the default), then policy set package |
| Git | policy.git.autocommit is null | ask on or off once, then persist |
Then step 7 when Git is selected, then step 8 in order env, workspace, editable, git, then step 9.
Run python -m skore_skills status and
python -m skore_skills env detect. status.skills is a
per-id dict, never a boolean. Read status.setup. Each piece
is done, declined, or missing. setup.pending is the
ordered list of missing pieces. Do not env init,
scaffold, install a package, or git init in this opening
phase.
If setup.pending is empty, ask nothing. Go to step 9.
done and declined pieces are already answered. Do not
offer them. Do not ask their environment manager, whether we
manage the env, import name, or automatic commits again.
AskUserQuestion with allow_multiple for setup.pending
only. Start by saying that before any modeling, the workspace
should be set up. Then the status facts each box rests on —
detected manager, has_src, git presence, and which pieces
are already recorded. Stay within 2–4 lines. Do not say the
order the selected pieces will run. A file link is an
addition, never the context. Include a box only when
that id is true and the piece is missing. Option
labels (user-visible, no ids):
setup.pending contains env and
status.skills.setup-python-env is truesetup.pending contains workspace
and status.skills.setup-workspace is truestatus.skills.add-python-package is
true, status.setup.editable is missing, and
(has_src is true or workspace is on this board)setup.pending contains git and
status.skills.setup-git is trueMap selected labels to setup-python-env, setup-workspace,
add-python-package, setup-git when loading.
The question's last line is exactly: Select each one you want.
Write nothing after that line. Do not add a done or
declined piece because the layout already looks
unfinished. If every pending
piece's skill id is false, skip the ask, name the missing
skills in one line, and go to step 9.
After the answer, and not in the question, persist each piece
the user does not select:
python -m skore_skills policy set setup.<piece> declined
(env, workspace, editable, or git). Do not persist
declined for a box that was not on the board.
Editable selected, has_src false, and workspace not selected
→ one-line stop. Do not ask the remaining choices. Do not
scaffold from this meta.
Ask the remaining choices now, before any write. Skip a question when the user does not select its piece, it was not on the board, or the value is already recorded. Each ask states in 2–4 lines what the answer authorizes. Order:
env_manager is not "none", ambiguous is
false, mismatch is false, and policy.env_manager is
unset, persist that detected manager. Do not ask. Otherwise
ask when (env_manager is "none" and
policy.env_manager is unset, or ambiguous is true, or
mismatch is true). Ask with AskUserQuestion, using
recommended order. PATH is not permission. Do not
curl | sh. Persist
python -m skore_skills policy set env_manager <manager>.policy.env.managed is null. Default yes.
Persist policy set env.managed true or false.src/ and no
journal/), policy.package is unset, and src/<pkg>/
does not already name it. Folder name is the default
option. “You pick” / “go fast” does not resolve it.
Persist policy set package <pkg>.policy.git.autocommit is null. Ask once: should later
stages persist with git commit (on) or never (off)?
That answer consents to the first commit. It does not
authorize tracking unknown hidden files or review paths.
Persist policy set git.autocommit on or off.
That answer does not decide the pre-change snapshot.Do not ask notebooks, the documentation site, tabular library, or where reports go.
Pre-change snapshot, before any setup write. Run this only
when Git was selected, status.skills.setup-git is true, and
policy.git.snapshot is null. Load setup-git and do only
its pre-change snapshot section, then return here. Do not
env init, scaffold, or git ignore-merge in this step.
Do not ask the snapshot question in this skill. The loaded
section asks only when git snapshot returns ask. clean
and nothing_to_commit, including an empty folder, persist
skipped and do not ask. If Git was not selected,
git.snapshot is already set, or setup-git is not
installed, skip this step. A missing setup-git is one
line, then continue. When the check returns ask, the
commit is still offered if autocommit is off.
Load selected skills only, in this order: env →
workspace → editable (has_src) → git. Load <id> only if
status.skills.<id> is true; else one-line skip. Do not
invent that skill's steps. The loaded skills must not ask
again for a choice persisted in step 6. After each loaded
skill returns, persist
python -m skore_skills policy set setup.<piece> done.
For editable, do that only when
env add --editable --execute exits 0. A non-zero exit leaves
setup.editable missing. Do not mark a skipped piece, or a
piece the user does not select, done.
Return to the skill that dispatched this turn (a lifecycle
stage, or triage waiting on a lifecycle request). Do not
open the entry board and do not start exploratory data
analysis or a pipeline from here. When the user asked only
to set up or bootstrap, status again and load
triage-ml-task only if status.skills.triage-ml-task is
true; else stop. That handoff may ask what to do next; it
is not a setup question.
env init, scaffold, or install a package before
step 8. Do not git init before step 7.done or declined piece again.setup-git
asks that once, before the first commit.setup-python-env skill installs plain skore during bootstrap;
do not install or configure Skore directly from this coordinator.setup-git.pixi add / uv add from this coordinator;
add-python-package owns install.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub probabl-ai/skore-skills --plugin probabl-skills26 skills in this plugin
/add-python-packageAdd a dependency through the project env manager, or ask the user when the environment is user-managed. Trigger when a workflow needs a missing import, after choose-python-library picks a library, or for editable install of src/<pkg>/.
SKIP choosing between competing libraries (choose-python-library owns that). SKIP bootstrapping a missing manager directly (setup-python-env). When env.managed is null, load setup-ml-project if it is installed.
HOW TO USE: read status.policy.env.managed, env detect, and env route. Classify this turn first (editable | add-skore | named package). If managed is null, load setup-ml-project and stop. If managed, env add --execute (or --editable). If unmanaged, ask; default is the user handles it — do not wait. When setup-ml-project already chose user-managed this turn, name the package and the manager, then return. Do not ask and do not wait. Never --execute while managed is false.
/audit-ml-pipelineAudit a persisted skore report read-only and produce a reusable digest. Do not execute it. Run `materialize.py` once. Never call `skore.evaluate` or `project.put`.
TRIGGER when a completed run needs an audit, the user asks to audit, show, or re-audit an experiment, a re-run overwrote the same `put()` key, or they want a narrative of a past experiment without `journal/ideas/` files.
STOP when `status.setup.pending` is non-empty (load `setup-ml-project`), or when there is no approved design, no report, or no agent feature: explain and send the user to setup, `evaluate-ml-pipeline`, or `model-ml-pipeline`. Also stop for raw-data exploration or sourcing a future experiment.
HOW TO USE: confirm journal, experiment, smoke, and report; place the file from `templates/audit.py`; copy `templates/materialize.py` to scratch; execute once; derive G-AUDIT-FINDING; then the continue-or-close gate. Resolve skore symbols with `api get`.
/build-ml-pipelineDeclare a skrub DataOps graph from the data source to the predictor after framing is locked. Stateless steps use `.skb.apply_func`. Stateful steps use `.skb.apply`. After the graph exists, attach the locked splitter and any non-default score. No fit, tune, persistence, or `skore.evaluate`.
TRIGGER when writing or editing any link from data source to predictor (loaders, preprocessing, features, composition, the final estimator), including a pure-Python function on that path, a step added or reordered, a bare `sklearn.Pipeline` as the top-level, or a request to build a pipeline, classifier, or regressor.
HOW TO USE: before the first declarative line and on every structural edit. Read the stops and emit Pre-flight before code. Confirm new names with `python -m skore_skills api get`.
/choose-python-libraryResolve a library choice and add the selected dependency. Trigger for competing-library questions or an optional package not already fixed by the project stack — at first use (tabular exploration, pipeline, or eval extras), never during workspace setup.
/evaluate-ml-pipelineEvaluate one sklearn-compatible learner with the locked validation scheme and persist structured skore reports. The splitter and any non-default score are already on the DataOp from `build-ml-pipeline`. This skill writes the call without `splitter=`, persists the report, and records the locator. When the locked split is the training table and test table that shipped with the data, fit on the training table, then pass `splitter="prefit"` with only the test table. When `model-ml-pipeline` dispatched this turn, return the locator. A standalone turn owns the evaluate-stage close.
TRIGGER when code calls `cross_val_score`, `cross_validate`, `classification_report`, `.skb.cross_validate`, or a handwritten metric print, or the user asks to score, evaluate, or run CV on one learner. Narrative reads of a persisted report belong to `audit-ml-pipeline`.
HOW TO USE: before any evaluation call. Resolve G-SKORE-MODE, read the stops, and emit Pre-flight before code. Confirm symbols with `python -m skore_skills api get`.
/explore-ml-dataExplore the dataset before designing any model. Place `data_analysis/data_analysis.py` and do not execute it. Run `materialize.py` once, write `data_analysis.md` and JOURNAL § Data understanding. Never design the model, edit `src/<pkg>/`, or modify raw data files.
TRIGGER when the user asks to explore, profile, or understand the data; triage sent them here (`status.data_analysis` missing); a data source changed; they want to refresh a recorded EDA; or leakage or research arises on a recorded EDA.
STOP when `status.setup.pending` is non-empty (load `setup-ml-project`), when there is no data (send to triage), the request is not raw-data exploration, or EDA is recorded with no refresh and no methodology concern. Do not invent a package root or a root `JOURNAL.md` while setup is pending.
HOW TO USE: G-TABULAR via `add-python-package`, infer or ask the targets, load `plot-ml-figure` if installed, then ask the five-option continuation board, including Close.
Other plugins' skills for the same job