Talking Books

I’ve had to learn a lot quickly in the last few months and I’ve been looking for ways to accelerate that learning process. One technique I found is surprisingly helpful. I rarely finish books - I often get to a stage where I think I’ve understood the main concepts and reading more fo the book feels like diminishing returns. At the same time, I’m not really sure if I got it all, and I probably have some fuzziness in my mind about some of the concepts.

I wanted a way to have a conversation with the author of the book - and ask them questions about their concepts and how to relate them to other ideas, and often to double check I have actually extracted the right understanding the author intended (often I’ve missed important nuances, especially after only a first read).

Here’s my very simple method to do that:

  1. Convert a book to markdown so it’s lean and clean for an LLM to read
  2. Import the full book contents  into Claude Code’s context window and then ask Claude to impersonate the author and answer my questions
  3. Have a trippy conversation about the material with “the author” of the book.

I explored importing the book into context, having it locally available for the LLM to search across, and not providing the book at all and letting the LLM answer based on its own pre-training knowledge. But I found it pretty hard to quantitatively compare and I stopped because I found two benefits that I appreciated qualitatively:

How to set it up

  1. First, convert a book or pdf to markdown so it’s lightweight and plain text for the LLM. Thanks to uv this can be a neat little one-liner to use Microsoft’s markitdown library:
# For .epub
# uvx markitdown input.epub -o output.md

# For .pdf, markitdown needs an additional dependency so this would become
# uvx --from 'markitdown[pdf]' markitdown input.pdf -o output.md

uvx markitdown test-driven-development-by-example.epub -o test-driven-development-by-example.md
  1. Next, in your CLAUDE.md, use the @reference syntax to import that file into the context window
<!— CLAUDE.md —>

# Persona: You Are Kent Beck

You are Kent Beck, the author of the book "Test-Driven Development By Example". You are helping the user learn Test Driven Development, and apply it to their real world problems.

- Respond to all questions as Kent would, using his voice, style, and teaching approach.
- Stay in character. Speak as "I" (Kent Beck), not "the author" or "Kent Beck says."

## The book is imported here:

@test-driven-development-by-example.md

## The users questions will follow
  1. So now my folder looks something like this:
tdd-kent-beck/
├── CLAUDE.md
├── test-driven-development-by-example.md // markdown conversion
└── test-driven-development-by-example.epub // the original book
  1. And I boot up the ghost of Kent Beck to talk over his examples and better understand some of the thinking behind his TDD philosophy:
cd tdd-kent-beck
claude "If the goal of TDD is clean code that works, and building confidence in our code, then how should I think about the role of TDD alongside other tools that do the same thing - such as the type system in the language, linters, production analytics, telemetry, etc."

That book turned out to consume 95.5K tokens leaving 85k tokens for conversation, which I can tell by running /context command in the claude code window:

Though now Claude Opus 4.6 is 1M tokens by default, this should massively increase the number of books I can do this with!

Benefits

Crude as this method is, I found it useful and fun to ask some weird digital spirit of Kent Beck all my silly questions about TDD.

But on a more serious note there are some benefits that this approach uniquely unlocks:

  1. I could ask such basic/dumb questions that I really don’t think Kent would ever answer for me, or I’m not sure I’d even feel ok asking him in the first place.
  2. We could go back and forth on a conversation that again I can only imagine would be a horrible ROI for the real Kent Beck, and I wouldn’t pay his consulting rates for the answers to those questions, but if it’s essentially free as part of my claude max subscription, it’s definitely worth it.
  3. It makes any book I own into a more interactive format, which I find engaging and stimulating, and that matters when you’re needing your brain to stay open and engaged in learning. Instead of bouncing between a few pages trying to figure out a connection between two parts, I can now just ask to explain that and this consistently would unstuck me and keep me in the learning flow.