Well Engineered Tech - Blog

From Session Logs to Better Prompts with claude-sessions

- Hamburg, Germany

Dieser Artikel ist auch auf Deutsch verfügbar.

Getting better at working with Claude Code requires understanding what worked. Which prompts landed immediately? Where did it take three attempts? Learning happens through pattern recognition, but that’s hard when the data is invisible.

Claude Code1 saves every interaction. Every session, every tool call ends up as JSONL in ~/.claude/projects/. The format is made for machines though, not humans. Nested JSON objects, one line per entry. Add filenames made of UUIDs. After two weeks, there are dozens of files and I have no idea which one contains the login module refactoring. No preview, no search.

My friend Julian built a tool that solves this problem.

claude-sessions2 is a TUI (Terminal User Interface). It lists all sessions, makes them searchable and filterable. A preview panel immediately shows topics, affected files, and token usage. Press Enter to jump back into an old session, press Ctrl-O to export it as HTML.

With Ctrl-Y I copy a session as Markdown to the clipboard and throw it into a fresh context window. There I have the AI debug our conversation: Why did the fix take three attempts? What was missing from the initial prompt?

The answers reveal patterns. Instructions too vague, missing project context, unmentioned dependencies. These insights flow directly into my slash commands and skills.

I use the export for a cross-model loop. The HTML file first goes to Gemini 3 Pro. There I have it evaluate the efficiency of my inputs. Which slash commands generated too many follow-up questions? Where did we waste tokens?

With this external analysis, I go back to Claude. I confront the model with the weaknesses of our last session and issue the order for self-correction. Here is the feedback, rewrite the definitions for my skills and slash commands so these mistakes don’t happen again. Essentially, Claude refactors its own configuration.

Installation

Dependency: fzf3

# Install fzf
brew install fzf

# Clone repository
git clone https://github.com/Julian194/claude-sessions-tui.git ~/claude-sessions-tui

# Make scripts executable
chmod +x ~/claude-sessions-tui/bin/*

# Extend PATH
echo 'export PATH="$PATH:$HOME/claude-sessions-tui/bin"' >> ~/.zshrc
source ~/.zshrc

  1. Anthropic, Claude Code Documentation , 2025 ↩︎

  2. Julian194, claude-sessions-tui , GitHub, 2025 ↩︎

  3. junegunn, fzf - Fuzzy Finder , GitHub ↩︎