On this page
  1. What AI books are good (and bad) at
  2. What you need
  3. The one-prompt version
  4. How a book file actually gets made
  5. The full workflow
  6. 1. Write a reader profile
  7. 2. Ask for the outline first
  8. 3. Agree on a style guide, then write chapter by chapter
  9. 4. Fact-check
  10. 5. Add diagrams and a cover
  11. 6. Export to PDF and EPUB
  12. 7. Read it and iterate
  13. The result
  14. Tips
  15. Your turn

Today’s AI is very good at one thing in particular: sharing knowledge. Ask Claude to explain probability, photosynthesis or Python, and you get a clear, patient answer.

So here’s an idea. If AI can explain it in a chat, it can explain it in a book. And not a generic textbook written for “the average student”. A book written for you: in your language, at your level, with examples from your own life, in a style you actually enjoy reading.

In this article I’ll show you how. First the one-prompt version, then how a book file actually gets made (Markdown, pandoc, LaTeX, PDF, EPUB, all explained for beginners), and then the full workflow I’d use for a book you really want to learn from.

What AI books are good (and bad) at

Before you start, pick your topic carefully. An AI book is only as good as what the model already knows.

Great topics: school subjects (maths, physics, biology, history, economics), programming, and well-documented skills like writing, statistics or personal finance. There is a huge amount of good material about these on the internet, so the model knows them well.

Risky topics:

  • Things with little training data. Regional languages (bahasa daerah) like Javanese, Sundanese or Batak are a good example. The model may mix up words, levels of politeness or spelling. A book about them can look confident and still be wrong.
  • Brand-new subjects. Anything that appeared after the model’s training cutoff, or that is changing every month. The model simply hasn’t read enough about it yet.

For risky topics you can still make a book, but you need good sources to feed in and a human who knows the subject to check it. For great topics, you mostly need a good brief. That’s what this article is about.

And here’s the part I love: the knowledge is the same knowledge, but the explanation can be made for one person. Explained in casual Indonesian instead of formal English. Starting from zero instead of assuming you remember high school. With football examples, or cooking examples, or whatever makes it click for you.

What you need

Same setup as my shorts explainer tutorial:

In Claude Desktop, select Opus 5.5 as the model and turn on Auto mode. Both are at the bottom right of the chat. You never have to open a terminal: Claude writes the files and runs the tools for you.

The one-prompt version

The simplest version is one message. Say who you are, what you want to learn, and how you like to learn. For example:

Prompt
Make me a short book (PDF) that teaches probability. I’m 16, I love football, and I learn best with real match examples. Keep the language simple and add a few practice questions with answers.

That’s the whole thing. Claude plans the chapters, writes them, and turns them into a PDF you can download.

When I sent it in Claude Desktop, Claude loaded its PDF skill, wrote a Python script that builds the book, and built the PDF. Then it turned the pages into images to check the layout, found nearly empty pages, and rebuilt it until they were gone.

Claude Desktop with the probability prompt as a chat message, then the step list: Loaded skill pdf, Created build_book.py, Build the PDF and render page previews, Make a contact sheet of all pages, Fixing layout overflow causing nearly empty pages, Tighten pagination and rebuild the PDF. On the right, the PDF preview shows a green cover: The Odds of the Game, Learn probability through penalties, shootouts, comebacks and xG.
Claude writes a script, builds the PDF, looks at the pages and fixes what's wrong.

The result was The Odds of the Game, a 13-page PDF with seven short chapters, a cover, diagrams, 10 practice questions and full answers at the back. Every idea comes with a real match, like the 2022 World Cup final shootout and Leicester’s 5000-1 title.

Claude Desktop after the book is done: Claude says it made The Odds of the Game, a 13-page PDF with seven short chapters, lists the chapters from what probability is to upsets and the they're due mistake, mentions real matches like the 2022 World Cup final shootout and Leicester's 5000-1 title, and offers the PDF as a download card.
One prompt, one finished PDF, ready to download.

