llmsurgery
Read, edit, and rewrite provider session files: Claude Code transcripts and Codex threads
Install
pip install llmsurgeryWhat’s here
Dialogs are LLM conversations kept as Jupyter notebooks: notes, runnable code with outputs, and prompt/reply pairs in one editable, diffable document. The dialog data model and toolkit live in aidialog. This library contains the provider-session layers:
llmsurgery.compact: bounded conversation rendering and compaction documents.llmsurgery.ant: Claude Code session transcripts, including reading, writing, search, curation, compaction, and dialog conversion.llmsurgery.oai: Codex rollouts, including reading, search, compaction, and dialog conversion.llmsurgery.sess: one entry point across both hosts, finding a session by id prefix and reading it as a dialog, plus thesess2nbcommand.
llmsurgery.skill is the single pyskills entry point. It routes agents to doc(llmsurgery.ant) for Claude sessions, doc(llmsurgery.oai) for Codex sessions, and the compaction module when bounded rendering is needed.