The challenge
Faster page building, without handing AI the keys.
The client’s new WordPress site runs on a custom page builder with 21 content blocks, each with its own fields, dropdowns and image slots. Building pages in it is slow, careful work: pick the right block, fill every field correctly, find the right image and don’t break the layout. Could a content writer just tell Claude what a page should say and have it built correctly?
The risk was just as clear. An AI that can edit pages can also edit the wrong page, publish something unfinished, or be talked into something by text it reads along the way. On a client’s live site, “mostly safe” isn’t good enough, so nothing a writer or the AI does can exceed what that writer is allowed to do.
The approach
How I tackled it.
-
Two gates that don’t trust each other
A gateway on the writer’s computer holds the credentials, checks permissions and signs a one-use pass. A plugin on the site verifies it and acts as that person, granting only what both allow.
-
Teach it the real schema
Claude fills named fields on named blocks instead of writing raw page code, and every value is checked against the theme’s own block definitions before anything is saved.
-
Attack it, then attack the fixes
Three rounds of code review and hands-on testing, about 135 attacks in all, with a fresh attack round after every set of fixes.
What I built
13 abilities, every change checked twice.
- Signed, one-use passes Each pass names the person, the one action it’s for and only the permissions that action needs.
- Schema-checked edits Unknown fields, made-up dropdown values and unsafe links are refused before anything moves.
- Normal WordPress revisions Every change is saved as the writer, nothing is deleted for good, and the site’s history matches the gateway’s log.
- Refusals that say what to do “Pat has this page open in the editor” or “the page changed since you read it,” not just “not allowed.”
The results
What changed.
Writers can draft, edit and publish real pages by asking for them, and every attack in the final round was refused or contained.
- 135 attacks, 3 rounds About 30 issues found and fixed, 8 of them critical or high.
- 7 pages built by Claude 5 new and 2 existing, each from a short request.
- 61 automated tests 45 plugin and 16 gateway tests, all passing, with 0 known dependency vulnerabilities.
Tech stack
- WordPress
- PHP
- Claude
- Custom page builder
- Signed requests
- Automated tests
