← ClaudeAtlas

sync-wb-nblisted

Propagate a change made in a Wolfbook .wb notebook into the paired .nb notebook so the two stay identical. Use immediately after every .wb edit.
Mexregkan/claude-for-researchers · ★ 37 · AI & Automation · score 73
Install: claude install-skill Mexregkan/claude-for-researchers
# sync-wb-nb Keep a `.wb` and its paired `.nb` mirror in sync. We edit/test in the `.wb` (Wolfbook MCP); the `.nb` is the mirror we cannot run but the user opens in desktop Mathematica. Direction is always `.wb` → `.nb` (the `.wb` is authoritative; `/nb-to-wolfbook` handles the initial reverse conversion). Set the default pair via `defaultWb`/`defaultNb` at the top of `sync-wb-nb.wls`, or pass absolute paths as trailing args. Two operations, one helper script (`sync-wb-nb.wls`, in this skill's directory): - **Snippet sync** (`replace`/`insert`/`verify`/`stability`) — propagate ONE edited cell, preserving the rest of a hand-crafted `.nb` (its outputs, manual tweaks). This is the standing-rule after editing the main notebook. - **`regenerate`** — rebuild the WHOLE `.nb` from the `.wb` so it opens in Mathematica looking normal: syntax-coloured code, styled headings. Use it to create a fresh `.nb` (e.g. a new `generated/*.wb`) or after a wholesale rewrite. It **overwrites** the `.nb`, so never use it to patch one cell of a hand-crafted notebook. ## When to invoke - After editing/adding cells in the MAIN `.wb`: snippet sync, **immediately**. Add to your CLAUDE.md: > Always run `/sync-wb-nb` immediately after editing or adding cells in any `.wb`. - For a NEW or fully-rewritten `.nb`: `regenerate`. ## regenerate — full colourised rebuild ```bash WLS=".claude/skills/sync-wb-nb/sync-wb-nb.wls" # path from project root wolframscript -file "$WLS" regenerate "<abs w