↓ メインコンテンツへスキップ

seo-optimizer

開発者ドキュメントや技術ブログ向けの技術 SEO および生成エンジン最適化(GEO)ガイド。検索エンジンと AI 回答エンジンの双方に最適化し、要約とメタデータの分離、JSON-LD 構造化データ検証、llms.txt の維持を行います。

注記:以下の SKILL.md プロンプト本文は、LLM の実行精度を最大化するため英語で管理されています。

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:

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
  1. 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.
  2. Inverted pyramid lead: Answer the core technical query inside the first 150 words before walking through background or edge cases.
  3. Dual metadata split (summary vs. description):
    • summary (for human readers, 80 to 180 chars): Editorial hook shown on homepage feeds, category pages, and article cards.
    • description (for search and AI snippets, 120 to 160 chars): Factual, keyword-grounded direct answer rendered in <meta name="description">, Open Graph tags, and JSON-LD description. Never duplicate summary verbatim, 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:

yaml
---
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: 40 to 60 characters, 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 1 to 2 sentence direct-answer definition immediately below primary H2 question 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.
  • Render a single H1 per page (usually via template title) and nest H2 -> H3 -> H4 sequentially without skipping levels.
  • Write 30 to 100 character descriptive alt text on every diagram and screenshot.
  • Add 2 to 4 internal links with descriptive anchor text (never “click here” or “link”), and qualify paid or user-submitted outbound links with rel="sponsored" or rel="ugc".
  • Emit valid TechArticle and BreadcrumbList JSON-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 #

⚠️ WARNING

High-frequency SEO and GEO pitfalls:

  1. Blocking Googlebot vs. Google-Extended: Disallowing a page in robots.txt hides noindex tags from Googlebot, while blocking Google-Extended opts out of Gemini training without blocking Google Search or AI Overviews (use nosnippet or data-nosnippet on <span>, <div>, or <section> to restrict snippet extraction).
  2. Identical summary and description: Reusing one string hurts either feed click-throughs or search snippet density.
  3. Generic alt or anchor text: Labels like diagram, screenshot, or [here](...) lose image search relevance and passage meaning.
  4. Artificial lastmod bumps: Updating dateModified or 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, image alt text, link anchors, slop terms, and data-nosnippet HTML rules (ignoring fenced code blocks).
    bash
    uv run scripts/audit_seo.py content/posts/my-article/index.md
    uv run scripts/audit_seo.py content/posts --json --quiet
  • scripts/generate_llmstxt.py: Generates a spec-compliant /llms.txt index (and optional /llms-full.txt bundle) from page-bundle (**/index.md) and flat (**/*.md) posts, using assets/llms_txt_template.txt conventions.
    bash
    uv 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