Your book will be different every time you run it. Here’s another demo made for this article from exactly that brief. It came out as a 12-page PDF with five short chapters: what probability is, penalties, shootouts, expected goals (xG) and a recap.

Three pages from the one-prompt book Probability on the Pitch: the basic probability formula with a coin toss example and a practice question, the chapter opener Shootouts: when events stack up with the multiplication rule, and the Expected goals chapter with a table of four shots and their xG values.
One prompt, a 12-page PDF. Every example is football, because that's what the reader asked for.

Download the PDF if you want to flip through it.

It works. It’s correct, it’s readable, and it’s personal: penalties and xG instead of dice and coloured balls. But look closely and you’ll see it’s also plain. Default fonts, a half-empty page in the middle, no cover, no diagrams. For a quick study guide that’s fine. For a book you want to keep, use the full workflow below.

How a book file actually gets made

Before going further, it helps to understand what Claude is doing behind the scenes. Claude can only write text. So how does text become a nicely typeset book?

The answer is a chain of free, open-source tools that have been around for years. Here are the words you’ll see in Claude’s messages:

Markdown. A way to write formatted text using plain characters. A line starting with # is a chapter title, **bold** becomes bold, a line starting with - is a bullet point. It’s easy for humans to read and easy for AI to write. Every chapter of your book starts life as a Markdown file.

pandoc. A converter. You give it Markdown, it gives you almost any document format: PDF, EPUB, Word, web pages. It’s the heart of the whole thing.

LaTeX (pronounced “lay-tech”). A typesetting system that scientists and publishers have used for decades. It decides where lines break, how maths formulas look, and where page numbers go. When pandoc makes a PDF, by default it quietly hands the work to LaTeX. That’s why maths in AI-made books can look like a real textbook.

PDF vs EPUB. A PDF has fixed pages. It looks exactly the same everywhere, which is great for printing and laptops. An EPUB is an e-book: the text reflows to fit the screen, so it’s much nicer on a phone or an e-reader. pandoc makes both from the same Markdown.

Diagram: Markdown chapters and images go into pandoc. pandoc sends the text through LaTeX to make a PDF with fixed pages for print and laptops, and also makes an EPUB whose text reflows for phones and e-readers.
The whole pipeline. You write (or Claude writes) Markdown once and get two kinds of book out.

Two more tools show up for the pictures:

  • Graphviz draws diagrams (boxes and arrows) from a short text description. Claude can also draw diagrams directly as SVG, a picture format that is really just text.
  • Playwright, a browser automation tool, can turn a web page into an image. That’s an easy way to make a cover: Claude designs the cover as a web page and takes a screenshot of it.

The full workflow

This is the workflow I’d use for a book you really want to learn from. To show it with real results, the whole workflow was run end to end for this article to make a 4-chapter demo book: Python for Busy Creators, written for a made-up reader called Nadia who runs a home-cooking account.

The prompts below are examples of what to send at each step. Change them to fit your own book.

The trick: do the cheap, fast steps first and check them, and save the slow steps (rendering the whole book) for when you’re happy.

1. Write a reader profile

This is where the personalization happens. Before any chapter is written, describe the reader. If the book is for you, describe yourself honestly. Here is the profile for the demo book:

Prompt
I want you to write a short book. First, here's the reader. Save this as reader-profile.md and use it for every chapter: - Who: Nadia, 23, runs a home-cooking account on Instagram and TikTok (about 8K followers). Works a day job in admin. - Goal: stop wasting Sunday evenings on boring computer chores: renaming photos, writing the same caption template, checking which posts did best. - Starting level: never written code. Comfortable with spreadsheets. - Learns best with: short chapters, one idea at a time, real examples from her own work. Wants to see the result of every example. - Tone: casual and friendly, no jargon without a plain explanation first. - Doesn't want: history of programming, maths-heavy examples, long theory before the first result.

The more specific, the better. “Beginner” is vague. “Comfortable with spreadsheets, has never written code” tells Claude exactly where to start.

2. Ask for the outline first

Don’t ask for the book yet. Ask for the table of contents, with a one-line promise for the whole book and the main points of each chapter. Reading an outline takes one minute. Rewriting four chapters because the structure was wrong takes much longer.

