From oracle-ai-data-platform-workbench-databricks-migrator
Re-executes cells in a migrated notebook from a specified history index, injecting a fix reason to correct failures. Use when a migration job left cells partial or a specific cell is wrong.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oracle-ai-data-platform-workbench-databricks-migrator:aidp-fixup-cellThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The full-job migrator (`job_migrate.py`) runs every cell linearly with up to 10 fix attempts each. `fixup_cell` is the per-cell escape hatch when those 10 attempts weren't enough OR when the user discovers a latent issue downstream.
aidp-fixup-cell — surgical re-execute of cells in a migrated notebookThe full-job migrator (job_migrate.py) runs every cell linearly with up to 10 fix attempts each. fixup_cell is the per-cell escape hatch when those 10 attempts weren't enough OR when the user discovers a latent issue downstream.
JOB_REPORT.md shows specific cells as FAIL after aidp-migrate-job finished.Inside an already-running migration, Claude can call the fixup_cell tool:
fixup_cell(start_index=12, why="cell 11 redefined `<base_table>` to use a different schema; replay downstream so the new var flows through")
This is the in-process mode. It:
_cell_history[start_index:] (drops everything from index 12 forward)._replay_cell_entry() — execute + verify + fix loop with the why injected into the Claude prompt so the model knows what changed._cell_history.The cells replayed start at the absolute history index 12 — could be in the SAME notebook or a downstream one if the cells were inlined via %run.
When the migration is done and the user wants to "fix this one cell":
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--cluster <CLUSTER_ID> \
--only-tasks <task_key> \
--no-skip-migrated
This re-runs that single task end-to-end (deps already cached → fast). Combine with --start-task <substring> to run only that one task.
If the user wants finer-grained control (specific cell, not full task), they need to open the saved .ipynb and edit manually. The migrator doesn't expose a "replay cell K only" CLI outside of the in-process fixup_cell tool.
Helps:
Won't help:
dbutils call that should have been rewritten) — check references/gotchas.md for the recipe, then re-run with the fix.fixup_cell replays cells from start_index FORWARD. This is only safe if the replayed cells are idempotent. If a cell:
.mode("overwrite") → safe..mode("append") → unsafe, will duplicate rows on replay.Before triggering a replay, scan the cells from start_index for non-idempotent ops. If you find any, fix THEM first, then replay.
why reason flowsThe why string is injected into the Claude prompt as:
=== CONTEXT: WHY WE'RE REPLAYING ===
The previous run hit a problem at this stage. Reason: <your why>
Replay each cell with this context in mind. If the prior code was correct
and only the upstream state changed, you can keep it as-is. If the prior
code needs adjustment to handle the new state, rewrite as needed.
So make the why precise — vague reasons produce vague fixes:
"cell 11 was rewritten to use spark.read.table('<sandbox_schema>.events') instead of spark.read.parquet('s3://...'); downstream cells reference the same path and need similar adjustment""something broke, please retry"| Symptom | Action |
|---|---|
| Cell K failed 10 attempts, all with the same error | Try fixup_cell with a specific why that names the error. |
| Cell K failed because cell K-2 produced a different schema than expected | fixup_cell from K-2 (not K) with why describing the upstream change. |
| Cell K failed because of a known gotcha (see references/gotchas.md) | Apply the gotcha-recipe fix in cell K manually, then fixup_cell from K with why="applied gotcha #N fix". |
| Cell K failed because the cluster died mid-execution | Restart the cluster, re-invoke aidp-migrate-job with --skip-migrated — fixup not needed. |
JOB_REPORT.md to confirm the cell is now OK (/migration-status).migration-reviewer for a second-opinion review.claude plugin install oracle-ai-data-platform-workbench-databricks-migrator@claude-plugins-official2plugins reuse this skill
First indexed Jul 17, 2026
Resumes an interrupted notebook migration by skipping already-migrated notebooks using in-memory and on-cluster caches. Useful after crashes or manual fixes.
Diagnoses and fixes wrong results, notebook errors, or data changes mid-analysis with structured course-correction.
Drives a live marimo notebook as a workspace: runs Python in the same kernel as the user, inspects live notebook state, and commits durable changes. Use when starting a notebook or pairing on an active session.