/probabl-skills:setup-gitfrom probabl-skills
Initializes safe version control with optional pre-setup snapshot commit. Handles git init, ignore rules, and first commit while asking about hidden files and review paths to keep tracked.
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.
Run this section only when setup-ml-project loaded this skill
for the pre-change snapshot. Do not run Lookup. Do not scaffold.
Do not ask whether later stages commit. Then return to
setup-ml-project.
Run python -m skore_skills git snapshot.
action skip and reason already: return. Do not persist
again.
action skip and reason clean or nothing_to_commit:
persist python -m skore_skills policy set git.snapshot skipped,
then return. Do not ask. Do not git commit.
action ask: AskUserQuestion. Recommend committing. In
2–4 lines, say this commit records the workspace as it is now,
so the user can return to it before setup changes anything. It
does not change whether later stages commit. A file link is an
addition, never the context.
python -m skore_skills policy set git.snapshot declined.
Do not git init, git add, or git commit. Return.python -m skore_skills policy set git.snapshot committed
after the commit exits 0.On yes, if repo is false, run git init -b main before
adding files. The initial branch is main. Do not git config.
Do not name that branch master.
If ambiguous_dotfiles or review_paths is non-empty, ask
once which of those paths to keep tracked. List every
hidden path and each review path with its kind. Say that
paths they do not keep are ignored. Do not ask a second
question for the other list. Copy paths from the JSON. Then:
ambiguous_dotfiles was non-empty →
python -m skore_skills git ignore-merge --decide plus
--keep <path> for each chosen hidden path (no --keep if
they keep none).review_paths was non-empty →
python -m skore_skills git review-decide with
--keep <path> for each chosen path and --ignore <path>
for every other path in that list (no --keep if they keep
none). Pass a folder path through with its trailing slash.Empty lists: do not ask, and do not run git ignore-merge.
Never --keep .env or .skore. Exit code 2 from those
commands is structured JSON, not a command failure.
git status. git add -- <paths> only staged paths that
are not still listed in review_paths, plus hidden paths the
user kept. Never stage .env, .skore, .venv, .pixi, or
another must-ignore tool directory. Never stage a review path
that was not kept.
git commit -m "<one-line subject>". The subject states that
this is the workspace before setup changes it. Only this
section uses that subject.
Run status first. Take the first row that matches, then run its
steps from the Sequence below. Do not stop after reading the table.
policy.git.autocommit | Situation | Steps | Ask | Commit |
|---|---|---|---|---|
on or off, user asks to change it | HEAD exists, or the new value is off | 1, 9 | the autocommit question only | no |
on or off, user asks to change it | new value on, no HEAD | 1, 7, 8, 9 | autocommit, then one keep question if review_paths is non-empty | yes |
null | any | 2, 3, 4, then only the Ask and Commit of the row for the persisted answer. Do not run steps 2 or 3 again | autocommit once | per that row |
off | any | 2, 3, 5, 9 | nothing | no |
on | policy.git.snapshot is committed and git status is dirty | 2, 3, 7, 8, 9 | one keep question only if ambiguous_dotfiles or review_paths is non-empty | yes, the setup changes only |
on | HEAD exists | 2, 3, 6, 9 | nothing | no |
on | no HEAD | 2, 3, 7, 8, 9 | one keep question only if ambiguous_dotfiles or review_paths is non-empty | yes |
The keep question is one question. After step 3 it lists every
hidden path and every review path with its kind. The
change-to-on row did not run ignore-merge: list only
review_paths. Exit code 2 from git ignore-merge,
git review, or git review-decide is structured JSON, not a
command failure.
Run python -m skore_skills status. If the user asked to
change the commit choice and policy.git.autocommit is
already on or off, re-ask that question and persist on
or off. Do not git init. Do not git ignore-merge. If
the new value is on and the repo has no HEAD yet, continue
at the first-commit review (step 7). If the new value is
off, or on and HEAD exists, stop this sequence: use the
return rule in step 9 and do not continue at step 2. Do not
invent another commit. Later stages follow the new value.
Otherwise, if autocommit is already on or off, do not ask
that question again.
If there is no .git directory, run git init -b main. The
initial branch is main. Do not run git config. Do not name
that branch master. Do not rename a branch that already
exists.
Run python -m skore_skills git ignore-merge. Keep the JSON
ambiguous_dotfiles list. Exit code 2 is that structured
list, not a command failure. Do not ask yet.
If policy.git.autocommit is null, ask once: should later
stages persist with git commit (on) or never (off)? State
in 2–4 lines what the answer authorizes — commits at the end of
later stages, starting with the first commit this turn — and
which paths stay ignored; a file link is an addition, never the
context. Persist
with python -m skore_skills policy set git.autocommit on or
off. That answer is also consent for the first commit. It
does not authorize tracking ambiguous_dotfiles or
review_paths. When setup-ml-project already persisted on
or off this turn, do not ask again.
If autocommit is off, stop. Do not ask which files to keep.
Do not git commit. Use the return rule in step 9.
If autocommit is on and HEAD exists, stop after ignore-merge.
Do not use this step when policy.git.snapshot is committed
and git status is dirty; that row commits the setup changes.
Do not ask which files to keep. Do not invent another commit.
Later stages use
python -m skore_skills git end-turn --stage <stage> then
persist-ml-git, where <stage> is setup, data_analysis,
implement, evaluate, or backlog. When that skill is not
installed, those stages report the pending paths instead of
committing.
If autocommit is on and (this repo has no HEAD yet, or
policy.git.snapshot is committed and git status is
dirty), run python -m skore_skills git review. When
git.snapshot is committed, the step 8 commit is only the
changes since that snapshot. Do not ask to snapshot again.
When this step is reached
from step 1, ignore-merge did not run: use only
review_paths. If ambiguous_dotfiles and review_paths are
both empty, do not ask. If either list is non-empty, ask
once which of those paths to keep tracked. List every
hidden path and each review path with its kind. Say that
paths they do not keep are ignored. Do not ask a second
question for the other list. Copy paths from the JSON; do not
reclassify them. Do not ask about file size, artifacts, or
datasets when review_paths is empty, and do not ask about
hidden files when ambiguous_dotfiles is empty.
Then:
ambiguous_dotfiles was non-empty → re-run
python -m skore_skills git ignore-merge --decide plus
--keep <path> for each chosen hidden path (no --keep if
they keep none).review_paths was non-empty →
python -m skore_skills git review-decide with
--keep <path> for each chosen path and --ignore <path>
for every other path in that list (no --keep if they keep
none). Pass a folder path through with its trailing slash so
the ignore line is that folder. Exit code 2 from git review
or git review-decide is the structured review outcome, not
a generic command failure: read its JSON. The question in
this step is that decision; do not ask again. If
review-decide still lists paths, rerun it with the same
choices.Run only the command for a list that was non-empty. Do not
re-ask paths gone from the next JSON. Never --keep .env or
.skore.
Then git status. git add -- <paths> only paths that are
not still listed in review_paths, and
git commit -m "<one-line subject>" from this setup turn. The
subject describes the files committed now. It does not say
this commit is the state before setup changes. Do not ask a
second time about autocommit. Never stage .env or .skore.
When setup-ml-project dispatched this turn and is in this
session, return control to it. Otherwise load triage-ml-task
if status.skills reports it installed, else stop.
.gitignore; git ignore-merge unions packaged
rules..env, .skore, or a review path that was not
kept.main. Do not name it master. Do not
rename a branch that already exists.python -m skore_skills git end-turn --stage … to
create the first commit.scaffold. It does not run
git ignore-merge unless ambiguous_dotfiles was non-empty.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