# Using Claude Code as a Writing Assistant for Scrivener — A Complete Setup Guide (Windows)

A practical guide for non-fiction authors who want Claude AI to read, edit, and collaborate on their Scrivener manuscript directly — no copying and pasting.

*If the publisher of Scriverner is watching - consider this a feature request. I figured out a way to do on my own but an add-on or built in capability would be nice."

-–

Introduction

If you use Scrivener for long-form non-fiction writing, you may have wondered how to get Claude AI to work directly with your manuscript — reading your chapters, suggesting edits, and writing changes that appear in Scrivener without constant copying and pasting.

This guide describes a method that gives you exactly that. The key insight is that Claude Code — Anthropic’s command-line AI tool — can read and edit Scrivener project files directly on disk, just like it reads and edits code in a software project. Scrivener automatically detects file changes and refreshes, so edits made by Claude appear in your manuscript almost immediately.

This approach was inspired by how game developers use Claude Code with Unity — opening a terminal pointed at a project folder and chatting naturally, with Claude having full context of the entire project. The same workflow works beautifully for writing.

-–

Prerequisites

Make sure you have the following installed:

  • Scrivener 3 (Windows) — your existing installation is fine
  • Node.js LTS (v18 or higher) — download from nodejs.org
  • Claude Code — installed via npm (see Step 1 below)
  • A Claude account with an active subscription (Pro or higher recommended)

**Note:** This guide was written and tested on Windows 11 with Node.js v24 and Claude Code. The approach works on macOS with minor path adjustments.

-–

How It Works

Scrivener stores your manuscript as a folder of files on disk. Inside your .scriv project folder, each document (chapter, section, note) is saved as an RTF file in a UUID-named subfolder under Files/Data/. The project structure — chapter titles, order, hierarchy — is stored in an XML file called your-project-name.scrivx.

Claude Code can read all of these files directly. By placing a special CLAUDE.md file in your project folder, you give Claude a map of your manuscript — which UUID corresponds to which chapter — so it can navigate your book intelligently.

The workflow looks like this:

  1. You double-click a launcher script
  2. A terminal window opens with Claude Code running inside your Scrivener project folder
  3. You chat naturally: “Read Chapter 1” or “Add a paragraph about X to the Foreword”
  4. Claude reads and edits the RTF files directly
  5. Scrivener detects the file change and refreshes — you see the edit in your manuscript

-–

Step 1: Install Claude Code

Open PowerShell and run:

npm install -g @anthropic-ai/claude-code

Verify the installation:

claude --version

You should see a version number. If you get an error, make sure Node.js is installed and in your PATH.

Find where Claude Code was installed — you will need this path later:

where.exe claude

Note the path ending in claude.cmd — for example:

C:\Users\YourName\AppData\Roaming\npm\claude.cmd

-–

Step 2: Create the CLAUDE.md File

The CLAUDE.md file is Claude’s orientation document for your project. It tells Claude what kind of project this is, how Scrivener stores files, and which UUID corresponds to which chapter. Claude Code reads this file automatically every time it starts in the project folder.

Place CLAUDE.md directly inside your .scriv project folder — for example:

C:\Users\YourName\Documents\Scrivener Projects\My Book.scriv\CLAUDE.md

Here is a template you can adapt:

-–

# My Book Title - Writing Project

This is a Scrivener non-fiction manuscript project.
You are a writing assistant helping the author develop and edit this book.

## Project Structure

Scrivener stores documents as RTF files inside Files/Data/, each in a
UUID-named subfolder containing a content.rtf file. The master index
mapping titles to UUIDs is \[ProjectName].scrivx.

## Key Documents

| Title     | UUID                                 |
|-----------|--------------------------------------|
| Foreword  | A097A466-32FF-491F-8E6B-6DCD12185DE1 |
| Chapter 1 | 606E2F6A-318D-44EA-A9BC-81093A72CD2F |
| Chapter 2 | \[UUID from .scrivx file]             |

## How to Read a Document

Open: Files/Data/{UUID}/content.rtf

## How to Edit a Document

1. Ask the author to save in Scrivener first (Ctrl+S)
2. Read the current content.rtf
3. Preserve all RTF formatting codes
4. Only change visible text content
5. Remind author to click away and back in Scrivener to refresh

## RTF Editing Rules

- Never remove RTF control codes (anything starting with \\)
- Only modify plain text between RTF codes
- Preserve paragraph breaks (\\par) exactly
- Match RTF formatting style of surrounding text for new content

## Workflow

- Always confirm before making changes to manuscript files
- Discuss ideas before editing
- Read .scrivx to explore full project structure

-–

Finding Your UUIDs

To fill in the UUID table, open your .scrivx file in Notepad and look for BinderItem entries. Each one has a UUID attribute and a Title child element. For example:


Chapter 1 Section

You can also ask Claude to read the .scrivx file and build the UUID table for you automatically after your first launch.

-–

Step 3: Create the Launcher Script

The launcher script is a .bat file you double-click to open Claude Code pointed at your Scrivener project. It works exactly like opening a terminal in a software project — except instead of code, Claude has full context of your manuscript.

Create a new text file with the following contents and save it with a .bat extension — for example, Launch Claude - My Book.bat. Save it on your Desktop or anywhere convenient.

-–

@echo off
title Claude Code - My Book
set PATH=C:\Users\YourName\AppData\Roaming\npm;C:\Program Files\nodejs;%PATH%
cd /d “C:\Users\YourName\Documents\Scrivener Projects\My Book.scriv”
echo Starting Claude Code for My Book manuscript…
echo.
“C:\Users\YourName\AppData\Roaming\npm\claude.cmd”

