/xuanran-seo-blog-writer:topic-clusteringfrom xuanran-seo-blog-writer
Plans and executes pillar-and-spoke content clusters from a seed keyword using SERP-overlap analysis, hub-spoke architecture, and batch article dispatch. Detects cannibalization and generates interactive SVG cluster maps.
Ships in xuanran-seo-blog-writer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Plans + executes entire interlinked content ecosystems from a single seed keyword. Three layers: the brain (semantic clustering), the structure (hub-spoke architecture), the machine (execution engine).
/cluster — interactive (asks plan or execute)/cluster plan <seed-keyword> — SERP-based semantic analysis → cluster plan + map/cluster plan --from strategy <path> — import existing strategic plan + validate against SERP/cluster execute [path-to-plan] — sequential /article calls with cluster context + auto-interlinks/cannibalization — diagnostic-only check on existing portfolio| Subskill | When this calls it |
|---|---|
format-selector | Determines per-spoke article format |
outline-architect | Builds per-spoke outline within cluster context |
batch-article queue | Execute phase enqueues spokes for sequential processing |
internal-linker + cross_article_linker.py | Inject inter-spoke + hub-spoke links post-write |
schema-generator | Add BreadcrumbList, ItemList, Article schema cluster-wide |
seo-content-writer | Per-post content production |
/cluster plan <seed-keyword>Use WebSearch to expand the seed into a keyword universe of 30-50 phrases:
<seed> to capture related searches + "People also ask"<seed> guide, <seed> tips, <seed> tools, <seed> examples, <seed> vs, best <seed>, how to <seed>what is <seed>, how does <seed> work, why <seed>, <seed> for beginners<seed> 2026Group expanded keywords by these priority rules:
SERP overlap thresholds (cannibalization decision matrix):
| Shared top-10 URLs | Decision |
|---|---|
| 7-10 | MERGE — same intent; pick one keyword, drop the others |
| 4-6 | CLUSTER candidate — related; interlink heavily as a spoke pair |
| 2-3 | INTERLINK lightly — adjacent topics |
| 0-1 | SEPARATE topics — no cross-link needed |
Build hub-and-spoke:
pillar-page. Links down to every spoke.Formation rules:
For each spoke S:
S → Pillar (always; anchor text uses the pillar's primary keyword)S (always; anchor text uses S's primary keyword)S → other spokes in the same cluster (2-3 links each, contextual anchors)S → spokes in adjacent clusters (0-1 links, only when semantically relevant)Verify every spoke has ≥3 incoming links. Count total planned interlinks.
All plan + execute artifacts go into a project subdirectory:
projects/{slug}/clusters/<seed-keyword-slug>/
├── cluster-plan.json
├── cluster-map.html (XSS-safe SVG; no JS)
├── pillar-<slug>.md (Execute Phase)
├── <spoke-slug>.md (Execute Phase, one per spoke)
└── cluster-scorecard.md (Execute Phase)
cluster-plan.json schema{
"seed_keyword": "<seed>",
"generated_at": "YYYY-MM-DDTHH:MM:SSZ",
"pillar": {
"id": "P",
"title": "...",
"primary_keyword": "broadest keyword",
"secondary_keywords": ["..."],
"search_volume_estimate": "high|medium|low",
"template": "pillar-page",
"word_count_target": 3000,
"cluster": "pillar"
},
"clusters": [
{
"name": "Cluster A: Theme",
"intent": "informational|commercial|transactional",
"color": "#2563eb",
"posts": [
{
"id": "A1",
"title": "...",
"primary_keyword": "long-tail keyword",
"secondary_keywords": ["..."],
"search_volume_estimate": "high|medium|low",
"template": "how-to-guide",
"word_count_target": 1500,
"links_to": ["P", "A2"],
"links_from": ["P", "A2"]
}
]
}
],
"total_posts": 9,
"total_interlinks": 23,
"estimated_total_words": 18000,
"estimated_total_cost_usd": "22.50"
}
Volume estimates are relative (high/medium/low) from SERP signals — for precise data use DataForSEO via scripts/analysis/dataforseo.py.
cluster-map.html (XSS-safe SVG)Static, self-contained HTML + inline SVG. Hard rules:
<script> blocksonclick, onmouseover, or any on* event attributes<src> references& → &, < → <, > → >, " → ", ' → ':hover only<title> child elements inside SVG nodes (browser-native tooltips, no JS)Map shows: central pillar node, color-coded cluster groups radiating outward, spoke nodes within each cluster, link lines connecting related nodes.
Sum per-post estimated cost (via scripts/_core/cost_estimator.py). Present:
"Cluster plan: pillar + 8 spokes, 18,500 words, 23 interlinks. Estimated total cost: $22.50. Proceed to execute? (Or refine the plan first.)"
Wait for explicit user approval. Do NOT auto-execute.
/cluster execute [path-to-plan]Read cluster-plan.json from user-specified path or most recent clusters/*/cluster-plan.json in the project. Validate JSON structure.
If no plan exists: "No cluster plan found. Run /cluster plan <seed-keyword> first."
(cluster priority desc, search_volume_estimate desc, post id alphabetical)Construct cluster context block, prepend to the brief passed to L1 seo-blog:
cluster_context:
cluster_name: "Cluster A: Theme"
post_role: "spoke" # or "pillar"
primary_keyword: "..."
secondary_keywords: [...]
template: "how-to-guide"
word_count_target: 1500
already_written: ["pillar-x.md", "spoke-a1.md"] # link to these
upcoming: ["spoke-a3.md", "spoke-b1.md"] # use [INTERNAL-LINK] placeholders
link_requirements:
must_link_up_to_pillar: true
must_link_to_cluster_siblings: ["A2"]
optional_links_to: ["B1"]
Add to brief.json + dispatch the full /article pipeline (research → plan → build → optimize → publish → monitor baseline).
FLOW Evidence Triple propagation (required) — cluster context must include:
"Apply FLOW Evidence Triple to every public statistic. Year anchor in prose ('In 2026,'), inline citation with publisher + title, URL with retrieval date in the source block. Drop unverifiable stats. Replace contradicted ones."
This cascade is required because cluster execution is high-leverage (5-15 posts at once). Without explicit propagation, individual spokes could silently skip evidence discipline.
After each post is written:
[INTERNAL-LINK: keyword -> filename.md] markers referencing the just-written post[keyword](filename.md)cluster:, cluster_role:, cluster_group:/article fails for a single post (timeout, error, quality gate fail): log + continue with remaining/article invocation/cluster execute and resumecluster-scorecard.mdAfter all posts complete:
/audit on each in parallel) + cluster average[INTERNAL-LINK] markers/schema, /seo-check, /repurposeConcise summary: totals, scorecard path, next-action commands.
When /cannibalization is invoked WITHOUT planning a new cluster:
projects/{slug}/articles/*/publish-log.json70% keyword overlap → HIGH (differentiate or merge)
projects/{slug}/cannibalization-report-{date}.md with merge/differentiate recommendations| Gate | Check | Action on fail |
|---|---|---|
| Cluster minimum | ≥2 clusters with ≥2 posts each | Warn during plan; suggest expansion |
| Cannibalization | No two posts share primary keyword | BLOCK execution; require plan adjustment |
| Link completeness | Every post has ≥3 incoming internal links | Warn in scorecard |
| Word count | Pillar ≥2,500w; spokes ≥1,200w | Pass to /article as hard constraint |
| Intent diversity | ≥2 distinct intents across clusters | Warn in scorecard |
| Template diversity | ≥3 distinct templates across cluster | Warn in scorecard |
| Scenario | Action |
|---|---|
| Seed too broad (>50 keyword variants) | Suggest narrowing focus before clustering |
| Seed too narrow (<5 keyword variants) | Offer smaller cluster (pillar + 2-3 spokes) or suggest broadening |
| WebSearch unavailable | Fall back to LLM reasoning for keyword expansion; note reduced accuracy |
/article fails for one post | Log, skip, continue; mark gap in scorecard |
cluster-plan.json malformed | Validate + report parse errors with line numbers |
| User cancels mid-execution | Save progress; resume on next invocation with auto-detection |
references/seo/blog-formats-2026.md — per-format word count + template guidescripts/_core/batch_queue.py — execution queuescripts/optimize/cross_article_linker.py — post-write link injectionscripts/analysis/dataforseo.py — for precise volume datasubskills/plan/format-selector/SKILL.md — per-spoke format decisionWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xuanranl/loamwright-seo-skill --plugin xuanran-seo-blog-writer75 skills in this plugin
/ai-overview-recovery4-phase recovery when Google AI Overview drops an article. Measure damage → diagnose skip reason → rewrite → T+7/14/28 monitor. Triggered by drift-detector AIO loss alert OR /aio-recovery command./ai-visibility-trackerActive probe of ChatGPT/PPLX/Claude/Gemini to check if our article is cited. Compares to projects/{slug}/geo-baseline.json. Triggered by /ai-visibility command or daily/weekly schedule./batch-articleRun /article end-to-end for a list of keywords. Each keyword goes through the FULL pipeline (research → plan → build → optimize → publish → monitor baseline). Use for agency-scale operations — drop 10-500 keywords, get 10-500 published articles. Resumable across sessions.Other plugins' skills for the same job