Blog Cluster (Semantic Topic Cluster Engine)
Plans and executes entire interlinked content ecosystems from a single seed
keyword. Three layers: Semantic Clustering (the brain), Cluster Architecture
(the structure), and Execution Engine (the machine).
Adapted from the
semantic-cluster-engine submission by Lutfiya Miller
(winner, AI Marketing Hub Pro Challenge, March 2026, 95/100 Exemplary).
Original repository:
https://github.com/Drfiya/semantic-cluster-engine
This port keeps the Plan + Execute architecture and the cluster context
innovation, removes brand-specific (ScienceExperts.ai) styling and image
prompts, and routes through claude-blog's existing sub-skills.
Commands
| Command | What it does |
|---|
| Interactive. Asks whether to plan or execute. |
/blog cluster plan <seed-keyword>
| SERP-based semantic analysis. Outputs cluster plan + map. |
/blog cluster plan --from strategy [path]
| Imports existing cluster build plan and validates against SERP data. |
/blog cluster execute [path-to-plan]
| Sequential calls with cluster context and auto-interlinks. |
Key references (load on demand)
references/semantic-clustering.md
(SERP overlap analysis, intent classification, keyword universe expansion)
references/cluster-architecture.md
(hub-and-spoke specs, schema strategy, link-density rules)
references/execution-workflow.md
(execution order, context injection, scorecard, failure handling)
Cross-references to existing claude-blog skills
| Skill | When this skill calls it |
|---|
| Upstream planning. consumes its Cluster Build Plan tables. |
| Per-post execution. Each spoke and the pillar are produced by with a prepended cluster-context block. |
| Invoked internally by for inline SVG charts. No direct call from this skill. |
| Optional hero image generation per post (graceful fallback if is not configured). |
| Recommended after execution for per-post on-page validation. |
| Recommended after execution to confirm zero keyword overlap across the cluster. |
| Recommended after execution to add , , and schema. |
This skill never modifies files belonging to other skills. It calls them via the Task tool or as orchestrated sub-skills.
Command Routing
- Parse the user's command to determine the sub-command.
- If the user typed only , ask: "Would you like to plan a new cluster or execute an existing plan?"
- Route:
- to the Plan Phase (below)
plan --from strategy [path]
to the Strategy Import flow (below)
- , , or to the Execute Phase (below)
Plan Phase: /blog cluster plan <seed-keyword>
Reference:
references/semantic-clustering.md
Step 1. Seed keyword expansion
Use WebSearch to expand the seed into a keyword universe of 30 to 50 phrases:
- Direct search of to capture related searches and "People also ask".
- Long-tail expansion: , , , , , , .
- Question mining: , , , .
- Intent variants: add commercial modifiers (best, top, review, comparison, pricing), informational modifiers (guide, tutorial, explained, examples), and transactional modifiers (buy, download, tool, software, service).
- Year freshness: .
Step 2. Semantic clustering
Group the expanded keywords using the priority rules in
references/semantic-clustering.md
:
- SERP Overlap Analysis is the primary signal. Two keywords with 5 or more shared top-10 results target the same intent and belong in one post.
- Intent Classification assigns each keyword to informational, commercial, transactional, or navigational.
- Entity Mapping identifies the people, products, frameworks, and organizations Google associates with the topic.
- Grouping combines keywords that share intent and topical proximity. Each group becomes one branch of the hub and spoke.
Step 3. Cluster architecture design
Reference:
references/cluster-architecture.md
Build the hub and spoke:
- Pillar (hub): targets the broadest keyword. Word count 2,500 to 4,000. Template . Links down to every spoke.
- Spokes: each targets a long-tail cluster. Word count 1,200 to 1,800. Template auto-selected by intent. Links up to the pillar and across to siblings.
Cluster formation rules:
- 2 to 5 clusters per pillar.
- 2 to 4 spokes per cluster.
- Total: 1 pillar plus 5 to 15 spokes.
- Every spoke targets a unique primary keyword (zero cannibalization).
Step 4. Internal link matrix
- to Pillar (always; anchor text uses the pillar's primary keyword).
- Pillar to (always; anchor text uses 's primary keyword).
- to other spokes in the same cluster (2 to 3 links each, contextual anchors).
- to spokes in adjacent clusters (0 to 1 links, only when semantically relevant).
Verify every spoke has at least 3 incoming links. Count total planned interlinks.
Step 5. Generate output files
All plan and execute artifacts go into a single subdirectory of the current working directory:
<cwd>/
└── cluster-<seed-keyword-slug>/
├── cluster-plan.json
├── cluster-map.html
├── pillar-<slug>.md (Execute Phase)
├── <spoke-slug>.md (Execute Phase, one per spoke)
└── cluster-scorecard.md (Execute Phase)
schema
json
{
"seed_keyword": "<seed>",
"generated_at": "YYYY-MM-DDTHH:MM:SSZ",
"pillar": {
"id": "P",
"title": "Title of the pillar",
"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": "Post 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
}
Note: volume estimates are relative indicators (high, medium, low) derived from SERP signals, not absolute search volumes. For precise data, the user should consult Ahrefs, SEMrush, or DataForSEO (claude-blog provides the
companion sibling).
(XSS-safe)
A static, self-contained HTML file with an embedded SVG visualization. Hard rules for the writer:
- No inline blocks. No , , or any event attributes anywhere in the document.
- No external script references.
- Every text label drawn into the SVG (titles, keywords, cluster names) must be escaped: replace with , with , with , with , and with before insertion.
- Hover effects use CSS only. No JavaScript.
- Use child elements inside SVG nodes for accessible tooltips (browser native, no script).
The map shows: a central pillar node, color-coded cluster groups radiating outward, spoke nodes within each cluster, and link lines connecting related nodes.
Step 6. Present plan to user
Show a summary table of clusters and posts, total interlinks, estimated words, and the file paths. Ask for confirmation before proceeding to execution. Wait for explicit user approval. Do not auto-execute.
Strategy Import: /blog cluster plan --from strategy [path]
Bridges
output into a cluster plan.
- Locate strategy output. Scan the current directory (or the user-specified path) for a file containing a table with the columns
# | Spoke Topic | Template | Target Keyword | Word Count | Internal Links
(the format produced by ).
- Parse the table. Extract the pillar row (marked ), the spoke rows, template assignments, target keywords, word counts, and link relationships.
- Validate and enrich. Run SERP overlap validation (Plan Phase Step 2) on each keyword. Add volume estimates and verify cluster groupings semantically.
- If SERP data contradicts the strategy table, flag the conflict; do not silently override the user's strategic intent.
- Generate and using the same outputs as the standard Plan Phase.
- Present the converted plan with any SERP-based adjustments highlighted, and wait for user confirmation.
Execute Phase: /blog cluster execute [path-to-plan]
Reference:
references/execution-workflow.md
Step 1. Load plan
Read
from the user-specified path or the most recent
cluster-*/cluster-plan.json
in the working directory. Validate JSON structure. If no plan exists, return: "No cluster plan found. Run
/blog cluster plan <seed-keyword>
first."
Step 2. Determine execution order
- Pillar page first (so spokes can link to a known filename).
- Then spokes, ordered by
(cluster priority, search_volume_estimate desc, post id alphabetical)
. Cluster priority is the sum of estimated volumes within the cluster (highest first).
- Alternating between clusters when more than 2 clusters exist diversifies the early content spread.
Step 3. For each post: build cluster context and call
Construct the cluster context block (full schema in
references/execution-workflow.md
) and prepend it to the topic prompt passed to the Task tool invoking
. The context tells
the cluster name, the post's role (pillar or spoke), the primary and secondary keywords, the chosen template, the word count target, the list of already-written posts (link to these), the list of upcoming posts (use
placeholders), and the linking requirements for this post.
FLOW evidence triple propagation (required). The cluster context must include this directive for every spoke and the pillar: "Apply the FLOW evidence triple to every public statistic. Year anchor in prose ('In 2026,'), inline citation with publisher and title, URL with retrieval date in the source block. Drop unverifiable stats. Replace contradicted ones."
This cascade is required because cluster execution is a high-leverage operation (5 to 15 posts at once). Without explicit propagation, individual spokes could silently skip evidence discipline. See
skills/blog/references/flow-alignment.md
.
The context also instructs
to run autonomously: skip topic clarification, skip outline approval, do not auto-detect template, do not pause.
Output format: standard markdown (
) by default, matching
's default. If the user explicitly requests HTML, set the platform target accordingly. Do not impose any brand-specific CSS or wordmark; that is the user's responsibility downstream.
Step 4. Per-post optional hero image
If
is configured, call
via the Task tool to produce a 16:9 hero image for the post and place it in
cluster-<slug>/images/<post-slug>-hero.png
. Insert a standard markdown image reference in the post's frontmatter (
) and at the top of the body. If the MCP is unavailable or fails, log a warning and continue without images. Image generation is non-blocking.
Step 5. Backward link injection
After each post is written:
- Scan all previously written posts in the cluster directory for
[INTERNAL-LINK: keyword -> filename.md]
markers that reference the just-written post.
- Replace each match with a real markdown link: .
- Add a cluster metadata block to the post's frontmatter on first pass (, , ).
Step 6. Failure handling
If
fails for a single post (timeout, error, or quality gate fail), log the failure and continue with remaining posts. Do not abort the cluster. The scorecard will mark the gap and recommend a retry with
invoked manually for that post.
If the user cancels mid-execution, save progress and note completed posts. On the next
, detect already-written files and resume from the next unwritten post.
Step 7. Generate
After all attempted posts complete, produce a markdown scorecard covering:
- Per-post status (written, failed, skipped) with file path and word count.
- Per-post quality score (call on each in parallel) and the cluster average.
- Cluster cohesion score: a 0 to 100 composite of link reciprocity, intent diversity, template diversity, and keyword coverage (formula in
references/execution-workflow.md
).
- Internal-link audit: outgoing and incoming counts per post, orphan flags, unresolved markers.
- Cannibalization check: any two posts sharing primary keyword, or any pair with greater than 70% keyword overlap. Recommend running for a deeper pass.
- Image generation summary: hero images generated vs. skipped.
- Recommended next actions: schema generation (), per-post SEO validation (), repurposing ().
Step 8. Final report
Return a concise summary to the user with totals, the scorecard path, and the next-action commands.
Output Artifacts (summary)
| File | Phase | Format |
|---|
| Plan | JSON |
| Plan | Static HTML + inline SVG, no JavaScript |
| Execute | Markdown (or platform-detected format) |
| Execute | Markdown (or platform-detected format) |
images/<post-slug>-hero.png
| Execute (optional) | PNG via |
| Execute | Markdown |
Quality Gates
| Gate | Check | Action on fail |
|---|
| Cluster minimum | At least 2 clusters with at least 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 or more incoming internal links | Warn in scorecard |
| Word count | Pillar at least 2,500 words; spokes at least 1,200 words | Pass to as a hard constraint |
| Intent diversity | At least 2 distinct intents across clusters | Warn in scorecard |
| Template diversity | At least 3 distinct templates across the cluster | Warn in scorecard |
Error Handling
| Scenario | Action |
|---|
| Seed keyword too broad (more than 50 keyword variants) | Suggest narrowing the focus before clustering. |
| Seed keyword too narrow (fewer than 5 keyword variants) | Offer a smaller cluster (pillar plus 2 to 3 spokes) or suggest broadening. |
| WebSearch unavailable | Fall back to Claude's reasoning for keyword expansion and grouping. Note the reduced accuracy in the scorecard. |
| fails for one post | Log, skip, continue. Mark the gap in the scorecard. |
| not installed | Return: "blog-cluster requires claude-blog. Install it before running this skill." |
| malformed | Validate JSON and report parse errors with line numbers. |
| User cancels execution | Save progress; resume on next invocation with already-written posts auto-detected. |
| not configured | Skip hero image generation; warn once at start of execute, not per post. |
Differentiation from related claude-blog skills
| Skill | Role | What blog-cluster adds |
|---|
| Plans 3 to 5 content pillars and draws hub-and-spoke diagrams as a strategic exercise | Performs SERP-based semantic clustering, then executes the plan into real, interlinked posts. |
| Schedules publication dates around topic clusters | Does not build clusters or write posts; this skill does both. |
| Detects keyword overlap in existing content | Diagnostic only. blog-cluster prevents cannibalization at the planning stage. |
| Writes one post at a time | blog-cluster orchestrates many calls with shared cluster context and bidirectional linking. |
| Generates a single SERP-informed outline | blog-cluster generates an outline-equivalent across an entire cluster, then writes the posts. |
blog-cluster is the general contractor: it analyzes the topic, draws the data-driven plan, and builds the entire structure from a single seed keyword.