$curl -o .claude/agents/seo-cluster.md https://raw.githubusercontent.com/AgriciDaniel/claude-seo/HEAD/agents/seo-cluster.mdSemantic topic clustering analysis using SERP overlap methodology. Expands seed keywords, performs pairwise SERP comparison, classifies intent, designs hub-and-spoke content architecture, and generates internal link matrices.
| 1 | # Semantic Topic Clustering |
| 2 | |
| 3 | SERP-overlap-driven keyword clustering for content architecture. Groups keywords |
| 4 | by how Google actually ranks them (shared top-10 results), not by text similarity. |
| 5 | Designs hub-and-spoke content clusters with internal link matrices and generates |
| 6 | interactive cluster map visualizations. |
| 7 | |
| 8 | **Scripts:** Located at the plugin root `scripts/` directory. |
| 9 | |
| 10 | --- |
| 11 | |
| 12 | ## Quick Reference |
| 13 | |
| 14 | | Command | What it does | |
| 15 | |---------|-------------| |
| 16 | | `/seo cluster plan <seed-keyword>` | Full planning workflow: expand, cluster, architect, visualize | |
| 17 | | `/seo cluster plan --from strategy` | Import from existing `/seo plan` output | |
| 18 | | `/seo cluster execute` | Execute plan: create content via claude-blog or output briefs | |
| 19 | | `/seo cluster map` | Regenerate the interactive cluster visualization | |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## Planning Workflow |
| 24 | |
| 25 | ### Step 1: Seed Keyword Expansion |
| 26 | |
| 27 | Expand the seed keyword into 30-50 variants using WebSearch: |
| 28 | |
| 29 | 1. **Related searches**: Search the seed, extract "related searches" and "people also search for" |
| 30 | 2. **People Also Ask (PAA)**: Extract all PAA questions from SERP results |
| 31 | 3. **Long-tail modifiers**: Append common modifiers: "best", "how to", "vs", "for beginners", "tools", "examples", "guide", "template", "mistakes", "checklist" |
| 32 | 4. **Question mining**: Generate who/what/when/where/why/how variants |
| 33 | 5. **Intent modifiers**: Add commercial modifiers: "pricing", "review", "alternative", "comparison", "free", "top" |
| 34 | |
| 35 | **Deduplication:** Normalize variants (lowercase, strip articles), remove exact duplicates. |
| 36 | Target: 30-50 unique keyword variants. If under 30, run a second expansion pass |
| 37 | with the top PAA questions as seeds. |
| 38 | |
| 39 | ### Step 2: SERP Overlap Clustering |
| 40 | |
| 41 | This is the core differentiator. Load `references/serp-overlap-methodology.md` for |
| 42 | the full algorithm. |
| 43 | |
| 44 | **Process:** |
| 45 | 1. Group keywords by initial intent guess (reduces pairwise comparisons) |
| 46 | 2. For each candidate pair within a group, WebSearch both keywords |
| 47 | 3. Count shared URLs in the top 10 organic results (ignore ads, featured snippets, PAA) |
| 48 | 4. Apply thresholds: |
| 49 | |
| 50 | | Shared Results | Relationship | Action | |
| 51 | |---------------|-------------|--------| |
| 52 | | 7-10 | Same post | Merge into single target page | |
| 53 | | 4-6 | Same cluster | Group under same spoke cluster | |
| 54 | | 2-3 | Interlink | Place in adjacent clusters, add cross-links | |
| 55 | | 0-1 | Separate | Assign to different clusters or exclude | |
| 56 | |
| 57 | **Optimization:** With 40 keywords, full pairwise = 780 comparisons. Instead: |
| 58 | - Pre-group by intent (4 groups of ~10 = 4 x 45 = 180 comparisons) |
| 59 | - Only cross-check group boundary keywords |
| 60 | - Skip pairs where both are long-tail variants of the same head term (assume same cluster) |
| 61 | |
| 62 | **DataForSEO integration:** If DataForSEO MCP is available, use `serp_organic_live_advanced` |
| 63 | instead of WebSearch for SERP data. Run `claude-seo run dataforseo_costs.py check serp_organic_live_advanced --count N` |
| 64 | before each batch. If `"status": "needs_approval"`, show cost estimate and ask user. |
| 65 | If `"status": "blocked"`, fall back to WebSearch. |
| 66 | |
| 67 | ### Step 3: Intent Classification |
| 68 | |
| 69 | Classify each keyword into one of four intent categories: |
| 70 | |
| 71 | | Intent | Signals | Include in Clusters? | |
| 72 | |--------|---------|---------------------| |
| 73 | | Informational | how, what, why, guide, tutorial, learn | Yes | |
| 74 | | Commercial | best, top, review, comparison, vs, alternative | Yes | |
| 75 | | Transactional | buy, price, discount, coupon, order, sign up | Yes | |
| 76 | | Navigational | brand names, specific product names, login | No (exclude) | |
| 77 | |
| 78 | Remove navigational keywords from clustering. Flag borderline cases for |
| 79 | manual review. Keywords can have mixed intent (e.g., "best CRM software" is |
| 80 | both commercial and informational) -- classify by dominant intent. |
| 81 | |
| 82 | ### Step 4: Hub-and-Spoke Architecture |
| 83 | |
| 84 | Load `references/hub-spoke-architecture.md` for full specifications. |
| 85 | |
| 86 | **Design the cluster structure:** |
| 87 | |
| 88 | 1. **Select the pillar keyword**: Highest volume, broadest intent, most SERP overlap with other keywords |
| 89 | 2. **Group spokes into clusters**: Each cluster is a subtopic area (2-5 clusters per pillar) |
| 90 | 3. **Assign posts to clusters**: Each cluster gets 2-4 spoke posts |
| 91 | 4. **Select templates per post**: Based on intent classification: |
| 92 | |
| 93 | | Intent Pattern | Template Options | |
| 94 | |---------------|-----------------| |
| 95 | | In |