
Seo Cluster
- 3.4k installs
- 12.5k repo stars
- Updated July 27, 2026
- agricidaniel/claude-seo
seo-cluster is an agent skill that >.
About
SERP overlap driven keyword clustering for content architecture Groups keywords by how Google actually ranks them shared top 10 results not by text similarity Designs hub and spoke content clusters with internal link matrices and generates interactive cluster map visualizations Scripts Located at the plugin root scripts directory Command What it does seo cluster plan seed keyword Full planning workflow expand cluster architect visualize seo cluster plan from strategy Import from existing seo plan output seo cluster execute Execute plan create content via claude blog or output briefs seo cluster map Regenerate the interactive cluster visualization Expand the seed keyword into 30 50 variants using WebSearch 1 Related searches Search the seed extract related searches and people also search for 2 People Also Ask PAA Extract all PAA questions from SERP results 3 Long tail modifiers Append common modifiers best how to vs for beginners tools examples guide template mistakes checklist 4 Question mining Generate who what when where why how variants 5 Intent modifiers Add commercial modifiers pricing review
- SERP-based semantic topic clustering for content architecture planning. Groups
- keywords by actual Google SERP overlap (not text similarity), designs hub-and-spoke
- content clusters with internal link matrices, and generates interactive
- Follow seo-cluster SKILL.md steps and documented constraints.
- Follow seo-cluster SKILL.md steps and documented constraints.
Seo Cluster by the numbers
- 3,414 all-time installs (skills.sh)
- +593 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #215 of 16,659 AI & Agent Building skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
seo-cluster capabilities & compatibility
- Capabilities
- serp based semantic topic clustering for content · keywords by actual google serp overlap (not text · content clusters with internal link matrices, an · follow seo cluster skill.md steps and documented
- Use cases
- orchestration
What seo-cluster says it does
SERP-based semantic topic clustering for content architecture planning. Groups
keywords by actual Google SERP overlap (not text similarity), designs hub-and-spoke
content clusters with internal link matrices, and generates interactive
npx skills add https://github.com/agricidaniel/claude-seo --skill seo-clusterAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3.4k |
|---|---|
| repo stars | ★ 12.5k |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | agricidaniel/claude-seo ↗ |
When should an agent use seo-cluster and what problem does it solve?
>
Who is it for?
Developers invoking seo-cluster as documented in the skill source.
Skip if: Skip when requirements fall outside seo-cluster documented scope.
When should I use this skill?
>
What you get
Outputs aligned with the seo-cluster SKILL.md workflow and stated deliverables.
- Published pillar and spoke posts
- Updated internal links
- Quality score report
By the numbers
- Uses a 4-step priority algorithm: pillar first, then spokes by search volume, cluster index, and post index
Files
Semantic Topic Clustering (v1.9.0)
SERP-overlap-driven keyword clustering for content architecture. Groups keywords by how Google actually ranks them (shared top-10 results), not by text similarity. Designs hub-and-spoke content clusters with internal link matrices and generates interactive cluster map visualizations.
Scripts: Located at the plugin root scripts/ directory.
---
Quick Reference
| Command | What it does |
|---|---|
/seo cluster plan <seed-keyword> | Full planning workflow: expand, cluster, architect, visualize |
/seo cluster plan --from strategy | Import from existing /seo plan output |
/seo cluster execute | Execute plan: create content via claude-blog or output briefs |
/seo cluster map | Regenerate the interactive cluster visualization |
---
Planning Workflow
Step 1: Seed Keyword Expansion
Expand the seed keyword into 30-50 variants using WebSearch:
1. Related searches — Search the seed, extract "related searches" and "people also search for" 2. People Also Ask (PAA) — Extract all PAA questions from SERP results 3. Long-tail modifiers — Append common modifiers: "best", "how to", "vs", "for beginners", "tools", "examples", "guide", "template", "mistakes", "checklist" 4. Question mining — Generate who/what/when/where/why/how variants 5. Intent modifiers — Add commercial modifiers: "pricing", "review", "alternative", "comparison", "free", "top"
Deduplication: Normalize variants (lowercase, strip articles), remove exact duplicates. Target: 30-50 unique keyword variants. If under 30, run a second expansion pass with the top PAA questions as seeds.
Step 2: SERP Overlap Clustering
This is the core differentiator. Load references/serp-overlap-methodology.md for the full algorithm.
Process: 1. Group keywords by initial intent guess (reduces pairwise comparisons) 2. For each candidate pair within a group, WebSearch both keywords 3. Count shared URLs in the top 10 organic results (ignore ads, featured snippets, PAA) 4. Apply thresholds:
| Shared Results | Relationship | Action |
|---|---|---|
| 7-10 | Same post | Merge into single target page |
| 4-6 | Same cluster | Group under same spoke cluster |
| 2-3 | Interlink | Place in adjacent clusters, add cross-links |
| 0-1 | Separate | Assign to different clusters or exclude |
Optimization: With 40 keywords, full pairwise = 780 comparisons. Instead:
- Pre-group by intent (4 groups of ~10 = 4 x 45 = 180 comparisons)
- Only cross-check group boundary keywords
- Skip pairs where both are long-tail variants of the same head term (assume same cluster)
DataForSEO integration: If DataForSEO MCP is available, use serp_organic_live_advanced instead of WebSearch for SERP data. Run python3 scripts/dataforseo_costs.py check serp_organic_live_advanced --count N before each batch. If "status": "needs_approval", show cost estimate and ask user. If "status": "blocked", fall back to WebSearch.
Step 3: Intent Classification
Classify each keyword into one of four intent categories:
| Intent | Signals | Include in Clusters? |
|---|---|---|
| Informational | how, what, why, guide, tutorial, learn | Yes |
| Commercial | best, top, review, comparison, vs, alternative | Yes |
| Transactional | buy, price, discount, coupon, order, sign up | Yes |
| Navigational | brand names, specific product names, login | No (exclude) |
Remove navigational keywords from clustering. Flag borderline cases for manual review. Keywords can have mixed intent (e.g., "best CRM software" is both commercial and informational) -- classify by dominant intent.
Step 4: Hub-and-Spoke Architecture
Load references/hub-spoke-architecture.md for full specifications.
Design the cluster structure:
1. Select the pillar keyword — Highest volume, broadest intent, most SERP overlap with other keywords 2. Group spokes into clusters — Each cluster is a subtopic area (2-5 clusters per pillar) 3. Assign posts to clusters — Each cluster gets 2-4 spoke posts 4. Select templates per post — Based on intent classification:
| Intent Pattern | Template Options |
|---|---|
| Informational (broad) | ultimate-guide |
| Informational (how) | how-to |
| Informational (list) | listicle |
| Informational (concept) | explainer |
| Commercial (compare) | comparison |
| Commercial (evaluate) | review |
| Commercial (rank) | best-of |
| Transactional | landing-page |
5. Set word count targets:
- Pillar page: 2500-4000 words
- Spoke posts: 1200-1800 words
6. Cannibalization check — No two posts share the same primary keyword. If SERP overlap is 7+, merge those keywords into a single post targeting both.
Step 5: Internal Link Matrix
Design the bidirectional linking structure:
| Link Type | Direction | Requirement |
|---|---|---|
| Spoke to pillar | spoke -> pillar | Mandatory (every spoke) |
| Pillar to spoke | pillar -> spoke | Mandatory (every spoke) |
| Spoke to spoke (within cluster) | spoke <-> spoke | 2-3 links per post |
| Cross-cluster | spoke -> spoke (other cluster) | 0-1 links per post |
Rules:
- Every post must have minimum 3 incoming internal links
- No orphan pages (every post reachable from pillar in 2 clicks)
- Anchor text must use target keyword or close variant (no "click here")
- Link placement: within body content, not just navigation/sidebar
Generate the link matrix as a JSON adjacency list:
{
"links": [
{ "from": "pillar", "to": "cluster-0-post-0", "type": "mandatory", "anchor": "keyword" },
{ "from": "cluster-0-post-0", "to": "pillar", "type": "mandatory", "anchor": "keyword" }
]
}Step 6: Interactive Cluster Map
Generate cluster-map.html using the template at templates/cluster-map.html.
1. Read the template file 2. Build the CLUSTER_DATA JSON object from the cluster plan:
{
pillar: { title, keyword, volume, template, wordCount, url },
clusters: [{ name, color, posts: [{ title, keyword, volume, template, wordCount, url, status }] }],
links: [{ from, to, type }],
meta: { totalPosts, totalClusters, totalLinks, estimatedWords }
}3. Replace the CLUSTER_DATA placeholder in the template with the actual JSON 4. Write the completed HTML file to the output directory 5. Inform user: "Open cluster-map.html in a browser to explore the interactive cluster map."
---
Strategy Import
When invoked with --from strategy:
1. Look for the most recent /seo plan output in the current directory (search for files matching *SEO*Plan*, *strategy*, *content-strategy*) 2. Parse markdown tables for: keywords, page types, content pillars, URL structures 3. Validate extracted data: check for duplicates, missing keywords, incomplete entries 4. Enrich with SERP data: run SERP overlap analysis on extracted keywords 5. Build cluster plan using the imported keywords as the starting set (skip Step 1)
If no strategy file is found, prompt the user: "No existing SEO plan found in the current directory. Run /seo plan first, or provide a seed keyword for fresh clustering."
---
Execution Workflow
When /seo cluster execute is invoked:
Check for claude-blog
Test: Does ~/.claude/skills/blog/SKILL.md exist?If claude-blog IS installed:
1. Load references/execution-workflow.md for the full algorithm 2. Read cluster-plan.json from the current directory 3. Check for resume state: scan output directory for already-written posts 4. Execute in priority order: pillar first, then spokes by volume (highest first) 5. For each post, invoke the blog-write skill with cluster context:
- Cluster role (pillar or spoke)
- Position in cluster (cluster index, post index)
- Target keyword and secondary keywords
- Template type and word count target
- Internal links to include (with anchors)
- Links to receive from future posts (placeholder markers)
6. After each post is written, scan previous posts for backward link placeholders and inject the new post's URL 7. After all posts are written, generate the cluster scorecard
If claude-blog is NOT installed:
1. Generate detailed content briefs for each post in the cluster plan 2. Each brief includes:
- Title and meta description
- Primary keyword and secondary keywords
- Template type and suggested structure (H2/H3 outline)
- Word count target
- Internal links to include (with anchor text)
- Key points to cover
- Competing pages to differentiate from
3. Write briefs to cluster-briefs/ directory as individual markdown files 4. Inform user: "Install claude-blog to auto-create content. Briefs saved to cluster-briefs/."
---
Cluster Scorecard
Post-execution quality report. Run automatically after /seo cluster execute or on demand via analysis of the output directory.
| Metric | Target | How Measured |
|---|---|---|
| Coverage | 100% | Posts written / posts planned |
| Link Density | 3+ per post | Count internal links per post |
| Orphan Pages | 0 | Posts with < 1 incoming link |
| Cannibalization | 0 conflicts | Check for duplicate primary keywords |
| Image Count | 1+ per post | Posts with at least one image |
| Pillar Links | 100% | All spokes link to pillar and vice versa |
| Cross-Links | 80%+ | Recommended spoke-to-spoke links implemented |
| Content Gaps | 0 | Planned posts that were skipped or incomplete |
---
Map Regeneration
When /seo cluster map is invoked:
1. Read cluster-plan.json from the current directory 2. Scan output directory and update post statuses (planned vs written) 3. Regenerate cluster-map.html with updated statuses 4. Report: posts written vs planned, link completion percentage
---
Output Files
All outputs are written to the current working directory:
| File | Description |
|---|---|
cluster-plan.json | Machine-readable cluster plan (full data) |
cluster-plan.md | Human-readable cluster plan summary |
cluster-map.html | Interactive SVG visualization |
cluster-briefs/ | Content briefs (if no claude-blog) |
cluster-scorecard.md | Post-execution quality report |
---
Cross-Skill Integration
| Skill | Relationship |
|---|---|
seo-plan | Import source: strategy import reads seo-plan output |
seo-content | Quality check: E-E-A-T validation of generated content |
seo-schema | Schema markup: Article, BreadcrumbList, ItemList for cluster pages |
seo-dataforseo | Data source: SERP data when DataForSEO MCP is available |
seo-google | Reporting: generate PDF report of cluster plan and scorecard |
After cluster planning or execution completes, offer: "Generate a PDF report? Use /seo google report"
---
Error Handling
| Error | Cause | Resolution |
|---|---|---|
| "No seed keyword provided" | Missing argument | Prompt user for seed keyword or URL |
| "Insufficient keyword variants" | Expansion yielded < 15 keywords | Run second expansion pass with PAA questions |
| "SERP data unavailable" | WebSearch and DataForSEO both failing | Retry after 30s; if persistent, use intent-only clustering with warning |
| "No strategy file found" | --from strategy but no plan exists | Prompt user to run /seo plan first |
| "cluster-plan.json not found" | Execute without planning | Prompt user to run /seo cluster plan first |
| "claude-blog not installed" | Execute attempted without blog skill | Generate content briefs instead; suggest installation |
| "DataForSEO budget exceeded" | Cost check returned "blocked" | Fall back to WebSearch; inform user |
| "Duplicate primary keywords" | Cannibalization detected | Merge affected posts or reassign keywords |
| "Orphan page detected" | Post missing incoming links | Add links from nearest cluster siblings |
| "Resume state corrupted" | Mismatch between plan and output | Rebuild state from output directory scan |
---
Security
- All URLs fetched via
python3 scripts/render_page.py --mode auto(SPA-aware SSRF protection viaurl_safety) - No credentials stored or transmitted
- Output files contain no PII or API keys
- DataForSEO cost checks run before every API call
FLOW Framework Integration
For prompt-guided keyword research and gap analysis, use /seo flow find [url|topic] — FLOW's 5 find-stage prompts complement the SERP-overlap clustering methodology with structured discovery prompts.
Execution Workflow
Overview
The execution phase transforms a cluster-plan.json into actual content. It handles priority ordering, context injection for the blog writer, backward link updates, resume capability, and post-execution quality scoring.
Priority Algorithm
Content is created in this strict order:
1. Pillar page first -- The hub must exist before any spokes can link to it 2. Spokes by search volume (descending) -- Highest-volume spokes first for maximum early impact 3. Within same volume, by cluster index -- Process Cluster 0 before Cluster 1 4. Within same cluster, by post index -- Process Post 0 before Post 1
Rationale: The pillar establishes the topical authority foundation. High-volume spokes generate the most organic traffic, so they should be published earliest for faster compounding returns.
Cluster Context Injection
When invoking blog-write for each post, pass a structured context block:
{
"cluster_context": {
"role": "pillar|spoke",
"pillar_title": "The Complete Guide to ...",
"pillar_url": "/guide/...",
"cluster_name": "Cluster Name",
"cluster_index": 0,
"post_index": 0,
"primary_keyword": "target keyword",
"secondary_keywords": ["variant 1", "variant 2"],
"template": "how-to",
"word_count_target": 1500,
"outgoing_links": [
{ "url": "/pillar-url", "anchor": "main topic guide", "type": "mandatory" },
{ "url": "/sibling-post", "anchor": "related subtopic", "type": "recommended" }
],
"incoming_link_placeholder": "<!-- cluster-link:cluster-0-post-1 -->",
"differentiation_note": "This post should focus on X, while sibling post covers Y"
}
}Context Fields Explained
| Field | Purpose |
|---|---|
role | Whether this is the pillar or a spoke (affects depth and breadth) |
pillar_title / pillar_url | So spokes can link back to the pillar |
cluster_name / cluster_index | For organizing and labeling |
post_index | Position within the cluster |
primary_keyword | The main target keyword for this post |
secondary_keywords | Additional keywords to naturally incorporate |
template | Content template to follow (how-to, listicle, comparison, etc.) |
word_count_target | Target word count (not a hard limit, a guideline) |
outgoing_links | Links this post MUST include, with suggested anchor text |
incoming_link_placeholder | HTML comment marker for future backward link injection |
differentiation_note | How this post differs from siblings targeting similar topics |
Backward Link Injection
After each new post is written, update previously written posts to link to it:
Process
1. Read the link matrix from cluster-plan.json 2. Identify all posts that should link TO the newly written post 3. For each of those posts (that is already written): a. Open the post file b. Search for the placeholder comment: <!-- cluster-link:POST_ID --> c. Replace the placeholder with an actual contextual link d. If no placeholder found, append a contextual link in the most relevant section 4. Log all backward links added
Placeholder Format
<!-- cluster-link:cluster-0-post-1 -->This is inserted during content creation at a contextually appropriate location. When the target post is later written, the placeholder is replaced with:
For a deeper dive, see our guide on <a href="/target-url">anchor text</a>.Resume Capability
Execution can be interrupted and resumed. The resume algorithm:
Detection
1. Read cluster-plan.json from the current directory 2. Scan the output directory for existing post files 3. Match found files against the plan using:
- Filename patterns (slug derived from title or keyword)
- Content inspection (check for
primary_keywordin frontmatter or first H1)
4. Mark matched posts as "status": "written" in the plan
Resume Logic
1. Load the plan with updated statuses 2. Filter to "status": "planned" posts only 3. Apply the priority algorithm to the remaining posts 4. Continue execution from the next unwritten post 5. Run backward link injection for any links between newly written and previously written posts
Edge Cases
- If the pillar is missing but spokes exist, write the pillar first and then
inject backward links into existing spokes
- If a spoke file exists but is incomplete (under 50% of target word count),
treat it as unwritten and recreate
- If
cluster-plan.jsonhas been modified since last execution, re-validate
the plan before resuming
Scorecard Metrics
After execution completes (or on demand), generate cluster-scorecard.md:
Metric Definitions
| Metric | Formula | Target |
|---|---|---|
| Coverage | written_posts / planned_posts * 100 | 100% |
| Link Density | total_internal_links / total_posts | >= 3.0 per post |
| Orphan Pages | Count of posts with 0 incoming internal links | 0 |
| Pillar Connectivity | spokes_linking_to_pillar / total_spokes * 100 | 100% |
| Reverse Pillar Links | spokes_linked_from_pillar / total_spokes * 100 | 100% |
| Cross-Links | implemented_cross_links / recommended_cross_links * 100 | >= 80% |
| Cannibalization | Count of posts sharing a primary keyword | 0 |
| Image Count | Posts with at least one image / total posts | >= 90% |
| Content Gaps | Planned posts not yet written | 0 |
| Avg Word Count | Mean word count across all written posts | Within 10% of targets |
Scorecard Output Format
# Cluster Scorecard: [Seed Keyword]
## Summary
- Posts: X/Y written (Z%)
- Total words: N (estimated: M)
- Internal links: L (density: L/Y per post)
## Metrics
| Metric | Score | Status |
|--------|-------|--------|
| Coverage | 100% | PASS |
| Link Density | 3.2/post | PASS |
| ...
## Issues Found
- [List any FAIL or WARN metrics with remediation steps]
## Next Steps
- [Actionable items to reach 100% on all metrics]Quality Gates
Before marking execution as complete, verify:
1. Every spoke links to the pillar (mandatory) 2. The pillar links to every spoke (mandatory) 3. No post has fewer than 3 incoming internal links 4. No two posts share the same primary keyword 5. No orphan pages exist 6. All posts meet minimum word count (80% of target)
If any gate fails, flag it in the scorecard and provide specific remediation instructions. Do NOT silently pass a failing cluster.
Hub-and-Spoke Content Architecture
Structure Overview
A hub-and-spoke cluster consists of one pillar page (the hub) connected to multiple spoke clusters, each containing 2-4 individual posts. The pillar provides broad coverage; spokes provide deep dives into subtopics.
[Spoke 1a] --- [Spoke 1b]
\ /
[Cluster 1]
|
[Spoke 2a] -- [Cluster 2] -- [PILLAR] -- [Cluster 3] -- [Spoke 3a]
[Spoke 2b] / \ [Spoke 3b]
|
[Cluster 4]
/ \
[Spoke 4a] --- [Spoke 4b]Pillar Page Specifications
| Attribute | Requirement |
|---|---|
| Word count | 2,500-4,000 words |
| Keyword | Broadest, highest-volume keyword in the set |
| Content type | Comprehensive overview covering all cluster subtopics |
| Template | ultimate-guide (default) |
| Internal links | Link to EVERY spoke post in every cluster (mandatory) |
| Structure | Table of contents, section per cluster, summary per subtopic |
| Schema | Article + BreadcrumbList + ItemList (listing all cluster pages) |
| Update frequency | Refresh quarterly or when new spokes are added |
Spoke Page Specifications
| Attribute | Requirement |
|---|---|
| Word count | 1,200-1,800 words |
| Keyword | Specific subtopic keyword (unique per post) |
| Content type | Deep-dive into a single subtopic |
| Template | Selected by intent (see template mapping below) |
| Internal links | Link to pillar (mandatory) + 2-3 sibling spokes |
| Schema | Article + BreadcrumbList |
| Depth | More detailed than the pillar's coverage of the same subtopic |
Cluster Constraints
| Constraint | Value |
|---|---|
| Clusters per pillar | 2-5 |
| Posts per cluster | 2-4 |
| Total posts (including pillar) | 5-21 |
| Max total estimated words | ~50,000 (pillar + 20 spokes at max) |
Template Auto-Selection by Intent
| Intent Pattern | Template | Description |
|---|---|---|
| Informational (broad) | ultimate-guide | Comprehensive topic overview |
| Informational (how) | how-to | Step-by-step instructions |
| Informational (list) | listicle | Numbered list of items/tips |
| Informational (concept) | explainer | Deep explanation of a concept |
| Commercial (compare) | comparison | Side-by-side product/service comparison |
| Commercial (evaluate) | review | In-depth review of a single product/service |
| Commercial (rank) | best-of | Ranked list of top options |
| Transactional | landing-page | Conversion-focused page |
Selection logic: 1. Match the keyword's classified intent to the table above 2. If multiple templates match, prefer the one whose SERP results show the most similar content format (e.g., if top results are all listicles, use listicle) 3. Avoid duplicate templates within the same cluster unless justified by intent
Internal Link Rules
Mandatory Links
- Every spoke MUST link to the pillar (at least once in body content)
- The pillar MUST link to every spoke (in its relevant section)
- These are non-negotiable -- a cluster without these links is structurally broken
Recommended Links
- Spoke-to-spoke within the same cluster: 2-3 links per post
- Use contextual anchor text (target keyword or close variant)
- Place links within body paragraphs, not just in "related posts" sections
Optional Links
- Cross-cluster spoke-to-spoke: 0-1 links per post
- Only when there is a genuine topical bridge between clusters
- Avoid forcing cross-links that do not add reader value
Minimum Link Requirements
- Every post must have at least 3 incoming internal links
- No orphan pages (every page reachable from pillar within 2 clicks)
- Anchor text diversity: no single anchor text used for more than 40% of links to a page
Cannibalization Prevention
1. No two posts share the same primary keyword. Period. 2. If SERP overlap between two keywords is 7+, merge into a single post 3. After clustering, verify uniqueness: list all primary keywords and check for near-duplicates (e.g., "best CRM" and "top CRM software") 4. If near-duplicates found, either merge the posts or differentiate by intent (e.g., one as "best-of" list, another as "comparison")
JSON-LD Schema Templates
Pillar Page
[
{ "@type": "Article", "headline": "...", "author": {...}, "datePublished": "..." },
{ "@type": "BreadcrumbList", "itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "..." },
{ "@type": "ListItem", "position": 2, "name": "Pillar Title", "item": "..." }
]},
{ "@type": "ItemList", "name": "Topic Cluster", "itemListElement": [
{ "@type": "ListItem", "position": 1, "url": "spoke-1-url" }
]}
]Spoke Page
[
{ "@type": "Article", "headline": "...", "author": {...}, "isPartOf": { "@id": "pillar-url" } },
{ "@type": "BreadcrumbList", "itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "..." },
{ "@type": "ListItem", "position": 2, "name": "Pillar Title", "item": "pillar-url" },
{ "@type": "ListItem", "position": 3, "name": "Spoke Title", "item": "..." }
]}
]cluster-plan.json Schema
{
"version": "1.9.0",
"seed_keyword": "string",
"created_at": "ISO-8601",
"pillar": {
"title": "string",
"keyword": "string",
"volume": 0,
"template": "ultimate-guide",
"wordCount": 4000,
"url": "string",
"status": "planned|written"
},
"clusters": [
{
"name": "Cluster Name",
"posts": [
{
"title": "string",
"keyword": "string",
"volume": 0,
"template": "string",
"wordCount": 1500,
"url": "string",
"status": "planned|written"
}
]
}
],
"links": [
{ "from": "pillar", "to": "cluster-0-post-0", "type": "mandatory", "anchor": "keyword" }
],
"serp_matrix": {
"keywords": ["string"],
"scores": [[0]]
},
"scorecard": {
"coverage": 0.0,
"linkDensity": 0.0,
"orphanPages": 0,
"cannibalization": 0,
"contentGaps": 0
}
}SERP Overlap Methodology
Core Principle
Two keywords that return the same Google results should be targeted by the same page. Two keywords that return completely different results need separate pages. This is the foundation of SERP-based clustering -- using Google's own ranking decisions to determine content architecture rather than relying on keyword text similarity or stemming.
Scoring Algorithm
Step 1: Collect SERP Data
For each keyword in the candidate set, retrieve the top 10 organic results:
- Use WebSearch or DataForSEO
serp_organic_live_advanced - Extract only organic result URLs (ignore ads, featured snippets, PAA, knowledge panels)
- Normalize URLs: strip protocol, trailing slash, and query parameters (except meaningful ones)
- Store as a set of 10 URLs per keyword
Step 2: Pairwise Comparison
For each pair of keywords (A, B): 1. Retrieve the URL sets: urls_A and urls_B 2. Compute overlap: shared = urls_A intersection urls_B 3. Score: overlap_score = len(shared)
Step 3: Apply Thresholds
| Overlap Score | Relationship | Action |
|---|---|---|
| 7-10 | Same post | Merge keywords into one target page. Use higher-volume keyword as primary. |
| 4-6 | Same cluster | Place in same spoke cluster. May be separate posts or same post depending on volume difference. |
| 2-3 | Interlink | Place in adjacent clusters. Create cross-cluster internal links. |
| 0-1 | Separate | Different clusters entirely or exclude from current pillar topic. |
Step 4: Handle Ambiguous Scores (3-4 Range)
Scores in the 3-4 range require tiebreaking: 1. Check domain overlap (same domains but different pages = closer relationship) 2. Check intent alignment (same intent category = lean toward same cluster) 3. Check volume ratio (if one keyword has 10x+ more volume, it likely deserves its own post) 4. When in doubt, keep in same cluster with separate posts (err toward cohesion)
Optimization Strategy
Full pairwise comparison of N keywords requires N*(N-1)/2 SERP fetches. For 40 keywords, that is 780 comparisons. Optimize by reducing unnecessary checks:
Pre-Grouping
1. Classify all keywords by intent (Informational, Commercial, Transactional) 2. Group keywords that share the same head term (e.g., "CRM software" variants) 3. Only run pairwise SERP comparison within pre-groups 4. Cross-check boundary keywords (highest volume in each group) across groups
Skip Rules
- If keywords A and B are both long-tail variants of the same head term AND share
the same intent, assume overlap 4-6 (same cluster) without checking SERP
- If keywords are in different intent categories, assume overlap 0-2 unless they
share a head term
- Verify assumptions with spot-check SERP comparisons (sample 20% of skipped pairs)
Scoring Matrix Format
Store the overlap data as a symmetric matrix in cluster-plan.json:
{
"serp_matrix": {
"keywords": ["keyword-a", "keyword-b", "keyword-c"],
"scores": [
[10, 5, 1],
[5, 10, 3],
[1, 3, 10]
]
}
}Diagonal is always 10 (a keyword overlaps perfectly with itself).
Anti-Patterns
1. Never cluster by text similarity alone. "Dog training tips" and "dog training classes" may have completely different SERPs despite similar text. 2. Never use stemming-only grouping. "Run" and "running" may target different intents entirely. 3. Never assume related searches belong in the same cluster. Verify with SERP data. 4. Never ignore SERP feature differences. If keyword A triggers a local pack and keyword B triggers a featured snippet, they likely need different content types even with moderate URL overlap. 5. Never treat all domains equally. Wikipedia and Reddit appear in many SERPs. Consider filtering out ubiquitous domains (top 5 most common) before scoring, or weighting domain-specific results higher.
Data Source Priority
1. DataForSEO (if available): Most reliable, consistent SERP data. Use serp_organic_live_advanced with location_code: 2840 (US) and language_code: "en". 2. WebSearch (fallback): Adequate for clustering but results may vary by session. Run multiple searches for the same keyword and use the most common result set.
Caching
Within a single clustering session, cache all SERP results. If keyword A's results are fetched for the A-B comparison, reuse them for the A-C comparison. This halves the number of actual SERP fetches needed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Content Cluster Map</title>
<style>
:root {
--bg: #ffffff;
--bg-secondary: #f8f9fa;
--text: #1a1a2e;
--text-secondary: #555555;
--border: #e0e0e0;
--pillar-fill: #1e3a5f;
--pillar-stroke: #16304d;
--link-mandatory: #4E79A7;
--link-recommended: #76B7B2;
--link-optional: #B07AA1;
--tooltip-bg: #1a1a2e;
--tooltip-text: #ffffff;
--stats-bg: #f0f4f8;
--written-opacity: 1.0;
--planned-opacity: 0.6;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1a1a2e;
--bg-secondary: #16213e;
--text: #e0e0e0;
--text-secondary: #aaaaaa;
--border: #333355;
--pillar-fill: #2d5a8f;
--pillar-stroke: #4E79A7;
--tooltip-bg: #0f0f23;
--tooltip-text: #e0e0e0;
--stats-bg: #16213e;
}
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
display: flex;
flex-direction: column;
}
header {
text-align: center;
padding: 24px 16px 8px;
}
header h1 {
font-size: 1.5rem;
font-weight: 700;
color: var(--text);
margin-bottom: 4px;
}
header p {
font-size: 0.875rem;
color: var(--text-secondary);
}
.stats-bar {
display: flex;
justify-content: center;
gap: 32px;
padding: 12px 16px;
background: var(--stats-bg);
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
}
.stat {
text-align: center;
}
.stat-value {
font-size: 1.25rem;
font-weight: 700;
color: var(--text);
}
.stat-label {
font-size: 0.75rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.map-container {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
min-height: 500px;
}
svg {
max-width: 100%;
max-height: 80vh;
}
.pillar-node {
cursor: pointer;
transition: transform 0.2s ease;
}
.pillar-node:hover {
filter: brightness(1.1);
}
.spoke-node {
cursor: pointer;
transition: opacity 0.2s ease;
}
.spoke-node:hover {
filter: brightness(1.15);
}
.spoke-node.planned {
opacity: var(--planned-opacity);
stroke-dasharray: 4 2;
}
.spoke-node.written {
opacity: var(--written-opacity);
}
.link-line {
transition: opacity 0.2s ease, stroke-width 0.2s ease;
}
.link-line.mandatory {
stroke: var(--link-mandatory);
stroke-width: 2;
}
.link-line.recommended {
stroke: var(--link-recommended);
stroke-width: 1.5;
stroke-dasharray: 6 3;
}
.link-line.optional {
stroke: var(--link-optional);
stroke-width: 1;
stroke-dasharray: 3 3;
}
.link-line.dimmed {
opacity: 0.1;
}
.link-line.highlighted {
opacity: 1;
stroke-width: 3;
}
.node-label {
font-size: 11px;
fill: var(--text);
text-anchor: middle;
pointer-events: none;
user-select: none;
}
.pillar-label {
font-size: 13px;
font-weight: 700;
fill: #ffffff;
text-anchor: middle;
pointer-events: none;
user-select: none;
}
.cluster-label {
font-size: 10px;
fill: var(--text-secondary);
text-anchor: middle;
pointer-events: none;
font-style: italic;
}
.tooltip {
position: fixed;
background: var(--tooltip-bg);
color: var(--tooltip-text);
padding: 12px 16px;
border-radius: 8px;
font-size: 0.8125rem;
line-height: 1.5;
max-width: 280px;
pointer-events: none;
opacity: 0;
transition: opacity 0.15s ease;
z-index: 100;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.tooltip.visible {
opacity: 1;
}
.tooltip-title {
font-weight: 700;
margin-bottom: 4px;
}
.tooltip-detail {
display: flex;
justify-content: space-between;
gap: 16px;
}
.tooltip-detail span:first-child {
color: var(--text-secondary);
}
.legend {
display: flex;
justify-content: center;
gap: 24px;
padding: 8px 16px;
flex-wrap: wrap;
}
.legend-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.75rem;
color: var(--text-secondary);
}
.legend-line {
width: 24px;
height: 2px;
}
.legend-line.mandatory { background: var(--link-mandatory); }
.legend-line.recommended { background: var(--link-recommended); background-image: repeating-linear-gradient(90deg, var(--link-recommended) 0 6px, transparent 6px 9px); background-color: transparent; height: 2px;}
.legend-line.optional { background: var(--link-optional); background-image: repeating-linear-gradient(90deg, var(--link-optional) 0 3px, transparent 3px 6px); background-color: transparent; height: 1px;}
.legend-dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
.legend-dot.written { background: #59A14F; }
.legend-dot.planned { background: #59A14F; opacity: 0.5; border: 1px dashed #59A14F; }
footer {
text-align: center;
padding: 12px 16px;
font-size: 0.75rem;
color: var(--text-secondary);
border-top: 1px solid var(--border);
}
</style>
</head>
<body>
<header>
<h1 id="map-title">Content Cluster Map</h1>
<p id="map-subtitle">SERP-based semantic topic clustering</p>
</header>
<div class="stats-bar">
<div class="stat">
<div class="stat-value" id="stat-posts">0</div>
<div class="stat-label">Total Posts</div>
</div>
<div class="stat">
<div class="stat-value" id="stat-clusters">0</div>
<div class="stat-label">Clusters</div>
</div>
<div class="stat">
<div class="stat-value" id="stat-links">0</div>
<div class="stat-label">Internal Links</div>
</div>
<div class="stat">
<div class="stat-value" id="stat-words">0</div>
<div class="stat-label">Est. Words</div>
</div>
</div>
<div class="map-container">
<svg id="cluster-svg" role="img" aria-label="Content cluster visualization showing pillar page connected to topic clusters and spoke pages">
<title>Content Cluster Map</title>
<desc>Interactive visualization of a hub-and-spoke content architecture. The central pillar node connects to surrounding cluster groups, each containing spoke pages.</desc>
</svg>
</div>
<div class="legend">
<div class="legend-item"><div class="legend-line mandatory"></div> Mandatory link</div>
<div class="legend-item"><div class="legend-line recommended"></div> Recommended link</div>
<div class="legend-item"><div class="legend-line optional"></div> Optional link</div>
<div class="legend-item"><div class="legend-dot written"></div> Written</div>
<div class="legend-item"><div class="legend-dot planned"></div> Planned</div>
</div>
<footer>Generated by Claude SEO v1.9.0</footer>
<div class="tooltip" id="tooltip"></div>
<script>
// === CLUSTER DATA (replaced by skill at generation time) ===
const CLUSTER_DATA = {
pillar: { title: "Sample Pillar Page", keyword: "sample keyword", volume: 5000, template: "ultimate-guide", wordCount: 3500, url: "/pillar" },
clusters: [
{
name: "Sample Cluster",
color: "#4E79A7",
posts: [
{ title: "Sample Post 1", keyword: "sample post 1", volume: 1200, template: "how-to", wordCount: 1500, url: "/post-1", status: "planned" },
{ title: "Sample Post 2", keyword: "sample post 2", volume: 800, template: "listicle", wordCount: 1400, url: "/post-2", status: "planned" }
]
}
],
links: [
{ from: "pillar", to: "cluster-0-post-0", type: "mandatory" },
{ from: "cluster-0-post-0", to: "pillar", type: "mandatory" }
],
meta: { totalPosts: 3, totalClusters: 1, totalLinks: 2, estimatedWords: 6400 }
};
// === END CLUSTER DATA ===
const COLORS = ["#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F", "#EDC948", "#B07AA1", "#FF9DA7"];
(function render() {
const data = CLUSTER_DATA;
const svg = document.getElementById("cluster-svg");
const tooltip = document.getElementById("tooltip");
// Update header
document.getElementById("map-title").textContent = data.pillar.title || "Content Cluster Map";
document.getElementById("map-subtitle").textContent = "Cluster map for: " + data.pillar.keyword;
// Update stats
document.getElementById("stat-posts").textContent = data.meta.totalPosts;
document.getElementById("stat-clusters").textContent = data.meta.totalClusters;
document.getElementById("stat-links").textContent = data.meta.totalLinks;
document.getElementById("stat-words").textContent = data.meta.estimatedWords.toLocaleString();
// Layout calculations
const numClusters = data.clusters.length;
const maxPostsInCluster = Math.max(...data.clusters.map(c => c.posts.length), 1);
const baseRadius = 140;
const clusterRadius = baseRadius + numClusters * 15;
const spokeRadius = 55 + maxPostsInCluster * 10;
const totalRadius = clusterRadius + spokeRadius + 60;
const cx = totalRadius + 40;
const cy = totalRadius + 40;
const width = (totalRadius + 40) * 2;
const height = (totalRadius + 40) * 2;
svg.setAttribute("viewBox", "0 0 " + width + " " + height);
svg.setAttribute("width", Math.min(width, 900));
svg.setAttribute("height", Math.min(height, 900));
// Build node position map
const nodePositions = {};
nodePositions["pillar"] = { x: cx, y: cy };
const clusterCenters = [];
for (let ci = 0; ci < numClusters; ci++) {
const angle = (2 * Math.PI * ci) / numClusters - Math.PI / 2;
const ccx = cx + Math.cos(angle) * clusterRadius;
const ccy = cy + Math.sin(angle) * clusterRadius;
clusterCenters.push({ x: ccx, y: ccy, angle: angle });
const cluster = data.clusters[ci];
const numPosts = cluster.posts.length;
for (let pi = 0; pi < numPosts; pi++) {
const spreadAngle = Math.PI * 0.6;
const startAngle = angle - spreadAngle / 2;
const postAngle = numPosts === 1
? angle
: startAngle + (spreadAngle * pi) / (numPosts - 1);
const px = ccx + Math.cos(postAngle) * spokeRadius;
const py = ccy + Math.sin(postAngle) * spokeRadius;
const nodeId = "cluster-" + ci + "-post-" + pi;
nodePositions[nodeId] = { x: px, y: py };
}
}
// SVG content assembly
let svgContent = "";
// Draw links first (behind nodes)
const linkElements = [];
data.links.forEach(function(link, idx) {
const fromPos = nodePositions[link.from];
const toPos = nodePositions[link.to];
if (!fromPos || !toPos) return;
const linkClass = "link-line " + link.type;
const linkId = "link-" + idx;
svgContent += '<line id="' + linkId + '" class="' + linkClass + '" '
+ 'x1="' + fromPos.x + '" y1="' + fromPos.y + '" '
+ 'x2="' + toPos.x + '" y2="' + toPos.y + '" '
+ 'data-from="' + link.from + '" data-to="' + link.to + '"/>';
linkElements.push(linkId);
});
// Draw cluster group labels
clusterCenters.forEach(function(cc, ci) {
const cluster = data.clusters[ci];
const labelAngle = cc.angle;
const labelDist = clusterRadius * 0.55;
const lx = cx + Math.cos(labelAngle) * labelDist;
const ly = cy + Math.sin(labelAngle) * labelDist;
svgContent += '<text class="cluster-label" x="' + lx + '" y="' + ly + '">'
+ escapeHtml(cluster.name) + '</text>';
});
// Draw spoke nodes
data.clusters.forEach(function(cluster, ci) {
const color = cluster.color || COLORS[ci % COLORS.length];
cluster.posts.forEach(function(post, pi) {
const nodeId = "cluster-" + ci + "-post-" + pi;
const pos = nodePositions[nodeId];
const statusClass = post.status === "written" ? "written" : "planned";
svgContent += '<g class="spoke-node ' + statusClass + '" data-node="' + nodeId + '">'
+ '<circle cx="' + pos.x + '" cy="' + pos.y + '" r="22" '
+ 'fill="' + color + '" stroke="' + darken(color) + '" stroke-width="2"/>'
+ '<text class="node-label" x="' + pos.x + '" y="' + (pos.y + 34) + '">'
+ escapeHtml(truncate(post.title, 18))
+ '</text></g>';
});
});
// Draw pillar node (on top)
svgContent += '<g class="pillar-node" data-node="pillar">'
+ '<circle cx="' + cx + '" cy="' + cy + '" r="38" '
+ 'fill="' + getComputedStyle(document.documentElement).getPropertyValue("--pillar-fill").trim() + '" '
+ 'stroke="' + getComputedStyle(document.documentElement).getPropertyValue("--pillar-stroke").trim() + '" '
+ 'stroke-width="3"/>'
+ '<text class="pillar-label" x="' + cx + '" y="' + (cy - 4) + '">'
+ escapeHtml(truncate(data.pillar.title, 16))
+ '</text>'
+ '<text class="pillar-label" x="' + cx + '" y="' + (cy + 12) + '" style="font-size:9px;font-weight:400;opacity:0.8">'
+ 'PILLAR'
+ '</text></g>';
svg.innerHTML = svgContent;
// Tooltip handling
function showTooltip(e, nodeId) {
let info;
if (nodeId === "pillar") {
info = data.pillar;
} else {
const parts = nodeId.match(/cluster-(\d+)-post-(\d+)/);
if (!parts) return;
info = data.clusters[parseInt(parts[1])].posts[parseInt(parts[2])];
}
if (!info) return;
let html = '<div class="tooltip-title">' + escapeHtml(info.title) + '</div>';
html += '<div class="tooltip-detail"><span>Keyword:</span><span>' + escapeHtml(info.keyword) + '</span></div>';
html += '<div class="tooltip-detail"><span>Volume:</span><span>' + (info.volume || "N/A") + '</span></div>';
html += '<div class="tooltip-detail"><span>Template:</span><span>' + escapeHtml(info.template) + '</span></div>';
html += '<div class="tooltip-detail"><span>Words:</span><span>' + info.wordCount.toLocaleString() + '</span></div>';
if (info.status) {
html += '<div class="tooltip-detail"><span>Status:</span><span>' + info.status + '</span></div>';
}
tooltip.innerHTML = html;
tooltip.classList.add("visible");
const rect = tooltip.getBoundingClientRect();
let tx = e.clientX + 12;
let ty = e.clientY + 12;
if (tx + rect.width > window.innerWidth) tx = e.clientX - rect.width - 12;
if (ty + rect.height > window.innerHeight) ty = e.clientY - rect.height - 12;
tooltip.style.left = tx + "px";
tooltip.style.top = ty + "px";
}
function hideTooltip() {
tooltip.classList.remove("visible");
}
function highlightLinks(nodeId) {
document.querySelectorAll(".link-line").forEach(function(line) {
if (line.dataset.from === nodeId || line.dataset.to === nodeId) {
line.classList.add("highlighted");
line.classList.remove("dimmed");
} else {
line.classList.add("dimmed");
line.classList.remove("highlighted");
}
});
}
function resetLinks() {
document.querySelectorAll(".link-line").forEach(function(line) {
line.classList.remove("highlighted", "dimmed");
});
}
// Attach event listeners to nodes
document.querySelectorAll(".pillar-node, .spoke-node").forEach(function(node) {
const nodeId = node.dataset.node;
node.addEventListener("mouseenter", function(e) {
showTooltip(e, nodeId);
highlightLinks(nodeId);
});
node.addEventListener("mousemove", function(e) {
const rect = tooltip.getBoundingClientRect();
let tx = e.clientX + 12;
let ty = e.clientY + 12;
if (tx + rect.width > window.innerWidth) tx = e.clientX - rect.width - 12;
if (ty + rect.height > window.innerHeight) ty = e.clientY - rect.height - 12;
tooltip.style.left = tx + "px";
tooltip.style.top = ty + "px";
});
node.addEventListener("mouseleave", function() {
hideTooltip();
resetLinks();
});
node.addEventListener("focus", function(e) {
showTooltip(e, nodeId);
highlightLinks(nodeId);
});
node.addEventListener("blur", function() {
hideTooltip();
resetLinks();
});
});
// Keyboard accessibility
document.querySelectorAll(".pillar-node, .spoke-node").forEach(function(node) {
node.setAttribute("tabindex", "0");
node.setAttribute("role", "button");
const nodeId = node.dataset.node;
let label;
if (nodeId === "pillar") {
label = "Pillar page: " + data.pillar.title;
} else {
const parts = nodeId.match(/cluster-(\d+)-post-(\d+)/);
if (parts) {
const post = data.clusters[parseInt(parts[1])].posts[parseInt(parts[2])];
label = "Spoke page: " + post.title;
}
}
if (label) node.setAttribute("aria-label", label);
});
})();
// Utility functions
function escapeHtml(str) {
var div = document.createElement("div");
div.textContent = str;
return div.innerHTML;
}
function truncate(str, maxLen) {
if (!str) return "";
return str.length > maxLen ? str.substring(0, maxLen - 1) + "\u2026" : str;
}
function darken(hex) {
var r = parseInt(hex.slice(1, 3), 16);
var g = parseInt(hex.slice(3, 5), 16);
var b = parseInt(hex.slice(5, 7), 16);
r = Math.max(0, Math.floor(r * 0.75));
g = Math.max(0, Math.floor(g * 0.75));
b = Math.max(0, Math.floor(b * 0.75));
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
</script>
</body>
</html>
Related skills
Forks & variants (1)
Seo Cluster has 1 known copy in the catalog totaling 27 installs. They canonicalize to this original listing.
- agricidaniel - 27 installs
FAQ
What is seo-cluster?
>
When should I use seo-cluster?
>
Is seo-cluster safe to install?
Review the Security Audits panel on this page before production use.