How to build a blog publishing pipeline with Claude Code
How to build a blog publishing pipeline with Claude Code

A publishing pipeline is the fixed route a blog post takes from draft to live page: one place where drafts live, a script that checks them, a build that turns them into pages, a preview a person approves, and a deploy. Claude Code is good at building and running that route. It writes the validation script, converts drafts into your site's templates, fixes what the checks flag, and reports what changed. A person still edits for facts and voice, and approves what goes live.
The point of a pipeline is repeatability. Publishing one post by chatting with Claude Code is fine. Publishing fifty that way gives you fifty slightly different results. On eseospace.com, more than 300 articles have gone live through a scripted pipeline built with Claude Code, and the lessons below come from running it.
Key Takeaways
- Pick one source of truth for post content. Generated pages are output: edit them by hand and the next build can wipe your change.
- Write the house rules (allowed tags, title and description lengths, approved internal links) into files, then have Claude Code write a validator that enforces them on every draft.
- Google says AI-generated content must be fact-checked and reviewed before publishing, and that this "also applies to metadata like <title> elements, meta description elements, structured data, and alternate texts for images".
- Check the second and third pages a build produces, not only the first. A template bug can copy one post's text into another.
- A person approves every deploy. In auto mode, Claude Code can push to the default branch by default, so add an ask rule for git push if pushing deploys your site.
- After a deploy, check the build output and git log before trusting what the live page shows. A stale CDN copy can make a finished change look missing.
The pipeline at a glance
| Stage | Claude Code does | A person does | The check |
|---|---|---|---|
| Draft | Formats the draft, adds metadata fields | Writes or edits the substance | The file is in the drafts folder, in the agreed format |
| Validate | Runs the validator, fixes format errors | Decides on any rule exceptions | Zero validator errors |
| Editorial review | Lists every claim, number and source in the draft | Fact-checks, approves claims and voice | A named reviewer signs off |
| Build and preview | Builds pages, posts a preview link | Reads the preview on desktop and mobile | Several built pages checked, not just one |
| Publish | Commits on a branch, opens a pull request | Approves the merge and deploy | Deploy log shows the expected commit |
| After launch | Checks status codes, sitemap, links to the post | Spot-checks the live page | Live page matches the build output |
Step 1: choose one source of truth
Decide where post content lives before you write a single script: Markdown or text files in the repository, a headless CMS, or WordPress itself. Everything else is generated from that source.
This matters more than it sounds. On eseospace.com, a publishing step once regenerated every post from its source files and deleted edits that had been made only in the built copy. The lesson we kept: make edits in the source of truth, not in the generated output. Write that rule into your project's CLAUDE.md so every session knows it. Our guide to writing a CLAUDE.md for a website shows how to phrase rules like this.
Example CLAUDE.md lines:
Post content lives in posts/. Never edit files in dist/.
Run npm run validate before every commit.
Internal links must come from links.md.
Step 2: write the house rules down
A validator can only enforce rules that exist in writing. Put them in a short file in the repository:
- The draft format: which fields are required (title, meta title, meta description, slug, date, author).
- Length targets for titles and descriptions. Google says there is no length limit on either, but both are truncated in results "as needed", so a target is a house choice, not a Google rule.
- The HTML tags a post may use, and any banned patterns (inline styles, scripts).
- The approved list of internal links, so drafts don't link to pages that don't exist.
- Byline rules. Google's guidance says "Giving AI an author byline is probably not the best way to follow our recommendation", so name the person accountable for the post.
Step 3: have Claude Code write the validator
Example prompt: Read rules.md. Write a script, validate, that checks every file in posts/drafts against those rules and prints one line per problem with the file name. Exit with an error if anything fails. Run it on the current drafts and show me the output. Don't fix the drafts yet.
Reading the first report before letting Claude Code fix anything tells you whether the rules are right. If half the drafts fail on a rule nobody cares about, change the rule.
Then make the check automatic. You can package the routine as a skill that you run with a command, or add a hook that runs the validator whenever Claude finishes a turn. Our explainers on Claude Code skills and hooks for website projects cover both. Anthropic describes hooks as deterministic, while CLAUDE.md instructions are advisory, so a hook is the better fit for a rule that must hold every time.
Check: introduce one deliberate error in a test draft and confirm the validator catches it.
Step 4: the editorial review only a person can do
A validator checks format. It can't tell whether a claim is true. Google's guidance on AI content is direct: "It is critical to manually factcheck and review all AI-generated content for accuracy and trustworthiness before publishing." It explains why: "generative models don't retrieve facts, but predict a likely sequence of words based on their training data."
Claude Code can make the review faster without replacing it.
Example prompt: List every factual claim, number, date, price, law and product name in this draft, each with the sentence it appears in and the source cited, if any. Flag claims with no source.
A person reviews: each flagged claim against a primary source, the post's advice for your business and readers, and the voice. For regulated topics such as health, legal or financial advice, the reviewer should be someone qualified to sign off. Our article on AI-generated versus human-edited content covers the editorial side in more depth, and teams writing at volume will find more in Claude Code for content teams.
Volume deserves a caution of its own. Google's spam policies say "using generative AI tools or other similar tools to generate many pages without adding value for users" may be scaled content abuse. A pipeline makes publishing cheap, and that's exactly why every post needs a reason to exist.
Step 5: build, preview and check more than one page
Have Claude Code build the posts into your templates and serve or deploy a preview, never the live site. Then check several outputs. On our own rebuild, a script replaced the wrong container, so new posts carried the template post's text. The first post looked fine. Check the second and third posts a build produces, and one with tables or unusual characters.
Example prompt: Build the three new posts to the preview. For each one, report the title tag, meta description, H1, word count, number of internal links, and the first sentence of the body. Flag any two posts that share a sentence.
Check: each built page shows its own content, and the metadata matches the draft. Our QA routine for every deploy covers the wider checks: links, structured data and a real-browser look.
Step 6: publish through git, with a person approving
Have Claude Code commit the posts on a branch and open a pull request. The person who approved the content approves the merge, and the merge triggers the deploy. That gives you a record of what went live, when, and who approved it, and an easy way to revert.
Be careful with automatic pushes. Anthropic's auto mode docs say it "allows pushes to any branch of the repository you're working in, including the default branch". If a push to your main branch deploys the site, add an ask rule so Claude Code always stops and asks first. The documented syntax, in .claude/settings.json:
{ "permissions": { "ask": ["Bash(git push *)"] } }
The docs add a caveat: the rule matches commands that begin with git push, so a push written another way, such as git -C <dir> push, isn't caught. For a firmer gate, the docs point to a PreToolUse hook, and branch protection on your Git host adds another layer.
Before any deploy, check git history for changes you didn't make. On eseospace.com, one session once regenerated pages that another session had just edited, and the edits disappeared. Our list of common Claude Code mistakes on websites describes that failure and others.
Step 7: check after launch
- Each new URL returns a 200 status, with the right title and canonical.
- The post appears in the sitemap. Google uses a sitemap's lastmod value only "if it's consistently and verifiably" accurate, so set it from real changes, not from every build.
- The hub or category page links to the new post, and the post's internal links resolve.
- The live page matches the build output. If it doesn't, check the build output and git log before redoing work. On our site, a CDN once served a stale copy after a deploy, which made a finished change look missing.
Don't change publish dates to make old posts look fresh. Google's helpful-content guidance asks site owners whether they are "changing the date of pages to make them seem fresh when the content has not substantially changed".
Updating posts after they're live
Treat updates exactly like new posts: edit the source, validate, review, build, preview, publish. If a fact changes across many posts, such as a price or a phone number, run it as one site-wide change with its own checks rather than as dozens of separate edits.
Conclusion
A Claude Code publishing pipeline gives you one source of truth, a validator that enforces your rules, a preview, and a deploy a person approves. Claude Code builds and runs the machinery. People own the facts, the claims and the decision to publish. If you'd like help setting up a pipeline for your site, see our Claude Code development services. More guides are in our Claude Code Guide.
Frequently asked questions
Does this work with WordPress?
Yes, with WordPress as the destination. The WordPress REST API accepts a post status, including draft, so a pipeline can create posts as drafts for an editor to review and publish in the WordPress admin. Keep credentials in environment variables, never in prompts or committed files.
Can Claude Code write the posts too?
It can draft them, but a person should own the substance and check every fact before publishing, as Google's guidance requires for AI-generated content. Many teams use Claude Code for formatting, metadata, internal links and checks, and keep the writing and fact-checking human.
Should Claude Code be able to deploy on its own?
No. Let it build, validate and open a pull request. A person reviews the preview and approves the merge. Anthropic's auto mode blocks production deploys by default, but a push that triggers a deploy can still go through unless you add an ask or deny rule.
How do I stop two people's sessions from overwriting each other?
Work on branches, pull before you start, and check git log for changes you didn't make before any deploy. Avoid running two sessions that regenerate the same pages at the same time.
Do I need a headless CMS for this?
No. Plain files in a git repository are the simplest source of truth. A headless CMS helps when non-technical editors need a visual editor, at the cost of another system to connect and secure.
Put this into action with eSEOspace
We help businesses grow with seo, geo & aeo that actually performs. Explore the services behind this guide:
Get a FREE Audit
We'll perform a comprehensive SEO, AEO, GEO & CRO audit of your website — completely free — and show you exactly how to outrank your competitors.
Don't have a site yet? Get in touch →
Get a FREE GEO/AEO/SEO Audit
We'll analyze your site's SEO, GEO, AEO & CRO — completely free — and show you exactly how to get found across Google and AI answers.
Don't have a site yet? Get in touch →
Great — your audit is on the way!
We'll send your free SEO/GEO/AEO/CRO audit within the next few hours. Where should we send it?
You're all set! ✓
Your free audit is being prepared — check your inbox in the next few hours. Talk soon!
On this page
- Key Takeaways
- The pipeline at a glance
- Step 1: choose one source of truth
- Step 2: write the house rules down
- Step 3: have Claude Code write the validator
- Step 4: the editorial review only a person can do
- Step 5: build, preview and check more than one page
- Step 6: publish through git, with a person approving
- Step 7: check after launch
- Updating posts after they're live
- Conclusion
- Frequently asked questions





