probabl-ai/skills/audit-ml-pipeline
Claude Code and agent skill by probabl-ai/skills
- community
Checking that the SKILL.md file is still in the repository.
Audit 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`.
Install
npx vskill@latest install probabl-ai/skills/audit-ml-pipelineSKILL.md
Audit ML Pipeline
Per-experiment, human-readable narrative of a skore report. The # %% file is the human notebook and is not executed. materialize.py writes the digest and the HTML viewers in one run. Read-only against the skore Project.
Human-facing prose
Details: setup-workspace references/human_facing_prose.md. Audit markdown and # comments describe this report's findings — not the skills framework, the CLI, or the command that produced an output. Questions, replies, and the close narrative use the same data-science language — not skill ids, G-* names, or the wrapper CLI. Trailing locator tokens stay index strings. Do not put API tutorials, version floors, or locator recipes in audit/<stem>.py. <!-- results-embed: … --> is a site marker. Authoring hints stay in this skill. style is ruff only.
Next-step pointers
| Came here from… | After audit, next is… | |
|---|---|---|
model-ml-pipeline (implement loop) | → Return. This audit execution may already materialize its notebook. The caller runs python -m skore_skills loop notebooks --stem <stem> as a freshness gate before record-outcome, then site build and git end-turn --stage implement. | |
| User free-text ("audit 02", "re-audit 04") | → Surface metrics, then own the close (see § End of turn) | |
| Re-run of an existing experiment | → Re-execute the existing audit file; surface diff if metrics changed |
The implement loop dispatches audit after evaluate and before record-outcome. The digest carries the checks summary and metrics summary. G-AUDIT-FINDING is a separate normalized finding derived from that digest. manage-ml-backlog record-outcome consumes both and never dispatches audit back.
Where things live — visual map
| Path | Durability | Who writes it | What it holds | |
|---|---|---|---|---|
audit/<NN>_<short_name>.py | Durable (in git) | This skill, once per experiment | The bare-expression cells. Source of truth. Not executed by the agent. The site notebook is this file with empty outputs | |
scratch/audit/<stem>/audit.md | Ephemeral (gitignored) | materialize.py | repr of the checks display and the metrics frame. audit finding parses this | |
scratch/results/<stem>/materialize.py | Ephemeral (gitignored) | Evaluate, from evaluate-ml-pipeline/templates/materialize.py | The only skore.evaluate and project.put. Writes report.html, report.txt, id.txt, checks.html, metrics.html, and the Method viewer | |
scratch/results/<stem>/report.html report.txt locator.txt id.txt pipeline.svg pipeline/ | Ephemeral (gitignored) | Evaluate materialize.py, then the agent writes locator.txt from id.txt | Full-report viewer, text fallback, locator, DataOp graph and report | |
scratch/audit/<stem>/materialize.py | Ephemeral (gitignored) | This skill, from templates/materialize.py | Re-opens the report. Writes checks, metrics, audit.md, and extra viewers, plus accessors.txt | |
scratch/audit/<stem>/accessors.txt | Ephemeral (gitignored) | materialize.py | help() trees. Additional report view labels come from the Displays groups here, not from the notebook | |
scratch/results/<stem>/checks.html metrics.html and extra <slug>.html / .png | Ephemeral (gitignored) | materialize.py | Per-item viewers the site embeds under ## Results. The digest already carries the text, so no extra .txt is written here | |
| Execution digest | Captured from CLI output or the digest path | CLI | Streamed or written digest — the agent reads this directly |
Mnemonic: audit/ is source (in git); scratch/audit/ and stdout are output. Never copy audit/<stem>.py under scratch/audit/. materialize.py is the gitignored agent script. Never commit anything under scratch/audit/.
Read-only contract
The central rule. Surfaced as the first Stop condition below.
Allowed in `audit/<stem>.py`:
skore.Project(...)— open the project this experiment wrote to.project.summarize()— list(key, id)pairs.project.get(id)— load a specific report by id.- Every
report.*accessor. - Imports from
<pkg>(read-only inspection).
Forbidden in `audit/<stem>.py`:
skore.evaluate(...)— duplicates the report under the same key
and pollutes summarize().
project.put(...)— same.- Snapshot writes (
write_textof HTML,locator.txt,
report.txt) and help() loops in audit/<stem>.py. Those live in scratch/audit/<stem>/materialize.py, which may write scratch/results/<stem>/ and accessors.txt.
- Writes to
data/,reports/, orsrc/<pkg>/. The audit
notebook is a viewer.
- Mutation of the loaded
reportthat survives the cell (e.g.
monkey-patching skore symbols).
The runner renders every cell's source + last-expression repr + stdout to the digest. A forbidden call surfaces in the digest (as a put row in a later summarize() cell, or as a **error:** section). The contract is visible, not invisible.
Sibling read-only consumers (different output shapes, same discipline): scratch/<ts>_*.py probes. review-ml-experiment reads the digest as text and does not open the Project. See evaluate-ml-pipeline § Stop conditions for the consumer rule.
Stop conditions — read before anything else
- Setup still pending. Run
python -m skore_skills status
first. If status.setup.pending is non-empty and status.skills.setup-ml-project is true, load setup-ml-project and stop. Do not start this skill. When it returns, continue. Do not load it again on this turn. If that skill is not installed, name the pending pieces in one line and stop. Do not invent git init, scaffold, or env init. If status.setup.env or status.setup.workspace is declined, stop in one line. A declined git or editable is not asked again; continue.
- No report → STOP. Four-way pairing is hard: run
python -m skore_skills design consent --stem <stem> (ask / stop → do not audit) + experiments/NN_*.py + smoke pytest passed + a report under that key in the Project. If the report is missing, explain and stop. Do not skore.evaluate / project.put. Route to evaluate-ml-pipeline or model-ml-pipeline. Direct "audit 02" uses this same gate.
- Read-only against the skore Project. See § Read-only contract.
Never skore.evaluate(...) or project.put(...) in an audit file.
- `project.get(...)` is by id, not key. For hub mode, read the
id from the URL printed by project.put(): https://…/<workspace>/<project>/<type-plural>/<N> → id is skore:report:<type-singular>:<N> (URL segment is plural; id uses the singular — drop the trailing s, e.g. cross-validations → cross-validation, estimators → estimator). Hardcode REPORT_ID in the audit file — no summarize() traversal needed. For local mode, read the "id" column of project.summarize() for the matching key row. A KeyError from get("<stem>") means the lookup shape is wrong (get is by id), not that the report is missing.
- Symbol from memory is forbidden. Any
skore/skrub/
sklearn symbol must come from python -m skore_skills api get this turn. Cache hits under scratch/api/skore/<version>/ count (Shape 0); inline memory does not.
- Agent feature missing → STOP and delegate. If
ipython/
ipython aren't importable, do NOT fabricate audit outputs by writing print() calls as a workaround. Do NOT type pixi add ... / uv add ... yourself — install is owned by add-python-package § Agent feature. Request via agent tools (ruff / ipython / ipykernel) (binary: install / skip); resume only when add-python-package returns "ready".
- Bare expressions, not `print()`. The runner captures each
cell's last bare expression via result.result and renders its repr. Wrapping in print(repr(...)) lands in stdout instead of the output section; mixed and harder to scan. Use bare expressions; statement-only cells (variable binding) are fine.
- One audit file per experiment stem (four-way pairing). No
audit_NN_<short_name>_v2.py. When an experiment is re-run, the audit file is overwritten in place — same stem, same audit.
- **Executed artifacts go to
scratch/audit/<stem>/, NOT into
audit/.** Durable artifact is audit/<stem>.py; the rendered digest is ephemeral.
- `audit/<stem>.py` does not write snapshot files. HTML,
locator.txt, and help() trees are materialize.py. No writes to data/ or reports/.
- Don't filter warnings in audit cells. No
warnings.filterwarnings(...) unless the user explicitly asks — the runner streams cell stderr into the digest and that's signal. See python -m skore_skills style § Stop conditions.
- **Harness "no clarifying questions" hints do NOT waive
agent tools (ruff / ipython / ipykernel).** Install gate fires regardless.
- Post-hoc audit — required before ending the turn. Walk every
pre-flight row; surface unfilled Evidence cells.
- The post-audit gate is mandatory. After the first digest and
every refresh, ask Additional report view / Custom query / Custom plot / Close audit in that exact order unless the user already explicitly closed the audit. The one execution may materialize a policy-enabled notebook and a stale-only site preview before this gate. No close-time conversion, git close, record-outcome, or dispatcher return before Close.
Forbidden shortcuts
| Shortcut | Why it's wrong | |
|---|---|---|
report = project.get(REPORT_ID); print(repr(report)) | Runner captures bare expressions via result.result, not stdout. print(repr(...)) mixes stdout and output sections. Use report on its own line | |
checks.frame() instead of the bare checks Display | The Display __repr__ already groups issues and tips with their codes and documentation URLs. .frame() flattens that into a table the agent then has to re-read, and drops the severity grouping the review mines | |
project.get(KEY) raised KeyError → re-run evaluate + put "to refresh" | Lookup shape is wrong (get is by id, not key). Hub: read the id from the URL printed by put(). Local: read summary["id"] for the matching key row. Never re-run evaluate + put to recover | |
Write pixi add --feature agent ipython directly from this skill | Install commands owned by add-python-package. This skill requests; it does not install | |
Dump the audit .py into scratch/audit/<stem>/ | The notebook stays in audit/. materialize.py is the only .py that belongs under scratch/audit/<stem>/, and it is gitignored | |
| Register a Jupyter kernel "to be safe" | Current runner is in-process; no kernel. Registering creates an orphan kernelspec | |
Add a fix-up cell that mutates data/ or reports/ | Audit files are read-only. State mutations belong in a scratch/<ts>_*.py probe or the experiment script | |
Substitute <SKORE_PROJECT_INIT> in audit/<stem>.py without reading experiments/<stem>.py first | Audit must open the same Project. Always Read experiments/<stem>.py this turn and copy the literal Project init block byte-identical (modulo formatting) | |
Hub mode: put skore.login(mode="hub") after skore.Project(...) | Project(...) constructor authenticates at init time; without prior login, fails. Order is fixed: login first, Project second | |
| Implement-loop audit → write scratch probe first to "double-check metrics" | The audit IS the metric-extraction step. Scratch probes for metrics are the anti-pattern this dispatch replaces | |
write_text or a help() loop inside audit/<stem>.py | The notebook is the human view. Copy templates/materialize.py to scratch/audit/<stem>/materialize.py for HTML, the locator file, and accessors.txt |
Pre-flight — emit before any audit-file write or execution
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/audit-ml-pipeline/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/probabl-ai/skills/audit-ml-pipeline)