databricks-repl-consolidate
Installation
SKILL.md
Session Consolidation
Produce a single, clean .py file from a Databricks REPL session by reading session.json and the .cmd.py files.
Workflow
- Read session.json — the
stepsarray contains the ordered list of steps with status and command file paths. - Read each
.cmd.pyfile — in step order, skipping failed steps (only successful steps survive). - Strip REPL boilerplate — remove or convert REPL-specific calls (see Boilerplate Rules).
- Deduplicate — if a step was retried after an error, only keep the final successful version.
- Resolve imports — collect all imports from across cells and deduplicate them at the top of the file.
- Write the output — a single
.pyfile with a clear structure.