/probabl-skills:sync-ml-reportsfrom probabl-skills
Syncs skore reports between local disk, Hub, and MLflow endpoints. Handles copy-only or permanent destination switching with user confirmation.
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.
Copy reports with the skore CLI. Switch the default destination
only when the user asked to. Do not evaluate, audit, or invent
Project.sync Python.
Details: setup-workspace references/human_facing_prose.md.
Ask where reports live (disk, Hub, MLflow) in those words. Do not
name G-SKORE-MODE, skill ids, or the wrapper CLI in the
question. skore sync output may appear in the close as the
sync table.
Run python -m skore_skills status. Read policy.skore_mode
and skills. Open experiments/ and audit/ for the
skore.Project(...) init block: name=, Hub workspace=,
MLflow tracking_uri=. Local store is always the workspace
reports/ directory (absolute path). Never omit
--from-workspace / --to-workspace on a local endpoint.
If policy.skore_mode is unset: STOP. First pick is
G-SKORE-MODE in evaluate-ml-pipeline. Do not ask local / hub
/ mlflow here. Load that skill only if
status.skills.evaluate-ml-pipeline is true and the user
asked to evaluate; else one-line skip. The close is only this
stop: the destination is not chosen yet and is picked when a
report is stored. Do not list local, Hub, or MLflow, a
workspace name, or a tracking URI. Do not use the
source-to-destination close below.
AskUserQuestion for any answer not already in the request.
Ahead of each question, state in 2–4 lines what the answer
authorizes — which reports move where, whether skore_mode and
the Project init lines get rewritten — and the facts it rests
on: the current mode, the discovered report count, the
endpoint. A file link is an addition, never the context.
skore_mode and rewrite every Project init) vs copy only
(sync, leave policy and experiment files).local (disk, no account), hub (https://skore.probabl.ai),
mlflow (tracking server). Hub: ask the workspace name (it
MUST NOT contain /) and the host URL. Propose
https://skore.probabl.ai. Confirm a bare host as
https://<host>. If SKORE_HUB_URI is already set, use
that host and do not re-ask. MLflow: ask tracking_uri;
confirm a bare host:port as http://host:port. Do not
default the URI.name= is missing or disagrees across
files.If intent is switch and destination equals
policy.skore_mode, stop in one line.
Destination extras: load add-python-package only if
status.skills.add-python-package is true, for Skore at the
destination mode (env add-skore --mode <dest>). If that
skill is missing, name Skore for the destination and stop. Do
not splice pip install / skore[...] here.
If Hub is source or destination, a key must exist before
skore sync. SKORE_HUB_API_KEY, when set, is enough and
wins over the registry; do not generate. Otherwise run
skore hub api-key list. A row for this host and workspace
is enough. If that row is missing, run:
skore hub api-key generate --host <host> --workspace <workspace>
generate opens a browser device login and stores the key.
Wait for it. Do not pass --force unless the user asked to
replace a key. Do not call skore.login. Do not read
~/.skore.hub/credentials.json or .skore for the secret.
Build skore sync. If skore is not on PATH, name the
skore console script from the skore package and stop. Do
not call skore.Project.sync in Python.
skore sync <project> --from=<source_mode> --to=<dest_mode>
Source mode is policy.skore_mode. Add:
| Endpoint | Flags |
|---|---|
| local | --from-workspace or --to-workspace = resolved reports/ |
| hub | --from-workspace or --to-workspace = Hub workspace name (required) |
| mlflow | --tracking-uri=...; never *-workspace |
--to-project only if the destination name differs.
--host <host> when a Hub endpoint is involved, unless
SKORE_HUB_URI is already that host. There is no built-in
default host. --both only if the user asked to copy
missing reports both ways. Otherwise one-way.
If the user picked dry-run first, run with --dry-run, show
the plan, then ask to transfer. Live run omits --dry-run.
Usage/auth/backend errors: name stdout/stderr and stop. Do not
invent a Python fallback. Empty output No reports to synchronize. is success (nothing to copy; a switch may
still continue).
Switch intent only, after a successful (or empty) sync:
python -m skore_skills policy set skore_mode <dest>.
Rewrite every Project init in experiments/ and audit/ to
the destination form below (audit must match the paired
experiment, byte-for-byte modulo formatting). Full variants:
evaluate-ml-pipeline/references/g_skore_mode.md.
# local
skore.Project(
name="<project-name>",
mode="local",
workspace=str(PROJECT_ROOT / "reports"),
)
# hub — no skore.login
skore.Project(
name="<project-name>",
mode="hub",
workspace="<hub-workspace>",
host="<hub-host>",
)
# mlflow
skore.Project(
name="<experiment-name>",
mode="mlflow",
tracking_uri="<mlflow-tracking-uri>",
)
If dest is local, mkdir reports (exist_ok); no README.
If hub or mlflow, do not create reports/.
If journal/JOURNAL.md exists, insert a --- under History
and one line skore_mode: <old> → <dest> (sync-ml-reports).
Missing journal → skip in one line; do not paste a JOURNAL
body.
Copy-only: do not policy set, rewrite init, mkdir, or
edit JOURNAL.
skore_mode is unset.git commit.project.put, or audit.*-workspace on an MLflow endpoint.*-workspace on a local or Hub endpoint.This close applies only after a sync. An unset policy.skore_mode
uses the step-2 stop instead.
Short story: source → destination, whether policy changed, and
the skore sync table or No reports to synchronize. Do not
dump experiment files.
Then python -m skore_skills git end-turn --stage evaluate
(the persist bucket for this work; this is not a CV run). 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. No git commit.
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`.
Other plugins' skills for the same job