I gave Claude Code a single keyword and it handed back a research-backed, human-sounding article that can actually compete in the top 10. No template, no spinner. A real pipeline of small agents, each doing one job well.
Here is exactly how I built it: how I planned it, how I prompted Claude, the six stages it runs, the infrastructure that got it online, and how I eventually packaged the whole thing as a Claude skill.
Plan it before you prompt it
The build is the easy part. Claude Code is fast. The leverage is in the planning, and the very first job is working out the architecture and which APIs you need. Get these six stages right on paper and the code almost writes itself.
Define the one job
Keyword in, ranked article out. Write that sentence down and refuse every feature that does not serve it.
Work backwards from “ranked”
Open the current top 10. What entities, structure and depth do they share? That shared shape is your spec.
Split it into human steps
How would a great writer do it? Research, brief, draft, edit, publish. Each of those becomes one agent.
Decide the data source
Real SERP data beats the model’s memory every time. Wire in live results (I use Exa) so it writes from facts.
Write the output contract first
Before any code, define exactly what each stage hands the next: the JSON or markdown shape. Build to the contract.
Add the guardrails
Reading level, forbidden AI words, claim checks. The unglamorous rules are what stop it sounding like a robot.
The decision that made it work: live SERP data
An AI model writes from stale, generic training memory. To actually compete in the top 10, you have to write from what is ranking right now: the real entities, structure and depth on the current first page. So the most important early choice was not a prompt. It was: where does the data come from?
I went looking for an API that could read the SERP, not just list it, and landed on Exa.
- Stale, trained months ago
- Generic, no real citations
- Invents entities and stats
- Reads like every other AI post
- Current, reads today’s top 10
- Clean, LLM-ready content (not raw HTML)
- Real entities pulled from real pages
- Writes from facts, not vibes
Why Exa won
It returns clean, ready-to-read content from the actual ranking pages, there are free credits to start so you can build the whole thing before paying a cent, and it lets you filter out the noise, so the writer only ever learns from real pages, never forums or wikis.
Domains & patterns it excludes
How I prompted Claude Code
I never asked for “an SEO writer” in one go. I gave Claude the output I wanted, then built one stage at a time and checked each before moving on. Three prompts that did the heavy lifting:
The one idea that makes it good: sequential prompting
This is the most important thing in the whole post, so I will say it plainly: never ask the model to write the article in one shot. That is exactly how you get the generic, samey mush everyone can smell.
Instead, each stage is its own focused prompt, and its structured output becomes the next stage’s input. Research feeds the brief. The brief constrains the draft. The draft gets humanized. A keyword walks down a chain, picking up exactly what it needs at each step:
best wordpress themesthe only thing you provide
serp.jsontop 10 + entities + headings
brief.jsonoutline + what to cover
draft.mdfull article, written to the brief
humanized.mdgrade-7, AI words stripped
final.md + Google Docchecked + published
Why it matters so much for a writer
One mega-prompt has to juggle research, structure, voice and SEO all at once, so it does each at about 70%. A chain does each at 100%, because every agent only sees a clean spec from the step before it, not the whole messy context. And when something reads off, you can open the exact hand-off between two steps and fix that, instead of re-rolling the dice on one giant prompt.
The 6-stage pipeline, running
Each stage is a small agent that hands a clean spec to the next. Hit replay to watch a keyword move through the whole thing:
SERP Research
Pulls the live top 10 with Exa and extracts their headings, entities and angles.
Content Brief
Turns that into a BLUF outline: the structure, entities and questions to cover.
Article Writer
Drafts the full long-form article against the brief, type-aware (guide, vs, roundup).
Humanizer
Forces grade-7 reading level and strips ~260 AI tell-words and ~50 phrases.
Publisher
Pushes the finished piece straight to a Google Doc or the CMS.
Orchestrator
Runs all five in order. One keyword in, one publish-ready article out.
What the brief and draft actually look like
Feed it best wordpress themes and you don’t get generic fluff. You get a brief built from the live SERP, then a draft written to it:
- Article type: roundup (detected from the SERP)
- Must-cover entities: GeneratePress, Kadence, Astra, Blocksy
- Buyer questions: speed, page builders, price, support
- Target depth: ~2,400 words, 9 H2s
“Most ‘best WordPress themes’ lists are just affiliate links in a trench coat. So I pulled the four themes that actually show up across the top results and ran each one on a real test site. Here’s what held up…”
grade 6.8 · 0 AI tell-words · 2,380 words
Making it sound human, not AI
A draft from any model has a smell: delve, tapestry, leverage, “in today’s digital landscape”. The humanizer’s entire job is to scrub it out. It runs the draft against a big list of forbidden words and phrases, rewrites them into plain language, forces a grade-7 reading level, and fact-checks claims before anything ships.
In today’s digital landscape, this robust tool empowers you to seamlessly navigate the ever-evolving realm of SEO.
A few of the ~260 banned words & ~50 phrases
Real swaps it makes
The output: clean markdown, straight to Google Docs
Every article comes out as clean markdown: no tangled HTML, no cleanup, paste it anywhere. The final agent then converts that .md into a properly formatted Google Doc. It authenticates with a Google service account, creates the doc in a Drive folder, and hands back a shareable link. Keyword in one end, an editable doc out the other.
Building it for me vs. shipping it to everyone
Here is the part nobody warns you about. A tool that works for you, on your laptop, with your own API keys, is maybe 20% of a real product. The moment other people can use it, the rules change completely.
For personal use I had one happy path and I trusted myself. To put a writer on a public homepage, I had to stack a whole second system around the same pipeline:
- Run it by hand from the terminal
- My own API keys, my own bill
- One happy path, I know the inputs
- If it breaks, I fix it
Where it actually runs: the Cloudflare hack
Building the engine is one thing. Getting it online, running for real people, is another, and I learned it the slow way.
First I tried a normal Hetzner server. It worked, but for bursty AI work like this (scrape, call APIs, write for a minute, then go quiet) it got fiddly and pricey fast. Then I moved the whole thing to Cloudflare, and honestly that is the biggest AI hack going right now.
What I tried first: a Hetzner server. Fine at first, but the bursty workload made it slow and expensive.
Workers
Run the agents and the API at the edge. No server to babysit.
R2 storage
Hold every scraped page and finished article. Zero egress fees.
D1 database
Store the license keys, the job queue and every article job.
That trio quietly handles all the unglamorous public-tool work: a D1 database stores the license and cert for each buyer and checks it on every run, R2 holds the scraped pages and finished articles, and Workers run the agents at the edge. It is cheap, it is fast, and it does not fall over. If you are shipping anything AI-flavoured right now, this stack is the cheat code.
The homepage version: a live agent workstation
When this ran on my homepage, you did not just get a file. You watched a whole workstation of named agents working in real time, orchestrated by Atlas, with a live counter of everything they had ever produced. It was genuinely fun to watch.
Same six stages from the pipeline above, just given faces and a scoreboard. Scout, Blueprint, Quill, Lens and Signal each report what they are doing as they do it, which turns “the AI is thinking” into something you can actually follow.
Then I turned it into a Claude skill
Here is the twist. The web version needs all of that: auth, a database, a queue, scraping, storage. A Claude skill needs almost none of it.
A skill is just the routine. The same research, brief, write and humanize steps, packaged so Claude follows them every single time. No server, no infrastructure. You give it a keyword and it runs the routine right on your machine. I added a license check and put it on Gumroad.
Why skills are the real hack
Building your own skills and skill-sets for Claude is probably the biggest hack going forward. A skill locks in the exact routine you need to produce a quality output, every time. You stop re-explaining the process on every chat and start running it, like a recipe the model never forgets.
What to steal from this
If you take nothing else from how I built this, take these four. They apply to any tool you build with Claude, not just a writer.
Plan before you prompt
Map the stages and pick the APIs on paper first. The code is the easy 20%.
Real data beats memory
Write from the live SERP, not the model’s training. It’s the difference between ranking and rambling.
Chain small prompts
One focused step at a time, each feeding the next. Never one giant mega-prompt.
Package the routine
Turn a working process into a Claude skill. The routine, locked in, repeatable forever.
Get the skill
The exact routine, packaged as a Claude skill. One keyword in, a publish-ready article out, right on your own machine.