/probabl-skills:setup-python-envfrom probabl-skills
Detects the Python environment manager (pixi, uv, etc.) and bootstraps the runtime with ruff, ipython, ipykernel, and skore. Handles managed vs user-managed environments, init, sync, and verification.
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.
Bootstrap only. Direct packages this turn: ruff, ipython,
ipykernel, and plain skore. Skore supplies skore-skills as a
mandatory dependency. Other stage libraries go through
add-python-package.
Details: setup-workspace references/human_facing_prose.md.
Ask which manager to use and whether we manage the env in
plain language. Do not name G-ENV-MGR, skill ids, or the
wrapper CLI to the user. Do not mention skore-skills.
Run env detect and status first. Take the first row that
matches, then run Sequence steps 3–6 only where the row says ask
or continue. Do not stop after reading the table.
| Caller | policy.env_manager | policy.env.managed | Manager question | Managed question |
|---|---|---|---|---|
| dispatched | set | true or false | skip | skip |
| dispatched | set | null | skip | ask |
| dispatched | unset | true or false | ask when detect is none, ambiguous, or mismatch | skip |
| dispatched | unset | null | ask when detect is none, ambiguous, or mismatch | ask |
| standalone | any | any | ask when detect is none, ambiguous, or mismatch | ask |
A standalone turn still asks when a manager is only recorded and
nothing is on disk yet (env_manager is "none"). After the
questions this row allows: env.managed false stops at step 5;
true runs step 6 (env init, env sync, env add-skore with
no --mode, env verify).
A request to add a package outside ruff, ipython, ipykernel,
and plain skore is not bootstrap. Do not env init and do not
pixi add. Hand that package to the package-install step and
stop. The close names the package and that step in plain language.
Do not write the catalog id.
python -m skore_skills env detect and status.
When setup-ml-project dispatched this turn, skip each
question on its own. policy.env_manager set → do not ask
which manager. policy.env.managed true or false → do
not ask whether we manage the env. A recorded manager with
env.managed still null still asks that one question. A
recorded env.managed with no policy.env_manager does not
reopen the managed question. A standalone request still asks,
including when a manager is only recorded and nothing is on
disk yet (env_manager is "none").
G-ENV-MGR. Skip when step 2 skipped it. Otherwise read the
JSON fields, not sentinel strings: ask when env_manager is
"none", ambiguous is true, or mismatch is true. Use
recommended as the ask order. PATH is not permission. Do not
curl | sh.
Skip when step 2 skipped it. Otherwise ask whether we manage
the env (default yes). Persist
python -m skore_skills policy set env.managed true or false.
Unmanaged: stop. Name ruff / ipython / ipykernel / skore; do
not init. Do not mention skore-skills to the user.
Managed: policy set env_manager <manager> when it is not
already recorded, then
python -m skore_skills env init --manager <manager>
python -m skore_skills env sync --execute
python -m skore_skills env add-skore --execute
python -m skore_skills env verify --execute
Do not pass --mode. Omitting it installs for a recorded
hub or mlflow destination, and plain Skore otherwise.
If the selected manager is pixi and pixi.toml already exists,
skip env init; preserve that manifest and continue with
env sync --execute. Never replace it or try to add
[tool.pixi] to pyproject.toml.
Do not hand-edit TOML. Do not run pixi init. Do not create
src/. Do not ask where reports go. Plain Skore is the early
install when no destination is recorded; add-python-package
upgrades it for Hub or MLflow after that choice is recorded.
Do not pass --mode local.
If verify reports missing skore or skore_skills, rerun
env add-skore --execute the same way; never add skore-skills
directly. If verify reports missing agent tools, load
add-python-package for ruff / ipython / ipykernel (agent feature)
when that skill is installed, not a second env init.
If add-python-package is not installed, name ruff / ipython /
ipykernel and stop.
When dispatched by setup-ml-project, return to that caller after
verification. Standalone, run
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; that skill
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.
Agent context only; do not narrate skore-skills to the user.
skore,
which supplies skore-skills, when the report destination is
unset or local. A recorded hub or mlflow destination uses
that install instead.python -m skore_skills
command uses this composed environment; env verify --execute
must pass before other skills run.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