The author developed `claude_converter`, a tool that converts local Claude Code `.jsonl` session files into formats compatible with fine-tuning frameworks like TRL, Axolotl, and LLaMA-Factory.
- Converts sessions to the `messages` format consumed by `apply_chat_template()`
- Outputs are compatible with TRL/SFTTrainer, Axolotl, and LLaMA-Factory (sharegpt format)
- Includes a `clean_messages()` helper to strip `<tool_use>`, `<tool_result>`, and `<thinking>` blocks
- Provides an `inspect_session()` CLI function for token counts and block breakdowns
- Operates with zero dependencies
The tool enables users to leverage existing coding conversations as free training data, though the author advises filtering out failed attempts and retries before training.