SEO and generative engine optimizer #
Optimize developer documentation, static sites, and engineering blogs for classic web search and AI grounding engines (Google AI Overviews, ChatGPT Search, Perplexity, Claude), anchored in Google Search Central specifications.
1. Reference routing and operating modes #
Load only the reference guides needed for the active task:
- Google Search GenAI rules: Read references/google_search_genai_guidelines.md for
AI Overviews, RAG grounding, query fan-out, non-commodity content, andIPTCAI image metadata. - Meta tags and
robotsdirectives: Read references/meta_tags_and_robots_spec.md for supported<meta>tags,nosnippet,max-snippet,max-image-preview:large,data-nosnippet, andX-Robots-Tagheaders. - AI search, crawlers, and
llms.txt: Read references/geo_and_ai_search.md for the AI crawlerrobots.txtmatrix (Google-Extended,OAI-SearchBot,GPTBot,ClaudeBot,PerplexityBot), direct-answer blocks,/llms.txt, and/llms-full.txt. - Multilingual and
hreflangSEO: Read references/multilingual_international_seo.md for reciprocalhreflangclusters, ISO locale codes, and avoiding IP auto-redirects. - Technical SEO checklist: Read references/technical_seo_checklist.md for
<head>hygiene, heading order, linkrelattributes (sponsored,ugc,nofollow), and Core Web Vitals. - Frontmatter and taxonomy: Read references/frontmatter_standards.md for splitting
summaryfromdescriptionand formattingkebab-casetags. - Schema.org JSON-LD: Read references/schema_markup_guide.md for
TechArticle,SoftwareApplication,WebSite,ProfilePage, andBreadcrumbListgraphs. - Migrations and HTTP status codes: Read references/site_migrations_and_status_codes.md for
301vs.410handling, soft-404fixes, domain moves, and crawl budget. - SERP features and Discover: Read references/search_appearance_and_serp_features.md for site names,
48pxsite icons, featured snippets, date parity, and Google Discover hero images. - Evergreen content refreshes: Read references/content_refresh_guide.md for diagnosing impression decay with weighted Search Console SQL and fixing query cannibalization.
Operating rule: zero silent edits #
When auditing an existing Markdown post, frontmatter block, or HTML template, never overwrite files on disk silently. Run uv run scripts/audit_seo.py, present the findings and proposed metadata or structural edits (using assets/seo_audit_template.md when helpful), and wait for explicit user approval before modifying files.
2. Core SEO and GEO principles #
flowchart LR
A["Technical article or doc"] --> B["Classic search index"]
A --> C["AI grounding and agents"]
B --> D["SERP title, meta snippet, rich results"]
C --> E["Passage grounding, citations, llms.txt"]
D --> F["Qualified developer traffic"]
E --> F- Information gain over commodity summaries: Search rankings and AI citations reward original benchmarks, real post-mortems, runnable code, and architecture diagrams. Generic summaries get filtered out.
- Inverted pyramid lead: Answer the core technical query inside the first
150words before walking through background or edge cases. - Dual metadata split (
summaryvs.description):summary(for human readers,80to180chars): Editorial hook shown on homepage feeds, category pages, and article cards.description(for search and AI snippets,120to160chars): Factual, keyword-grounded direct answer rendered in<meta name="description">, Open Graph tags, and JSON-LDdescription. Never duplicatesummaryverbatim, and skip<meta name="keywords">(ignored by Google).
3. Five-stage optimization workflow #
Stage 1: Search intent and query grounding #
Identify whether the target query is informational (concept explanation), procedural (step-by-step build), or diagnostic (error fix), and verify the page answers that exact query directly.
Stage 2: Frontmatter and taxonomy split #
Craft distinct title, summary, and description fields with clean taxonomy:
---
title: "Building an MCP Server in Go with Gemini 4"
summary: "Turn any Go CLI into a typed tool server for AI agents in 50 lines of code."
description: "Step-by-step guide to building a Model Context Protocol (MCP) server in Go. Covers JSON-RPC handlers, schema validation, and stdio transport."
categories: ["Software Engineering"]
tags: ["apis", "golang", "mcp", "tutorial"]
---- Title:
40to60characters, front-loading the primary technical entity. - Tags: Sorted alphabetically, lowercase
kebab-case, with one primary category and zero category duplication.
Stage 3: Quotable structure #
- Place a
1to2sentence direct-answer definition immediately below primaryH2question headings. - Use Markdown tables for feature or benchmark comparisons and fenced code blocks with language identifiers.
- Break sentences cleanly without mid-sentence em dashes or en dashes.
Stage 4: Technical HTML, links, and JSON-LD #
- Render a single
H1per page (usually via template title) and nestH2->H3->H4sequentially without skipping levels. - Write
30to100character descriptivealttext on every diagram and screenshot. - Add
2to4internal links with descriptive anchor text (never “click here” or “link”), and qualify paid or user-submitted outbound links withrel="sponsored"orrel="ugc". - Emit valid
TechArticleandBreadcrumbListJSON-LD matching visible page dates and authorship.
Stage 5: Automated validation #
Run the bundled scripts below and resolve every reported ERROR or WARNING before release.
4. Validation rules and pitfalls #
High-frequency SEO and GEO pitfalls:
- Blocking
Googlebotvs.Google-Extended: Disallowing a page inrobots.txthidesnoindextags fromGooglebot, while blockingGoogle-Extendedopts out of Gemini training without blocking Google Search orAI Overviews(usenosnippetordata-nosnippeton<span>,<div>, or<section>to restrict snippet extraction). - Identical
summaryanddescription: Reusing one string hurts either feed click-throughs or search snippet density. - Generic
altor anchor text: Labels likediagram,screenshot, or[here](...)lose image search relevance and passage meaning. - Artificial
lastmodbumps: UpdatingdateModifiedor sitemap<lastmod>without substantive content edits causes Google to ignore freshness signals.
Available scripts #
Run companion tools with uv run (zero external Python dependencies required):
scripts/audit_seo.py: Audits a Markdown file or directory for title/description/summary lengths, taxonomy sorting, heading hierarchy, imagealttext, link anchors, slop terms, anddata-nosnippetHTML rules (ignoring fenced code blocks).bashuv run scripts/audit_seo.py content/posts/my-article/index.md uv run scripts/audit_seo.py content/posts --json --quietscripts/generate_llmstxt.py: Generates a spec-compliant/llms.txtindex (and optional/llms-full.txtbundle) from page-bundle (**/index.md) and flat (**/*.md) posts, using assets/llms_txt_template.txt conventions.bashuv run scripts/generate_llmstxt.py --content-dir content/posts --base-url https://example.com --output static/llms.txt uv run scripts/generate_llmstxt.py --content-dir content/docs --url-prefix docs --base-url https://example.com --output static/llms.txt --llms-full static/llms-full.txt