-–

Replace YourName with your Windows username and adjust the paths to match your project location and the claude.cmd path you found in Step 1.

**Note:** When you double-click the .bat file, Windows may show a security warning about an unknown publisher. Click **Run Anyway** — this is normal for unsigned batch files. The first time Claude Code runs in a new folder it will ask if you trust the folder. Type yes and press Enter.

-–

Using the Workflow

Starting a Session

Double-click your launcher .bat file. A command window opens, Claude Code starts, and after the trust prompt you will see a > prompt. Start with a simple orientation prompt:

What is the structure of my manuscript?

Claude will read your .scrivx file and return a clean outline of your entire book.

-–

Reading Your Manuscript

Read the Foreword

Read Chapter 1

Show me the contents of the Dedication

Claude will locate the correct UUID, open the content.rtf file, and display the text with RTF codes stripped out for readability.

-–

Editing Your Manuscript

Always save in Scrivener first (Ctrl+S) before asking Claude to edit. This prevents conflicts between Scrivener’s auto-save and Claude’s edits.

Add a new paragraph to the Foreword explaining the book’s main thesis

Rewrite the opening sentence of Chapter 1 to be more engaging

Fix the grammar in the second paragraph of Chapter 1

After Claude makes an edit, go to Scrivener and click to a different document in the binder, then click back. Scrivener will detect the file change and refresh.

Claude will always show you what it plans to change and ask for confirmation before writing anything to disk.

-–

Discussing Ideas

Claude Code is not just an editor — it is a thinking partner:

I’m struggling with the transition between Chapter 1 and Chapter 2.
What approaches could work?

What are the strongest arguments in my Foreword?
What might a skeptical reader push back on?

Suggest three possible titles for Chapter 2 based on what I've written so far

-–

Adding New Chapters

Create a new chapter called Chapter 2 about the transcendence of God.
Add it after Chapter 1 in the manuscript structure.

After Claude creates the new chapter, ask it to update your CLAUDE.md:

Update CLAUDE.md with the new chapter structure

-–

Common Questions

Will Claude see changes I make directly in Scrivener?

Yes — Claude reads files fresh from disk each time you ask it to read something. If you edit text in Scrivener, save (Ctrl+S), then ask Claude to read that section, it will see your latest changes. Claude is not watching files in real time — it reads on demand. The key habit is: save in Scrivener before asking Claude to read or edit.

Does CLAUDE.md need updating as I write?

No — CLAUDE.md is a static orientation document. It does not contain your manuscript content. Claude reads the actual RTF files directly each time. You only need to update CLAUDE.md when you add new chapters (to keep the UUID table current), move the project, or want to add writing style notes for Claude to follow.

-–

Troubleshooting

The launcher window opens and immediately closes

Run it from PowerShell to see the error message:

cmd /k “C:\path\to\Launch Claude - My Book.bat”

The most common cause is an incorrect path to claude.cmd. Verify with:

where.exe claude

-–

Claude says it cannot find a document

The UUID in your CLAUDE.md table may be wrong. Ask Claude to find the correct one:

Read “My Book.scrivx” and find the UUID for Chapter 1

-–

Edits do not appear in Scrivener

Click to a different document in the binder, then click back. If changes still do not appear, close and reopen the document in Scrivener. Make sure you saved in Scrivener before asking Claude to edit — if Scrivener saves after Claude edits, it may overwrite Claude’s changes.

-–

Claude edits break the RTF formatting

Ask Claude to show you planned changes before writing:

Show me exactly what you plan to change in the RTF before making any edits

If formatting gets corrupted, use Scrivener’s Edit > Undo or restore from Scrivener’s automatic Snapshots (found in the Snapshots folder inside your .scriv project).

-–

Tips and Best Practices

  • Keep Scrivener open alongside your terminal so you can see changes appear in real time
  • Use Documents > Snapshots > Take Snapshot in Scrivener before asking Claude to make large edits — this gives you a safety net
  • Start each session by asking Claude to read the .scrivx structure to orient it to your current project state
  • Be specific: “Add a paragraph in the Foreword after the second paragraph about X” is better than “improve the Foreword”
  • Use Claude for brainstorming and discussion before asking it to edit — it is a better thinking partner than ghostwriter
  • You can have multiple launcher scripts for multiple Scrivener projects — just copy and adjust the paths

-–

Why This Works Better Than MCP Plugins

You may have seen guides about using MCP (Model Context Protocol) servers to connect Claude to Scrivener. While MCP is promising, the available Scrivener MCP packages currently have significant compatibility issues with newer versions of Node.js and Claude Desktop on Windows, including dependency conflicts and session state problems that make them unreliable.

The Claude Code approach described here has no such issues — it uses the same file system access that Claude Code uses for software development, which is mature, stable, and well-tested. The tradeoff is that you work in a terminal window rather than inside Claude Desktop, but the experience is identical to chatting with Claude — just type and press Enter.

-–

This workflow was developed through hands-on testing in April 2026. If you find improvements or have questions, share them in the comments.

Moved to a more appropriate forum.

Note that attempting to edit a Scrivener project with any tool other than Scrivener itself is unsupported and entirely at your own risk. Note also that documents placed inside the project folder by third party tools may be detected and removed by Scrivener’s data corruption checks. Again, such alterations are entirely at your own risk.

Our recommended approach to making the content of your project accessible to third party tools would be to use the Sync with External Folder function.

2 Likes