/probabl-skills:setup-workspacefrom probabl-skills
Detects or scaffolds a standard ML workspace layout using Cookiecutter, creating directories, README files, and src/<pkg>/ stubs. Handles fresh, manager-only, and existing layouts without writing experiment code.
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.
Decide where artifacts live. Do not design an experiment here.
Details: references/human_facing_prose.md. Scaffolded design
notes, JOURNAL, and folder READMEs describe this workspace's
analysis — not the skills framework, the CLI, or the command that
produced an output. Questions and replies use the same
data-science language (import name, notebooks, documentation
site) — not G-* names, catalog skill ids, or the wrapper CLI.
Say "workspace setup", not setup-workspace.
<!-- results-embed: … --> is a site marker. Authoring hints
stay in this skill. style is ruff only.
src/ or journal/ present → existing. Reuse names and
folders. Do not scaffold again.src/<pkg>/ → manager-only. Still
scaffold; keep existing pyproject.toml. No --force.Detect the layout, then take the one row that matches and run its steps from the Sequence below. Do not stop after reading the table.
| Layout | Import name | Steps | Notebooks and site |
|---|---|---|---|
| fresh | not recorded. "you pick", "go fast", and "no preference" do not record it | 1 only, then stop. Call AskUserQuestion (folder name is the default option). Do not scaffold this turn. | do not persist |
| fresh | policy.package or src/<pkg>/ already names it | 1 (no ask), 2, 4, 5. Do not write experiments/01_baseline.py or any experiment body, even if asked so it can run right away. | step 4 |
| manager-only | not recorded. "you pick", "go fast", and "no preference" do not record it | 1 only, then stop. Call AskUserQuestion. Do not scaffold this turn. | do not persist |
| manager-only | policy.package or src/<pkg>/ already names it | 1 (no ask), 2, 4, 5. Do not write experiment bodies. | step 4 |
| existing | user asks to re-run skore.evaluate or project.put | Refuse and stop. Say evaluation and project.put are not this skill. Do not paste that snippet. | do not ask, persist, or install |
| existing | any other request | 3, 5 | do not ask, persist, or install |
An unresolved import name is the ask row only. Steps 2, 4, and 5
run on a later turn, once policy.package or src/<pkg>/ names
it. Step 4 does not overwrite a flag that is already true or
false. Step 5: a turn dispatched by setup-ml-project returns
to it; a standalone turn runs git end-turn --stage setup.
If fresh or manager-only, resolve G-PKG-NAME. When it is
not already recorded, call AskUserQuestion and stop this
turn. Do not persist policy.package and do not scaffold
until a later turn. “You pick” / “go fast” / “no preference”
does not record it. The question is the src/<pkg>/ import
name, with the folder name as the default option. Each ask
states in 2–4 lines what the answer authorizes — the
scaffolded tree, the persisted policy key, the toolchain a
gate implies — and the detected facts it rests on; a file
link is an addition, never the context. Do not confirm in
prose instead of the tool. A matching [project] name +
src/<pkg>/ already resolves it — do not re-ask. A recorded
policy.package also resolves it. Do not re-ask. When
setup-ml-project dispatched this turn and policy.package
is set, do not ask again. Scaffold is step 2, and only once
the name is already resolved. A status package of null does
not reopen the ask. Persist a resolved import name with
python -m skore_skills policy set package <pkg>.
Fresh / manager-only:
python -m skore_skills scaffold --package <pkg>
The CLI writes the tree and each folder README.md. Do not
recreate those files from memory.
Existing: do not scaffold again. Do not invent files. No
rename, no overwrite, no --force. Do not persist or ask
notebooks/site.
After scaffold on fresh or manager-only, if
policy.notebooks and policy.site are both null
(never set): persist both on this turn —
python -m skore_skills policy set notebooks true
python -m skore_skills policy set site true
Do not AskUserQuestion for notebooks or site. Persist both before the user-facing line. That line says executed notebooks and the documentation site are on; the user can turn either off later. Do not say they are still unset or null. Do not write notebooks or site into JOURNAL; policy is the record. Do not ask.
Same turn after persist:
Load add-python-package only if
status.skills.add-python-package is true and
policy.env.managed is true. Else one-line skip: name
jupytext / nbclient / ipywidgets / nbconvert /
mkdocs-material; do
not invent pixi add / uv add; skip site init. Do not
invent that skill's steps.
When that load is allowed:
add-python-package for jupytext,
nbclient, and ipywidgets (all env route agent),
plus nbconvert when site is also true — stage turns write
the notebook viewer with --html. Do not leave them as
ask. Do not convert.add-python-package for mkdocs-material
(agent), then python -m skore_skills site init.If either flag is already true or false, do not overwrite
and do not install from this step.
If setup-ml-project dispatched this turn and is in this
session, return to it; else stop. Standalone:
python -m skore_skills git end-turn --stage setup. If JSON
action is invoke, load persist-ml-git only if
status.skills.persist-ml-git is true and stop; it returns to
triage. If persist is missing, name the pending staged paths
and stop. Otherwise load triage-ml-task only if
status.skills.triage-ml-task is true; else stop.
AskUserQuestion and stop. Do not scaffold
or persist in that turn, and do not use the folder name yourself.experiments/01_baseline.py or any experiment
body. "So we can run it right away" is not a reason. Scaffold
writes experiments/README.md only.skore.evaluate or project.put, and do not
paste that snippet. A KeyError from project.get is not a
scaffold turn. Say evaluation and project.put are not this
skill, and stop.pixi init / uv init.jupytext, nbclient, ipywidgets, nbconvert,
mkdocs-material) only
via add-python-package after persisting notebooks/site.
Never pixi add / uv add from this skill.git commit here.src/<pkg>/
experiments/
journal/
data_analysis/
data/
audit/
tests/smoke/
scratch/
Each directory has README.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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