Keyword Research

Keyword Clustering and Topic Clusters with Claude Code

Cluster keywords by SERP overlap with Claude Code, plan hub-and-spoke topic clusters with a full internal link matrix, and write the cluster from one plan.

By Somanath Diksangi12 min read
Keyword clustering with Claude Code: group keywords by SERP overlap and plan hub-and-spoke topic clusters with /claudeseo cluster

Keyword clustering is the process of grouping search terms by the intent behind them, so you know which keywords one page can cover, which need their own page, and how those pages should link together. The most reliable signal is the search results themselves: when two keywords return many of the same top-10 pages, Google is treating them as one topic. With Claude Code, /claudeseo cluster groups keywords by that SERP overlap and designs a hub-and-spoke plan, and /claudeblog cluster can write the whole cluster from it.

This guide explains SERP-overlap clustering, how the two commands plan and build a topic cluster, and how to check the result before anything goes live.

Key takeaways

  • Cluster keywords by shared search results, not by how similar the words look. Two phrases can look alike and serve different intents.
  • /claudeseo cluster counts shared top-10 organic URLs for each keyword pair: 7 to 10 shared means one page, 4 to 6 means the same cluster.
  • A topic cluster is one pillar page plus 2 to 5 clusters of 2 to 4 spoke posts, linked both ways, with no two posts sharing a primary keyword.
  • Every post needs at least 3 incoming internal links, and every spoke links to and from the pillar.
  • /claudeblog cluster execute writes the pillar first, then each spoke, and replaces placeholder links as the target posts appear.

What is keyword clustering and why use SERP overlap?

A keyword list doesn't tell you how many pages to write. "Compost bin", "best compost bin", and "how to choose a compost bin" might belong on one page or three. Clustering answers that by grouping terms one page can satisfy.

There are two broad ways to group keywords. Text similarity groups phrases that share words or meaning. It's fast, but it can merge phrases that need different pages and split phrases that use different words for the same need. SERP overlap compares the pages Google actually ranks for each keyword. If two searches return mostly the same results, one page can compete for both. If the results barely overlap, Google sees two different needs.

The ClaudeSEO cluster skill uses SERP overlap as its core method. Our broader guide to keyword research with Claude Code covers sources, intent, and prioritization; this guide focuses on the clustering step and the hub-and-spoke plan that follows.

What a topic cluster looks like

A topic cluster is a set of pages built around one broad subject. A pillar page (the hub) covers the broadest keyword. Spoke posts each cover a narrower subtopic in depth. The pillar links to every spoke, every spoke links back to the pillar, and related spokes link to each other.

Readers can move from the overview to the detail they need, search engines can find every page and see how the pages relate, and because each post owns one primary keyword, your pages don't compete for the same search (a problem called keyword cannibalization).

How does /claudeseo cluster group keywords?

The command is part of the Claude SEO skill suite. Give it a seed keyword and it works through a fixed planning sequence:

Flow diagram of SERP-overlap keyword clustering: expand the seed into 30 to 50 variants, classify intent, compare search results pair by pair, apply thresholds, pick the pillar, group spokes, build the link matrix, then validate and save.
The clustering plan runs in a fixed order, and the SERP comparison in step 3 drives every grouping decision.
  1. Expand the seed. It uses web search to grow the seed into 30 to 50 variants from related searches, People Also Ask questions, long-tail modifiers such as "how to" and "checklist", question forms, and commercial modifiers such as "review" and "comparison". Duplicates are removed, and if the list comes up short it runs a second pass using the top questions as seeds.
  2. Classify intent. Each keyword is labeled informational, commercial, transactional, or navigational.
  3. Compare SERPs. For each candidate pair, it counts the URLs the two keywords share in the top 10 organic results.
  4. Apply thresholds. The share count decides whether two keywords belong on one page, in one cluster, or apart.
  5. Pick the pillar. The pillar keyword is the broadest one, with the highest estimated volume and the most overlap with the rest of the set.
  6. Group spokes. The remaining keywords form 2 to 5 clusters, each with 2 to 4 spoke posts.
  7. Build the link matrix. Every required internal link is planned, with anchor text.
  8. Validate and save. The plan is checked against its own rules and written to files.

The SERP overlap thresholds

These are the /claudeseo cluster settings for each keyword pair:

Shared top-10 resultsRelationshipWhat the plan does
7 to 10Same postMerge into one target page
4 to 6Same clusterGroup under the same spoke cluster
2 to 3InterlinkPlace in adjacent clusters and cross-link
0 to 1SeparateAssign to different clusters or exclude

Only organic results count. Ads, featured snippets, and People Also Ask boxes are ignored.

Keeping the comparisons manageable