Prompt
Before writing anything, propose an outline: a one-sentence promise for the book, then 4 short chapters with 3 to 4 sections each. Every chapter should solve one real chore from the reader’s week. Save it as outline.md and wait for my feedback.

The outline for the demo book: (1) Code is just a recipe, (2) Captions on autopilot, (3) Rename 50 photos in 2 seconds, (4) Which post did best? Every chapter solves one chore from the reader profile. That’s the personalization doing its job. If something’s off, say so now: “skip installing tools, I already have Python”, “add a chapter about Excel”, “make it 6 chapters”.

Illustration of Claude Desktop: the outline prompt as a chat message, then Claude reads reader-profile.md, creates outline.md and lists a one-sentence promise and four chapters: Code is just a recipe, Captions on autopilot, Rename 50 photos in 2 seconds, and Which post did best?
The outline comes back in a minute. This is the cheapest moment to change the plan.

3. Agree on a style guide, then write chapter by chapter

A style guide is a short list of rules that every chapter follows. It keeps chapter 4 consistent with chapter 1, even when they’re written at different times. The demo book’s guide had rules like:

Prompt
Write a style guide (style-guide.md) and follow it for every chapter: 1. Every chapter opens with a real chore from the reader's week, then shows how code fixes it. 2. One new idea per section. Explain every new word the first time it appears. 3. Every code example is short, complete, and runs as-is. Show its exact output right below it. 4. Examples use food, recipes, captions and analytics. 5. Each chapter ends with a "Try it" exercise and a 3-bullet recap. Then write chapter 1 only, as Markdown, and show it to me.

Then go one chapter at a time. Read it, react (“this is too fast”, “more examples like this one”, “I didn’t get dictionaries”), and only then ask for the next one. This is where the book becomes really yours: Claude rewrites the parts you didn’t understand, which no printed textbook can do.

4. Fact-check

AI can be confidently wrong, so build checking into the workflow. How you check depends on the topic:

  • Programming books: have Claude run every code example and compare the real output with what the book says. This is the best kind of fact-check, because the computer is the judge.
  • School subjects: ask Claude to list every number, date, formula and claim in the chapter, mark which ones it is less sure about, and check those against a source.
  • Risky topics (regional languages, brand-new subjects): this is the step where you need a human expert, or at least your own reliable sources pasted in.
Prompt
Fact-check the whole book. Write a small script that runs every code example and compares the real output with the output printed in the chapter. List every mismatch, fix it, and run the check again until everything matches.

In the demo, this paid off in a way nobody planned. In the Indonesian edition (step 7), a translated caption example said its output was “86 karakter”. The check ran the code and Python said 88. Small, but exactly the kind of mistake a reader would trip on.

Terminal output of the fact-check script on the Indonesian chapters: MISMATCH in 02-caption-otomatis.md, the book says 86 karakter but Python says 88 karakter, 9 examples match, 1 mismatches. After changing 86 to 88 and running again: 10 examples match, 0 mismatches.
A real catch. The book said 86 characters, the code actually prints 88. Fixed, re-run, 10 of 10 match.

5. Add diagrams and a cover

Some ideas are easier to see than to read. Ask for a diagram wherever a chapter explains a process or a structure, and for a cover that fits the topic.

Prompt
Add a simple diagram to chapter 3 showing how a for loop repeats, and one to chapter 4 showing how a CSV row becomes a dictionary. Then design a cover: warm colours, a food feel, title “Python for Busy Creators”.
Two pages from the demo book. Left: a flowchart of a for loop with the steps Any items left?, Put the next item in the jar, Run the indented steps, and an arrow labelled go round again. Right: a diagram showing a line of posts.csv turning into a Python dictionary with date, day, dish, likes and saves.
Diagrams in the demo book: a for loop (drawn as SVG) and a CSV row becoming a dictionary (Graphviz).

6. Export to PDF and EPUB

Now the slow step: build the whole book. Ask for both formats, so you can read it on your laptop and your phone.

