Skip to content
Coding Script or NotebookGoogle ColabFree

Extraction Readiness Audit: Five Checks for AI Search, with Claude Section Rewrites

ForAI searchContent audits

By Lazarina Stoy· Updated 5 Dec 2026

AI search systems rarely read a page top to bottom. They pull out passages, so a section has to make sense on its own. This free Python script checks every section of your pages for the habits that break that, and can ask Claude to draft rewrites of only the sections that fail.

Who it’s for

Content teams and SEOs preparing existing content for AI Overviews and other answer engines, who want a list of specific fixes instead of general advice.

The five checks

  • Heading: an H2 or H3 that is generic (“Overview”, “Conclusion”) or two words or fewer
  • Back-reference: language that assumes the reader came from above (“as mentioned above”, “see below”)
  • Opener: a section whose first sentence starts with a bare pronoun
  • Unsourced: a sentence with a statistic and no source, study or year
  • Oversized: a section over 400 words, more than one retrieval chunk

How to use it

  1. Open the course scripts notebook in Colab (or download the folder from GitHub to run it on your computer).
  2. Add the keys the script needs as Colab secrets, with notebook access switched on. They never go into the code.
  3. Run the Setup cell. It downloads the scripts and installs what they need.
  4. Edit the URL list and set the CSS selector for your main content.
  5. Run the audit. It is free and calls no API.
  6. Read the flags, then run it again with --rewrite if you want drafts for the failing sections.
  7. Review every draft before anything changes on your site.

What you get

A row per section with the checks it failed, and with --rewrite, a draft for each failing section next to the original, ready for an editor.

Limits

  • The checks are heuristics. A flag means “look at this”; the section may be fine.
  • Rewrites need an Anthropic API key, billed per use to your own account.
  • It reads public pages, so the selector has to match your theme’s content area.

Why sections matter

A section that opens with “This” or refers to “the method above” loses its meaning when it is lifted out on its own. Fixing those habits makes each passage stand alone, which helps readers who skim as much as it helps retrieval.

Run it before and after an edit to see the flags drop.

The scripts are on GitHub. The The AI-powered Entity Audit course explains each check and the research behind structuring content for extraction.

What’s included

  • Five heuristic checks per section: headings, back-references, openers, unsourced stats, oversized sections
  • Runs on any list of URLs with your main-content selector
  • The audit is free; Claude is only used with –rewrite
  • Rewrites only the sections that fail, for a person to review
  • Flags are prompts to look, and the decision stays with you