Comparing every pair gets expensive fast. Forty keywords make 780 possible pairs. The skill cuts this down by grouping keywords by intent first and comparing pairs within each group: four groups of about ten make 180 comparisons. It then cross-checks only the keywords at the edges of each group, and skips pairs that are both long-tail versions of the same head term.

Intent comes first

The skill uses four intent labels, each with typical signal words:

IntentTypical signalsClustered?
Informationalhow, what, why, guide, tutorialYes
Commercialbest, top, review, comparison, vsYes
Transactionalbuy, price, discount, order, sign upYes
Navigationalbrand names, product names, loginNo

Navigational keywords are removed, since those searchers want one specific site. Keywords with mixed intent are classified by their dominant intent, and borderline cases are flagged for you to review.

How the hub-and-spoke plan is designed

Grid of six internal link matrix rules: every spoke links to the pillar, the pillar links to every spoke, two to three sibling links per post, zero to one cross-cluster link, at least three incoming links per post, and no orphan pages.
The six linking rules every cluster plan must satisfy before it's delivered.

Next, the plan turns groups into pages. The pillar targets 2,500 to 4,000 words and each spoke 1,200 to 1,800 words. Each post gets a template that matches its intent: a how-to for "how" questions, a comparison for "vs" keywords, a best-of list for rankings, a landing page for transactional terms. No two posts share a primary keyword.

The internal link matrix follows the rules in the figure above. Anchor text uses the target page's keyword or a close variant, never "click here", and links sit in the body content rather than only in navigation or a sidebar. The matrix is saved as a JSON list of links:

json
{
  "links": [
    { "from": "pillar", "to": "cluster-0-post-0", "type": "mandatory", "anchor": "keyword" },
    { "from": "cluster-0-post-0", "to": "pillar", "type": "mandatory", "anchor": "keyword" }
  ]
}

Before showing you the plan, the skill runs a checklist: no shared primary keywords, every spoke has at least 3 incoming links planned, the pillar and spokes link both ways, there are no orphan pages, templates match intent, word counts and cluster sizes are within limits, and every spoke shares at least 4 top-10 results with its cluster peers. Our internal linking guide covers linking beyond a single cluster.

How to run keyword clustering in Claude Code

Open your project in Claude Code with ClaudeSEO installed, then plan a cluster from a seed keyword:

text
/claudeseo cluster plan home composting

If you've already built a strategy with /claudeseo plan, import its keywords instead of starting from a seed:

text
/claudeseo cluster plan --from strategy

To build the cluster from the plan, or to refresh the cluster map after posts are written:

text
/claudeseo cluster execute
/claudeseo cluster map

The Claude Blog suite has its own planning and execution commands. Its --from strategy option reads the cluster table produced by /claudeblog strategy and flags any conflict between that table and the SERP data rather than silently overriding your plan:

text
/claudeblog cluster plan home composting
/claudeblog cluster plan --from strategy
/claudeblog cluster execute

By default, SERP data comes from web search, so no API key is needed. If you've connected DataForSEO, the SEO command can use it instead. That needs a DataForSEO account, and DataForSEO's own pricing applies. The skill runs a cost check before each batch, asks for approval when the estimate requires it, and falls back to web search if the budget check blocks the call. Our DataForSEO guide covers setup. If SERP data can't be fetched at all, both commands group keywords without it and warn you that accuracy is reduced.

Turning the plan into posts

Flow diagram of cluster execution: approve the plan, write the pillar first, write each spoke with shared cluster context, replace placeholder links with real links, and score the cluster, repeating for every spoke.
Execution writes the pillar first, then loops through the spokes, resolving links as each post appears.

/claudeblog cluster plan ends by showing you a summary of the clusters, posts, total interlinks, and estimated words, then waits for your explicit approval. It never starts writing on its own. When you run execute:

  1. The pillar is written first, so every spoke has a known page to link to.
  2. Spokes follow in priority order. Each one is written with a shared cluster context: its role, keywords, template, word count target, the posts already written (link to these), and the posts still to come, marked with [INTERNAL-LINK] placeholders.
  3. Back-links are filled in. After each post is written, earlier posts are scanned for placeholders that point to it, and each one becomes a real link.
  4. Evidence rules carry through. Every post is told to apply the FLOW framework evidence rules to public statistics: a year in the prose, an inline citation, and a source URL with a retrieval date. Statistics that can't be verified are dropped.

If one post fails, the run logs it and continues, and the scorecard marks the gap. If you cancel, progress is saved and the next run resumes from the first unwritten post.

The blog command also applies quality gates. A duplicate primary keyword blocks execution until you fix the plan. Fewer than 2 clusters of 2 posts each triggers a warning. The word count minimums go to the writer as hard constraints. Fewer than 3 incoming links per post, 2 intents, or 3 templates across the cluster are flagged in the scorecard.

