u/HeatPrevious1395

Case study: a 7-step content pipeline as a chain of Claude Code slash commands (with the prompts open-sourced)

Case study: a 7-step content pipeline as a chain of Claude Code slash commands (with the prompts open-sourced)

Sharing the prompt-engineering side of an internal pipeline I just open-sourced. The whole system is 7 Claude Code slash commands chained together, each with a strict role + output contract:

- /seo-research → Perplexity Deep Research API; structured output into 7 sections (Market Context, Stats with source URLs, Competitor analysis, Quotes, Unique angles, Internal links, Raw output)

- /seo-brief → reads research, produces a brief with search intent, SEO metadata, content outline, required data points, internal link map, differentiation notes

- /seo-write → reads brief + research; outputs markdown with frontmatter, intro/H2s/conclusion/FAQ/internal-links sections; enforces voice from a YAML config

- /seo-optimize → 10-check SEO score (0-100), with specific fix suggestions

- /seo-publish → builds CMS payload, hard human gate, ships to Sanity via direct HTTP

- /seo-status, /seo-daily → orchestration

What I'd flag prompt-design-wise:

- Each command reads ./pipeline.yaml for state. Stateless re-entry across sessions because all state is in files.

- Brand voice + tone + content pillars live in one YAML (config/seo-settings.yaml). Every prompt references it instead of hardcoding the brand.

- Human gates are non-negotiable in 4 of 7 steps. Trying to remove them produces visibly worse content.

- The "real examples enforced, no hypotheticals" line in the /seo-write prompt is the single highest-impact instruction in the whole pipeline.

Repo: https://github.com/viren040/content-seo-orchestrator (MIT) — all the commands are in .claude/commands/.

Curious what prompt patterns others are using for multi-step content/marketing pipelines.

u/HeatPrevious1395 — 2 days ago

Stop running SEO and AEO with the same playbook. Open-sourced the pipeline I built that treats them differently.

The "rank" mental model is broken for AEO. There's a great recent r/b2bmarketing post arguing the word "rank" has no place in AEO only 16% of B2B AI queries trigger retrieval, and citation order doesn't equal preference. Agree with all of it.

What that argument left open: if you're not optimizing for rank, what are you optimizing for? My take after running content for ~12 months: SEO optimizes for the click. AEO optimizes for inclusion in the answer. Different game, different brief, different proof.

The pipeline I built (and just open-sourced) treats them as separate but interlocking jobs:

SEO half — 10-check scorecard (keyword placement, density, meta, headings, content length, internal links, readability, real-example density). Standard stuff but scored consistently.

AEO half — different brief template that forces: FAQ-shaped sub-headings (so the post can be pulled as an answer), explicit query format in H2s, named-entity density (real customer names, real numbers), source-attribution on every stat, schema type override (HowTo / FAQPage when the post is question-shaped).

Both run as separate /seo- commands chained in a Claude Code pipeline. 15-20 min/day per post.

Result on one brand (12 months, full GSC data in the repo): 131 → 964 avg impressions/day (7.3×). 18× monthly impressions. 51.8% of total site impressions from the pipeline-produced content.

Honest caveat: clicks did NOT keep pace with impressions. That's the next gap — title/meta optimization for CTR, which is a separate /seo-refresh command on the roadmap.

Repo: https://github.com/viren040/content-seo-orchestrator (MIT, fork it). Genuinely curious how others are scoring AEO-shape — most "AEO checklists" I've seen are just SEO checklists with the word swapped.

u/HeatPrevious1395 — 2 days ago
▲ 3 r/GEO_optimization+1 crossposts

I open-sourced the content SEO pipeline I run entirely in Claude Code — 15 min/day, $0.45/post, real numbers inside

https://preview.redd.it/n0eypvqm032h1.png?width=2266&format=png&auto=webp&s=e7c83a8df3127463e71d37ae22dbeda9538453d3

I've been running a content SEO/AEO operation through Claude Code for about a year and finally cleaned up the slash commands into something forkable. Sharing because the Claude Code crowd is the right audience for this pattern.

The pipeline is 7 slash commands chained together. Each command is a markdown file in .claude/commands/ with a strict role + output contract — Claude reads pipeline.yaml for state, runs one step, pauses at a human gate, and updates the state file. Stateless re-entry, so I can stop mid-post and pick up next day with /seo-daily.

The flow: /seo-research (Perplexity Deep Research API, ~$0.45/post) → /seo-brief → /seo-write → /seo-optimize (10-check scorecard) → /seo-publish (Sanity HTTP API → IndexNow ping). 4 human gates so I keep judgment over angle, brief, copy, and publish decision.

One brand I run this for: 131 → 964 avg impressions/day in 12 months (7.3×). Monthly impressions 2,142 → 39,240 (18×). Blog content from this pipeline drove 51.8% of all GSC impressions across 119 posts. Honest caveat — clicks didn't grow proportionally because titles/meta weren't tuned for CTR yet; that's the next iteration (/seo-refresh command in roadmap).

Technical things I'd flag for anyone considering similar:

- Sanity MCP's create_documents_from_json overwrites your custom _id with a UUID, breaking deterministic frontends. The publisher uses Sanity's direct HTTP mutation endpoint instead. Documented in the repo.

- Brand voice lives in one YAML (config/seo-settings.yaml). The commands read it; no hardcoded brand anywhere. Fork → swap one file → you're running your brand.

- Pluggable CMS — Sanity is the reference impl but swapping to WordPress/Contentful/Webflow is one file edit.

Repo: https://github.com/viren040/content-seo-orchestrator (MIT)

Genuinely curious what other patterns Claude Code users are running for content/marketing ops. The slash-command-as-pipeline pattern feels under-explored.

reddit.com
u/HeatPrevious1395 — 2 days ago