This practical builds the process from Lesson 5.2: Claude drafts entity-first meta descriptions for the pages that need them, code checks every draft, a person approves each one and only approved rows are imported. Scripts for every step are included.
What this lesson covers
- Choosing the right pages from the audit
- The prompt and its constraints
- Mechanical checks in code
- Human review in a sheet
- Import with a dry run and a way back
- Measuring the result
The script reads the page profiles from the Entity Extractor and a crawl export, and selects pages where an intended entity is set and the dominant entity is missing from the meta description. It deliberately skips pages already flagged as a mismatch: if a page is not yet about its intended entity, a better snippet only advertises the wrong page. Each selected page goes to Claude with its title, current description and main text, and the answer comes back in a fixed structure — the draft, whether the entity appears in the first ten words, and a flag for anything that needs a person’s attention.
Before anyone reads a draft, code checks its length, the position of the entity and any number that does not appear on the page, because models smooth numbers and invent benefits. The lesson insists on running five drafts and reading them before running hundreds, so the prompt is fixed early. Approved and edited rows are imported to Rank Math or Yoast with a WP-CLI script that runs as a dry run first and keeps the previous value of every field it changes. The measurement is the Extractor re-run afterwards, not the import itself.
The scripts are short and commented, and the lesson explains what each part does, so the process can be adapted to another SEO plugin or another content type. For large sites it also points to the cheaper routes from Lesson 2.5: sending the same requests as a batch at half the price, and moving to a smaller model once the checks pass on a sample.
This practical follows Lesson 5.2 in Module 5 of The AI-powered Entity Audit. It suits SEOs and content leads with a WordPress site and an Anthropic API key; the scripts run as written and the lesson explains each step.