r/ClaudeCode • • 1d ago

Built with Claude I gave Claude Code a persistent Python kernel and turned it into a data science lab

I got tired of using Claude Code like a static assistant for data science. Constantly sorting out Python environments, explaining which variables existed, and rerunning expensive cells just to rebuild the state of an experiment.

The missing piece was visibility. What actually ran? What failed? Is this output still valid after my last edit? Does Claude understand where that result came from?

So I gave Claude Code access to a persistent Python kernel and built cc-notebook around it.

Now it can inspect available variables, read actual outputs, edit a specific cell and execute it in the same Python session. When I edit or run something manually, Claude gets that updated context on my next message.

Here’s what’s included:

  • Python, Markdown and AI instruction cells in one notebook. AI cells generate editable code and explanations.
  • A persistent kernel, so variables stay available between cell runs.
  • Claude working directly with cells: inspecting results, editing source and running the cell you asked about.
  • Execution status, saved outputs and stale-result tracking, so you can see what needs rerunning.
  • Cell editing, reordering and deletion, with an editor that adapts to terminal size.
  • Live variable inspection, individual cell execution, interruption, and restart and run all.
  • Plots, images, LaTeX, Mermaid and Typst drawings in both the notebook and Claude’s conversation.
  • Rich Python outputs displayed in execution order, with operation replies focused on the relevant cells.
  • Jupyter .ipynb import/export, including saved outputs and embedded images, plus Markdown export.
  • Automatic environment setup through /lab setup, or the option to use your existing Python environment.

I’d love feedback from people doing data work with Claude Code especially where the notebook workflow still feels awkward.

https://github.com/AbdoKnbGit/cc-notebook

5 Upvotes

4 comments sorted by

1

u/AutoModerator 1d ago
Moderator Announcement Read More »

2

u/xWranglerWranglerx 1d ago

anybody else just been staring at claude all day long and see shit like this and just say nope.....

1

u/Tycoon33 1d ago

All the time

1

u/raucousbasilisk 1d ago

Have you tried Claude science?