If you have Claude SEO without Claude Blog, /claudeseo cluster execute writes a detailed brief for each post into a cluster-briefs/ folder instead: title and meta description, keywords, template and H2/H3 outline, word count, internal links with anchors, key points, and competing pages to differentiate from. The bundle includes both suites.

How to read the plan and the scorecard

The plan comes as cluster-plan.json (full data), a readable summary, and cluster-map.html, a map you open in a browser with the pillar at the center, each cluster in its own color, and lines for the links between posts. The plan covers:

text
Pillar: [title], [primary keyword], [template], [word count target]
Each cluster: posts with [primary keyword], [template], [word count], links to, links from
SERP overlap matrix: [keyword pair], [shared top-10 results]
Cluster assignments, with the rationale for each
Template choice per post, with the intent behind it
Internal link list and cannibalization check results

Check the SERP overlap matrix first. It's the evidence behind every grouping, and a cluster built on weak overlap deserves a second look.

After execution, the scorecard reports progress against these /claudeseo cluster targets:

MetricTarget
Coverage (posts written vs planned)100%
Internal links per post3 or more
Orphan pages0
Cannibalization conflicts0
Images per post1 or more
Pillar links in both directions100%
Recommended spoke-to-spoke links added80% or more
Planned posts skipped or incomplete0

The blog scorecard adds a quality score for each post from /claudeblog analyze, a 0 to 100 cluster cohesion score built from link reciprocity, intent diversity, template diversity, and keyword coverage, and a list of any unresolved placeholders. It recommends /claudeblog cannibalization for a deeper overlap check (see our keyword cannibalization guide), then /claudeblog schema and /claudeblog seo-check for each post.

Doing it without the skill

You can run SERP-overlap clustering with plain Claude Code if you supply the search results. Export the top 10 organic URLs for each keyword from a rank tracker or SERP tool, then:

text
Read serps.csv (columns: keyword, position, url). For every pair of keywords, count the URLs they share in the top 10. Group pairs with 7+ shared URLs into one page, 4-6 into the same cluster, 2-3 as cross-link candidates, and 0-1 as separate. Show the overlap matrix and the proposed groups, and flag any keyword that fits no group.

Then turn the groups into a hub-and-spoke plan:

text
From these clusters, pick the broadest keyword as the pillar. Assign one primary keyword per post, with no repeats. Build an internal link list where every spoke links to the pillar and back, each spoke links to 2-3 siblings, and every post has at least 3 incoming links. Output it as a table and as JSON.

The skill adds the slow parts: keyword expansion, fetching SERPs for each pair, intent filtering, a validation checklist, the cluster map, and, with Claude Blog, writing every post with links that resolve as the cluster grows.

Keyword clustering mistakes to avoid

  • Clustering by wording alone. Similar words don't mean similar intent. Check the results.
  • One page per keyword. Keywords that share most of their top 10 belong on one page. Splitting them creates pages that compete with each other.
  • Forgetting the links. A cluster without its link matrix is just a list of posts. Plan links before writing.
  • Orphan spokes. A post with no incoming links is hard for readers and crawlers to find.
  • Ignoring flagged conflicts. When SERP data disagrees with your strategy, look at the results yourself before deciding.
  • Treating volume labels as data. In the blog plan, volume estimates are relative (high, medium, low), not real search volumes. Use a keyword data source for precise numbers.

FAQ

What is keyword clustering in SEO?

Keyword clustering groups search terms that one page can satisfy. The most reliable method compares search results: keywords that share many of the same top-10 pages get one page, and keywords with little overlap get separate pages.

How many shared results mean two keywords belong on one page?

/claudeseo cluster merges two keywords into one page when they share 7 to 10 of their top-10 organic results, and groups them in the same cluster at 4 to 6. At 2 to 3 shared results, they go in adjacent clusters with cross-links.

How many posts should a topic cluster have?

The skills plan one pillar page plus 2 to 5 clusters, each with 2 to 4 spoke posts. The pillar targets 2,500 to 4,000 words and each spoke 1,200 to 1,800 words.

Is SERP overlap better than semantic similarity for clustering?

SERP overlap is the stronger signal for deciding which keywords share a page, because it reflects how Google actually ranks them. Semantic similarity is faster and good for candidate groups, but it can merge keywords with different intents.

Can Claude Code write a whole topic cluster?

Yes, with the Claude Blog suite. /claudeblog cluster execute writes the pillar and every spoke from an approved plan, fills in internal links as posts are created, and produces a scorecard. Without Claude Blog, /claudeseo cluster execute writes a brief for each post instead.