# Manuscript X-ray

> A script reads your whole novel (.txt, .md, .docx; 563,001 words in one run) and flags pacing outliers, characters who vanish, POV and tense slips, eye-colour contradictions, tag adverbs, close repeats, each at chapter:line. Your agent reads only those passages and writes a beta read citing them.

Manuscript X-ray is a paid AI agent skill on Agensi by Hale Sinclair, in Writing & Content. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Hale Sinclair](https://www.agensi.io/creators/hale-sinclair)
- Category: [Writing & Content](https://www.agensi.io/skills/writing-content)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/manuscript-x-ray
- Tags: writing, education, productivity, fiction, novel, manuscript, beta-reader, revision

## About this skill

### The problem
A beta read of a novel needs the whole book. An agent cannot hold 90,000 words, let alone 200,000, in its context window, so a critique done by the model alone rests on what fits. It cannot reliably tell you that a character vanishes for fifteen chapters, that one chapter is three times the length of the others, or that a pair of eyes is black in one chapter and blue in the next. Notes like "the middle drags" also rarely say where.

### What it does
**xray.py** is one Python file with no dependencies. It reads the entire manuscript and writes a report. Every finding in the report has a location `chN:LM`: chapter N, line M of your file.
- **Structure.** It finds the chapters by itself, skipping a table of contents and handling Book and Epilogue divisions. It reports words per chapter, scene breaks, and numbering gaps or repeats.
- **Pacing.** A table with one row per chapter: words, dialogue share, mean sentence length, share of long sentences, and the characters most present. It flags chapters far from the median.
- **Characters.** An index of the recurring names: mentions, chapters present, first and last appearance, and the longest absence. A character who drops out for many chapters is flagged.
- **Point of view and tense.** It flags chapters and paragraphs whose person or tense differs from the book's. It measures the narrator's own text: dialogue, and letters or stories inside quotation marks, are a character's voice and are not counted.
- **Continuity.** It ties eye, hair and beard colours to named characters and flags a colour that contradicts the others.
- **Line level.** It counts dialogue tags and tag + adverb pairs, filter words, crutch words and echo words. It lists phrases repeated close together, runs of sentences with the same first word, and sentences that open with an -ing word.

The report opens with "Where to look first", a ranked reading list of the flags. Your agent prints each flagged passage with `--show chN:LM` and reads it. It decides whether the flag is a real problem, a deliberate choice or a false positive. Then it writes the critique: what works, revision priorities, line-level patterns, and what it checked and found fine. Every point cites its location.

### What the check run proves
Manuscript X-ray takes the context window out of it: code measures the whole book, and the agent reads only what the code points to. In the check run:
- **The whole book is read.** On *Pride and Prejudice*, *Frankenstein* and *War and Peace*, the word totals equal an independent count of the text: 126,575 (plus 727 illustration-caption words it skips), 75,041 and 563,001.
- **Long books in one run.** *War and Peace* (563,001 words) was measured in one run in under 5 seconds (3.7 s); the check fails above 20. All 365 of its chapters were found, in 17 BOOK/EPILOGUE containers, with 382 table-of-contents lines skipped. *Pride and Prejudice* gave 61 chapters and *Frankenstein* 28 (4 letters and 24 chapters), with no settings.
- **Every finding has a chapter and line.** The three reports have 29, 28 and 47 ranked flags. Every one carries a `chN:LM` location and the chapter's heading, and the check confirmed each location falls inside its chapter. N counts the headings in order, so with a Prologue first, "Chapter Two" is ch3.
- **Counts you can verify.** The character index matches an independent whole-word count. Elizabeth: 634 mentions in 60 chapters. Wickham: 194 in 34. Darcy, Bennet, Bingley and Jane are within 1%.
- **Absences found.** Gardiner is absent for 15 chapters (ch10-ch24) in *Pride and Prejudice*. Kutúzov is absent for 99 chapters (ch76-ch174) in *War and Peace*. Both were flagged, and both gaps equal the independent count.
- **Planted errors caught at their line.** One line of *War and Peace* was changed to give Denísov blue eyes. The report flagged that line, `ch33:L8029`, against the two lines that call his eyes black. On the unchanged books it found 0 conflicts. A planted scene break and a skipped chapter number were also caught at their lines.
- **The sample is real.** The example report in the ZIP is the check run's own report on *Pride and Prejudice*. The sample critique cites 37 locations, and every one is inside its chapter.

### How it works
1. `python3 xray.py draft.docx --out xray.md --out xray.json`, run from your project folder. This writes the report, plus the full data as JSON. xray.py is a single file that needs no other file of the package, so it runs the same when the agent writes it to a temporary file, as Agensi delivers scripts.
2. The agent checks "What was read" (word count, chapter count, first heading). If the chapters were not found, it reruns with `--heading REGEX`.
3. It reads "Where to look first" and prints each flagged passage it will discuss with `xray.py draft.docx --show ch12:L2865 --context 6`.
4. It reads the opening, the longest and shortest chapters and the ending, so that it can also say what works.
5. It writes the critique in a fixed format. Every point cites `chN:LM`, and the numbers are quoted from the report as given. `references/measures.md` lists the known false positives of each measure, for example letters set without quotation marks, which read as POV slips.

Formats: .txt, .md and .docx (Word files are read directly, chapters from Heading styles). A .docx copy and a Markdown copy gave the same numbers as the plain text. Python 3.9+ standard library only. The script makes no network connections. It reads only the file you name, writes only inside the current directory, and refuses to overwrite the manuscript.

### Use cases
- Beta-read a complete novel and get a critique that cites chapter and line.
- Find the chapters that run long or short, or that change pace.
- See where a character disappears, and for how many chapters.
- Catch eye and hair colours that change between chapters.
- Check a revision for POV slips, tense slips, repeated phrases, tag adverbs and crutch words.

### Known limitations
- The measures are heuristics. They point to passages; the reading decides. Letters and diaries set without quotation marks look like POV slips: in *War and Peace* two letters, Pierre's diary and an essay chapter are flagged as first-person chapters. General statements look like tense slips. Deliberate refrains look like repetition. The agent is told to check each flag and say which ones it dismissed.
- Continuity covers eye, hair and beard colour only. Plot holes, timeline errors and head-hopping between third-person characters need reading. The colour ties are heuristic: on *Pride and Prejudice* it tied no colours to a named character, so there was nothing to compare.
- First names and surnames are separate rows in the character index.
- In a .docx, only the main text is read (no footnotes or comments), and locations are paragraph numbers.
- Prose fiction only. Chapter, dialogue and POV measures do not fit screenplays, poetry or non-fiction.
- The critique comes from your agent's own reading of the flagged passages. Its quality depends on the model you use.

## Requires

- Python

No accounts, API keys or services. Python 3.9+ on the machine.

## Known limitations

The measures are heuristics that point to passages: letters and diaries set without quotation marks look like POV slips, general statements like tense slips, refrains like repetition, and the agent checks each flag before calling it a problem. Continuity covers eye, hair and beard colour only; plot holes, timeline errors and head-hopping need reading. First names and surnames are separate rows in the character index. In a .docx only the main text is read and locations are paragraph numbers. Prose fiction only.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Manuscript X-ray skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### My novel is 150,000 words. Will it fit?

Yes. The script reads the whole file with code, so your agent's context window does not limit it. The check run measured *War and Peace* (563,001 words, 365 chapters) in under 5 seconds (3.7 s). The agent then reads only the passages it is pointed to.

### How do I find a passage the critique mentions?

Every location is `chN:LM`, chapter N and line M of your file (paragraph M in a .docx). `xray.py yourfile --show ch12:L2865` prints it with the lines around it, or go to that line in your editor.

### It found the wrong number of chapters.

Check "What was read" at the top of the report. If your headings are not like "Chapter 12", "CHAPTER XII.", "Letter 1", a Markdown heading or a Word Heading style (the forms the check run tested), give the pattern: `--heading '^~ \d+ ~$'`. Every other number depends on the chapter split, so the skill tells the agent to fix it first.

### Does my manuscript leave my machine?

The script makes no network connections. It reads only the file you name and writes the report only inside the current folder. The passages your agent reads go to the model your agent uses, as with any file you open with it.

### Will it rewrite my book?

No. It measures and points; the agent critiques and suggests. Edits are offered only if you ask, and short.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
