seo-engine
5-pillar SEO + AI-SEO content generator. Produces ./growth/03-seo/.
When to invoke
- User asks: "generate SEO content", "build programmatic SEO", "add a blog/glossary/comparison pages".
- Invoked by
/growth orchestrator as phase 3 of 3.
- Standalone via
/growth-seo.
Prerequisites
Requires:
./growth/references/icp.md — for audience-aligned keyword targeting.
./growth/references/positioning.md — for product-led content angles.
./growth/references/competitors.md — for /vs and /alternatives pages.
If any are missing, ABORT and prompt user to run /growth-market first.
Three sub-phases
Phase A: Keyword research (free signals only)
Output: ./growth/references/keywords.md
Multi-source pipeline. NO paid APIs.
Seed generation: From ICP + positioning, LLM produces ~20 seed keywords across 5 intents (informational, commercial, transactional, navigational, comparative).
Google autosuggest expansion:
WebFetch https://suggestqueries.google.com/complete/search?client=firefox&q=<seed> for each seed.
- Parse JSON response, extract suggestions.
- Also
WebFetch https://www.google.com/search?q=<seed> for the PAA box and "Related searches" section at bottom.
Reddit / Quora question mining:
WebSearch site:reddit.com "<problem space>" — surface top threads.
WebSearch site:quora.com "<problem space>".
WebFetch 2-3 top threads → extract titles + top comment questions.
Competitor teardown:
- For each competitor URL in
competitors.md:
WebFetch <competitor>/sitemap.xml if exposed.
WebFetch <competitor>/blog to extract their indexed blog titles.
WebSearch site:<competitor-domain> to discover their indexed pages.
- Map each competitor URL to inferred target keyword (from title + H1).
LLM consolidation:
- Cluster all discovered keywords into 5 buckets (one per pillar).
- Tag each with: intent, estimated_volume (low/medium/high based on autosuggest depth + PAA presence), competition (qualitative), target_persona.
- Write to
keywords.md as a structured markdown table per pillar.
Phase B: Page generation (strategy here on Opus, writing dispatched to Sonnet agents)
Output: ./growth/03-seo/pages/<pillar>/<slug>.md and .html
Page volume per --depth flag:
| Flag |
/blog |
/vs |
/alternatives |
/integrations |
/glossary |
TOTAL |
--depth lean (default for dry runs) |
3 |
2 |
2 |
2 |
5 |
14 |
--depth standard (DEFAULT) |
5 |
5 |
5 |
5 |
10 |
30 |
--depth deep |
15 |
10 |
10 |
10 |
60 |
105 |
Two-tier model split — strategy stays in this skill (parent model, typically Opus); body writing dispatches to the seo-page-writer agent (Sonnet, cost-efficient for prose).
B.1 Strategy (this skill, Opus by inheritance) — for each page across all pillars:
- Pick top-scoring keyword from the pillar bucket in
keywords.md.
- Identify target persona, search intent, target word count (per pillar).
- For
/vs and /alternatives: bind to a specific competitor from competitors.md.
- For
/glossary: extract the canonical term.
- Author an
og_image_description (model-agnostic — the agent doesn't write images, it only references this in frontmatter).
- Resolve internal-link slugs (which other pages in this run does this page link to? — anchor the linking graph globally).
- Assemble a complete page brief per
${CLAUDE_PLUGIN_ROOT}/agents/seo-page-writer.md "Your inputs" spec.
Group page briefs by pillar.
B.2 Writing (5 parallel seo-page-writer agents, Sonnet) — spawn one agent per pillar (5 total, in parallel via a single message with 5 Agent calls):
- Each agent receives all briefs for its pillar.
- Each agent reads the shared
references/ lib (same as this skill) and the plugin's seo-patterns.md + ai-seo-tactics.md + output-schemas.md.
- Each agent writes
<slug>.md + <slug>.html for every page in its pillar — applying the pillar template, embedding schema.org, injecting citation magnets, writing semantic HTML preview.
- Each agent returns a SHORT summary (pillar, pages completed, avg word count, flags).
B.3 Post-fanout review (this skill, Opus):
- Read every generated
.md frontmatter to verify schema completeness.
- Verify internal-link graph: every
internal_links[] entry actually points to a page that was generated. If a link is dangling (e.g. promised a glossary slug that didn't make it into Phase B), either regenerate that glossary entry or rewrite the source page's link.
- Verify pillar-specific structural rules held (e.g. /vs pages have a comparison table, /glossary pages have a definition-first sentence).
- If any page is structurally broken, dispatch a single follow-up Sonnet agent call to regenerate just that page.
Phase C: Site-wide artifacts + wire-up
Output: ./growth/03-seo/llms.txt, llms-full.txt, sitemap.xml, robots.txt (suggested), WIRE-UP.md.
llms.txt — index of top ~30 most important pages per ai-seo-tactics.md §1 format.
llms-full.txt — every generated page.
sitemap.xml — every generated page with priority hints per ai-seo-tactics.md §6.
robots.txt — suggested content, explicitly allows GPTBot, ClaudeBot, Perplexity-User, OAI-SearchBot, Google-Extended.
WIRE-UP.md — codebase-specific implementation plan. Steps:
- Detect framework by reading
package.json:
next → Next.js (note App Router vs Pages Router by checking dir).
astro → Astro.
@sveltejs/kit → SvelteKit.
vue + @vitejs/plugin-vue → Vue.
- Otherwise → plain HTML / static.
- Detect styling: tailwind config? CSS modules? styled-components?
- Emit framework-correct snippets for each pillar:
- Next.js App Router:
src/app/<pillar>/[slug]/page.tsx + content dir + generateStaticParams.
- Astro:
src/content/<pillar>/<slug>.md with content collection schema.
- SvelteKit:
src/routes/<pillar>/[slug]/+page.svelte + +page.server.ts.
- Idempotency markers: each generated edit includes a comment marker like
// @growth-engine:wire-up:<edit-id> so re-running detects already-applied edits.
Outputs
./growth/03-seo/
├── pages/
│ ├── blog/
│ │ ├── <slug>.md (frontmatter + body)
│ │ └── <slug>.html (rendered preview, semantic HTML)
│ ├── vs/
│ ├── alternatives/
│ ├── integrations/
│ └── glossary/
├── llms.txt
├── llms-full.txt
├── sitemap.xml
├── robots.txt
└── WIRE-UP.md
Plus update to:
./growth/references/keywords.md
Codebase auto-wire prompt
After generation, the skill returns control. The /growth orchestrator (or standalone /growth-seo) then asks:
"SEO generation complete. 30 pages at ./growth/03-seo/. Would you like to wire these into your codebase now? (yes / preview / skip)"
If yes/preview → invoke /growth-wire slash command which reads WIRE-UP.md and applies edits interactively with per-edit confirmation.
The seo-engine skill itself NEVER writes to source code. All codebase writes go through growth-wire.
Flags
--depth lean|standard|deep (default standard)
--pillars blog,vs,alternatives,integrations,glossary — comma list to restrict.
--no-llms-txt — skip llms.txt generation (rarely useful).
--lang en — content language. SEO content is currently single-language per run; for multi-lang, run the skill once per language with different output dirs (consider hreflang as future extension).
Verification
After running:
Source: sofyanjamil/growth-engine — distributed by TomeVault.
1---2name: seo-engine3description: Use when generating SEO + AI-SEO content (programmatic pages, schema.org markup, llms.txt manifests, sitemap) for the current product. Builds the full 5-pillar architecture (/blog, /vs, /alternatives, /integrations, /glossary), performs free keyword research (Google autosuggest + PAA + Reddit/Quora + competitor teardown), and produces a codebase-specific WIRE-UP.md with framework-correct edits. Optimized for both classic Google search and AI-powered search (ChatGPT, Perplexity, Claude, Gemini).4---56# seo-engine785-pillar SEO + AI-SEO content generator. Produces `./growth/03-seo/`.910## When to invoke1112- User asks: "generate SEO content", "build programmatic SEO", "add a blog/glossary/comparison pages".13- Invoked by `/growth` orchestrator as phase 3 of 3.14- Standalone via `/growth-seo`.1516## Prerequisites1718Requires:19- `./growth/references/icp.md` — for audience-aligned keyword targeting.20- `./growth/references/positioning.md` — for product-led content angles.21- `./growth/references/competitors.md` — for `/vs` and `/alternatives` pages.2223If any are missing, ABORT and prompt user to run `/growth-market` first.2425## Three sub-phases2627### Phase A: Keyword research (free signals only)2829Output: `./growth/references/keywords.md`3031Multi-source pipeline. NO paid APIs.32331. **Seed generation**: From ICP + positioning, LLM produces ~20 seed keywords across 5 intents (informational, commercial, transactional, navigational, comparative).34352. **Google autosuggest expansion**:36 - `WebFetch https://suggestqueries.google.com/complete/search?client=firefox&q=<seed>` for each seed.37 - Parse JSON response, extract suggestions.38 - Also `WebFetch https://www.google.com/search?q=<seed>` for the PAA box and "Related searches" section at bottom.39403. **Reddit / Quora question mining**:41 - `WebSearch site:reddit.com "<problem space>"` — surface top threads.42 - `WebSearch site:quora.com "<problem space>"`.43 - `WebFetch` 2-3 top threads → extract titles + top comment questions.44454. **Competitor teardown**:46 - For each competitor URL in `competitors.md`:47 - `WebFetch <competitor>/sitemap.xml` if exposed.48 - `WebFetch <competitor>/blog` to extract their indexed blog titles.49 - `WebSearch site:<competitor-domain>` to discover their indexed pages.50 - Map each competitor URL to inferred target keyword (from title + H1).51525. **LLM consolidation**:53 - Cluster all discovered keywords into 5 buckets (one per pillar).54 - Tag each with: intent, estimated_volume (low/medium/high based on autosuggest depth + PAA presence), competition (qualitative), target_persona.55 - Write to `keywords.md` as a structured markdown table per pillar.5657### Phase B: Page generation (strategy here on Opus, writing dispatched to Sonnet agents)5859Output: `./growth/03-seo/pages/<pillar>/<slug>.md` and `.html`6061Page volume per `--depth` flag:6263| Flag | /blog | /vs | /alternatives | /integrations | /glossary | TOTAL |64|---|---|---|---|---|---|---|65| `--depth lean` (default for dry runs) | 3 | 2 | 2 | 2 | 5 | 14 |66| `--depth standard` (DEFAULT) | 5 | 5 | 5 | 5 | 10 | 30 |67| `--depth deep` | 15 | 10 | 10 | 10 | 60 | 105 |6869**Two-tier model split** — strategy stays in this skill (parent model, typically Opus); body writing dispatches to the `seo-page-writer` agent (Sonnet, cost-efficient for prose).7071**B.1 Strategy (this skill, Opus by inheritance)** — for each page across all pillars:721. Pick top-scoring keyword from the pillar bucket in `keywords.md`.732. Identify target persona, search intent, target word count (per pillar).743. For `/vs` and `/alternatives`: bind to a specific competitor from `competitors.md`.754. For `/glossary`: extract the canonical term.765. Author an `og_image_description` (model-agnostic — the agent doesn't write images, it only references this in frontmatter).776. Resolve internal-link slugs (which other pages in this run does this page link to? — anchor the linking graph globally).787. Assemble a complete **page brief** per `${CLAUDE_PLUGIN_ROOT}/agents/seo-page-writer.md` "Your inputs" spec.7980Group page briefs by pillar.8182**B.2 Writing (5 parallel `seo-page-writer` agents, Sonnet)** — spawn one agent per pillar (5 total, in parallel via a single message with 5 Agent calls):83- Each agent receives all briefs for its pillar.84- Each agent reads the shared `references/` lib (same as this skill) and the plugin's `seo-patterns.md` + `ai-seo-tactics.md` + `output-schemas.md`.85- Each agent writes `<slug>.md` + `<slug>.html` for every page in its pillar — applying the pillar template, embedding schema.org, injecting citation magnets, writing semantic HTML preview.86- Each agent returns a SHORT summary (pillar, pages completed, avg word count, flags).8788**B.3 Post-fanout review (this skill, Opus)**:891. Read every generated `.md` frontmatter to verify schema completeness.902. Verify internal-link graph: every `internal_links[]` entry actually points to a page that was generated. If a link is dangling (e.g. promised a glossary slug that didn't make it into Phase B), either regenerate that glossary entry or rewrite the source page's link.913. Verify pillar-specific structural rules held (e.g. /vs pages have a comparison table, /glossary pages have a definition-first sentence).924. If any page is structurally broken, dispatch a single follow-up Sonnet agent call to regenerate just that page.9394### Phase C: Site-wide artifacts + wire-up9596Output: `./growth/03-seo/llms.txt`, `llms-full.txt`, `sitemap.xml`, `robots.txt` (suggested), `WIRE-UP.md`.97981. **llms.txt** — index of top ~30 most important pages per `ai-seo-tactics.md` §1 format.992. **llms-full.txt** — every generated page.1003. **sitemap.xml** — every generated page with priority hints per `ai-seo-tactics.md` §6.1014. **robots.txt** — suggested content, explicitly allows `GPTBot`, `ClaudeBot`, `Perplexity-User`, `OAI-SearchBot`, `Google-Extended`.1021035. **WIRE-UP.md** — codebase-specific implementation plan. Steps:104 - **Detect framework** by reading `package.json`:105 - `next` → Next.js (note App Router vs Pages Router by checking dir).106 - `astro` → Astro.107 - `@sveltejs/kit` → SvelteKit.108 - `vue` + `@vitejs/plugin-vue` → Vue.109 - Otherwise → plain HTML / static.110 - **Detect styling**: tailwind config? CSS modules? styled-components?111 - **Emit framework-correct snippets** for each pillar:112 - Next.js App Router: `src/app/<pillar>/[slug]/page.tsx` + content dir + `generateStaticParams`.113 - Astro: `src/content/<pillar>/<slug>.md` with content collection schema.114 - SvelteKit: `src/routes/<pillar>/[slug]/+page.svelte` + `+page.server.ts`.115 - **Idempotency markers**: each generated edit includes a comment marker like `// @growth-engine:wire-up:<edit-id>` so re-running detects already-applied edits.116117## Outputs118119```120./growth/03-seo/121├── pages/122│ ├── blog/123│ │ ├── <slug>.md (frontmatter + body)124│ │ └── <slug>.html (rendered preview, semantic HTML)125│ ├── vs/126│ ├── alternatives/127│ ├── integrations/128│ └── glossary/129├── llms.txt130├── llms-full.txt131├── sitemap.xml132├── robots.txt133└── WIRE-UP.md134```135136Plus update to:137- `./growth/references/keywords.md`138139## Codebase auto-wire prompt140141After generation, the skill returns control. The `/growth` orchestrator (or standalone `/growth-seo`) then asks:142143> "SEO generation complete. 30 pages at `./growth/03-seo/`. Would you like to wire these into your codebase now? (yes / preview / skip)"144145If yes/preview → invoke `/growth-wire` slash command which reads `WIRE-UP.md` and applies edits interactively with per-edit confirmation.146147The `seo-engine` skill itself NEVER writes to source code. All codebase writes go through `growth-wire`.148149## Flags150151- `--depth lean|standard|deep` (default `standard`)152- `--pillars blog,vs,alternatives,integrations,glossary` — comma list to restrict.153- `--no-llms-txt` — skip llms.txt generation (rarely useful).154- `--lang en` — content language. SEO content is currently single-language per run; for multi-lang, run the skill once per language with different output dirs (consider hreflang as future extension).155156## Verification157158After running:159- [ ] All requested pages exist as `.md` + `.html` pairs.160- [ ] Every `.md` frontmatter validates against `output-schemas.md` §4.161- [ ] Every page has at least 1 schema.org block + 1 citation magnet + 3 internal links.162- [ ] `llms.txt` and `sitemap.xml` reference every generated page.163- [ ] `WIRE-UP.md` correctly identifies the detected framework.164- [ ] Spot-check 1 page per pillar: H1 is entity-first, FAQ block has 4+ entity-rich Q&As, internal links resolve to other generated pages.165166---167> Source: [sofyanjamil/growth-engine](https://github.com/sofyanjamil/growth-engine) — distributed by [TomeVault](https://tomevault.io).168<!-- tomevault:4.0:skill_md:2026-06-16 -->