This practical turns the five-check audit from Lesson 5.3 into a script you can run on any list of pages, and adds an optional step in which Claude drafts rewrites for the sections that fail — and only those sections.
What this lesson covers
- The five checks as code
- Running the audit without an API
- Triage before rewriting
- Claude’s rewrite rules
- Human approval and pasting
- Measuring the result
The audit script fetches each URL, isolates the main content with the same selector used for the corpus and splits it into sections by heading. Each section is checked for a generic or very short heading, sequential-reader phrases such as “see above”, an opening sentence that starts with a bare pronoun, a statistic with no source nearby, and a length beyond one retrieval chunk. The lesson is clear that these are heuristics: a flag means look at this, not this is wrong. The output is a sheet with one row per section, ready to sort and triage.
Only after triage does Claude come in. The rewrite prompt applies the proposition-first structure — the heading as the question, the answer first, one claim per paragraph — and forbids adding any fact, number, source or example. An unsourced statistic is kept and marked as needing a source, because finding one is a person’s job. Each draft sits beside its original for approval, approved sections are pasted in by hand so formatting and links survive, and the audit is run again to show the flags have gone.
The rewrite rules come from the proposition-first structure taught in Lesson 5.3, which draws on Beatrice Gamba’s work in the AI Search Optimisation & Agentic SEO course. The lesson credits that source and explains why each rule exists, so the prompt can be adjusted for a house style without losing what makes a section retrievable. Most pages, it shows, need two or three sections fixed rather than a rewrite.
This practical follows Lesson 5.3 in Module 5 of The AI-powered Entity Audit. The audit itself is free and needs no coding beyond running the script; the rewrite step needs an Anthropic API key.