Prompt
Build the whole book: a PDF (6x9 inch pages, the cover as the first page, a table of contents) and an EPUB with the same cover. Use pandoc. Then check both files and show me a few pages.

The PDF came out at 21 pages, with the cover, a table of contents and four chapters:

The cover of Python for Busy Creators in orange and cream with a for loop on a plate, the Contents page listing four chapters and their sections, and the first page of Chapter 1, Code is just a recipe.
The finished PDF: cover, contents, chapter 1. Written for one specific reader.

And the EPUB, previewed at phone width. Same Markdown, but now the text reflows to fit the screen:

Two phone-sized screens showing the EPUB edition: the start of Chapter 1, Code is just a recipe, and the For loop section with code, its output and the loop diagram, all reflowed to the narrow screen.
The EPUB on a phone-sized screen. No zooming or side-scrolling like with a PDF.
Illustration of Claude Desktop: the export prompt as a chat message, then Claude runs pandoc and epubcheck and offers python-for-busy-creators.pdf (21 pages) and python-for-busy-creators.epub with Download buttons.
Both files land in the chat, ready to download.

7. Read it and iterate

The first build is never the final one. Read it like the reader would, and tell Claude what bothers you. The first build of the demo book had three real problems:

  • Long code lines ran off the edge of the page.
  • The loop diagram was so small you couldn’t read it.
  • The EPUB had all four chapters stuck together in one long chapter.

All three were fixed with one message each. Here’s the code one, before and after:

Before and after. Left, first build: a long caption line of code and its output are cut off at the right edge of the page. Right, after one fix: the same lines wrap onto the next line with a small arrow, so nothing is cut off.
Iterating on the real thing. Same page, before and after one round of fixes.

Iterating is also where personalization goes further. Want it in your own language? Ask. The demo book got an Indonesian edition, in casual aku/kamu style, with the code examples translated too:

Prompt
Make an Indonesian edition of the whole book. Casual Indonesian (aku/kamu, like a friend explaining), translate the examples and the diagrams too, and run the fact-check again on the new chapters.
Three pages from the Indonesian edition Python buat Kreator Sibuk: the cover, the first page of Bab 1, Kode itu cuma resep, and a chapter 3 page with the for loop code, its output Syuting: nasi goreng and an Indonesian loop diagram.
Same book, now in casual Indonesian. Diagrams and code output included.

The result

From one reader profile to a finished book:

  • A 21-page PDF and an EPUB, in English and in Indonesian.
  • 4 chapters, each built around one chore from the reader’s week.
  • 10 code examples per edition, every one run and checked against real Python output.
  • 2 diagrams and a cover.

Download them and have a look: PDF · EPUB · Indonesian PDF · Indonesian EPUB

The examples are about cooking, the account is fictional, but swap the reader profile and you get a completely different book. A nurse learning statistics with hospital examples. A student reviewing for exams with K-pop examples, hehe. Same workflow.

Tips

Be specific about your level. “I’m a beginner” is less useful than “I know what a variable is, but loops confuse me.”

Ask for exercises with answers. Reading feels like learning. Answering questions actually is.

Keep the files. Ask Claude to keep the reader profile, outline, style guide and chapters as separate files. Then “make chapter 3 easier” or “add a chapter” later is a small edit, not a restart.

Don’t publish what you can’t check. A personal study book is low risk. A book you plan to sell or share with a class needs a real fact-check by someone who knows the subject.

Your turn

Pick something you’ve always wanted to understand, write an honest reader profile, and make your own book. Share a page on social media and tag me: @terrydjony on Threads, @Terry_Djony on X or @terrydjony on Instagram. I’d love to see what topic you pick and who you wrote it for.

See you in the next one!

Was this useful?

Got a question or stuck somewhere? Email me at [email protected] or DM me on Threads. I answer every one.

Share this tutorial:

What should I write next?

Finished this one? Tell me what you are stuck on next. The next tutorials come from these answers, and I reply to yours when it turns into one.

Signing in makes you a free member and puts your email on my list, so I can reply. No spam.