New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Semantic topic cluster planning and automated execution

Blog Cluster (Semantic Topic Cluster Engine)

by AgriciDaniel · MIT license · ★ 2,219 on GitHub · updated Sep 18

Blog Cluster (Semantic Topic Cluster Engine) cover

Semantic topic cluster planning and automated execution engine for claude-blog. Performs SERP-based keyword research, groups keywords by search intent and SERP overlap, builds a hub-and-spoke cluster architecture, generates an…

---
name: blog-cluster
description: >
  Semantic topic cluster planning and automated execution engine for claude-blog.
  Performs SERP-based keyword research, groups keywords by search intent and
  SERP overlap, builds a hub-and-spoke cluster architecture, generates an
  interactive SVG cluster map, and executes the full cluster by orchestrating
  blog-write calls with shared cluster context and automatic internal-link
  injection. Fills the strategy-to-execution gap: blog-strategy plans the
  blueprint, blog-cluster builds the house.
  Use when user says "blog cluster", "topic cluster", "content cluster",
  "cluster plan", "cluster execute", "pillar content", "hub and spoke",
  "content ecosystem", "cluster map".
license: MIT
compatibility: Requires Claude Code and claude-blog (provides blog-write, blog-chart, blog-image)
metadata:
  author: AgriciDaniel
  version: "2.2.0"

Overview

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).

Manual install (npx, ZIP)
Claude Codenpx skills add AgriciDaniel/claude-blog --skill blog-cluster -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/AgriciDaniel/claude-blog/tar.gz/2500d4c76503 \ | tar -xz -C ~/.claude/skills --strip-components=2 claude-blog-2500d4c76503/skills/blog-cluster
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/3d7886dce2d1bca4705c/blog-cluster.zip" -OutFile "$env:TEMP\blog-cluster.zip"; Expand-Archive "$env:TEMP\blog-cluster.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md19.0 KB
  • references/3 files · 26.7 KB
Read the files here
AgriciDaniel/2500d4c4 files
Shared references1SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text340 lines

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
/blog cluster 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 blog-strategy cluster build plan and validates against SERP data.
/blog cluster execute [path-to-plan] Sequential blog-write 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
/blog strategy Upstream planning. plan --from strategy consumes its Cluster Build Plan tables.
/blog write Per-post execution. Each spoke and the pillar are produced by blog-write with a prepended cluster-context block.
/blog chart Invoked internally by blog-write for inline SVG charts. No direct call from this skill.
/blog image Optional hero image generation per post. Model selection is delegated to blog-image; prefer current Gemini image models when available.
/blog seo-check Recommended after execution for per-post on-page validation.
/blog cannibalization Recommended after execution to confirm zero keyword overlap across the cluster.
/blog schema Recommended after execution to add BreadcrumbList, ItemList, and Article schema.

This skill never modifies files belonging to other skills. It calls them via the Task tool or as orchestrated sub-skills.

Command Routing

  1. Parse the user's command to determine the sub-command.
  2. If the user typed only /blog cluster, ask: "Would you like to plan a new cluster or execute an existing plan?"
  3. Route:
    • plan <keyword> to the Plan Phase (below)
    • plan --from strategy [path] to the Strategy Import flow (below)
    • execute [path], build, or run 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:

  1. Direct search of <seed> to capture related searches and "People also ask".
  2. Long-tail expansion: <seed> guide, <seed> tips, <seed> tools, <seed> examples, <seed> vs, best <seed>, how to <seed>.
  3. Question mining: what is <seed>, how does <seed> work, why <seed>, <seed> for beginners.
  4. Intent variants: add commercial modifiers (best, top, review, comparison, pricing), informational modifiers (guide, tutorial, explained, examples), and transactional modifiers (buy, download, tool, software, service).
  5. Year freshness: <seed> 2026.
Step 2. Semantic clustering

Group the expanded keywords using the priority rules in references/semantic-clustering.md:

  1. SERP Overlap Analysis is the primary signal. Two keywords with 4 or more shared top-10 results usually target the same intent and should be considered for one post.
  2. Intent Classification assigns each keyword to informational, commercial, transactional, or navigational.
  3. Entity Mapping identifies the people, products, frameworks, and organizations Google associates with the topic.
  4. 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 pillar-page. 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:

  • Normal mode: 2 to 5 clusters per pillar, 2 to 4 spokes per cluster, total 1 pillar plus 5 to 15 spokes.
  • Small-cluster mode: for narrow seeds, allow 1 pillar plus 2 to 4 spokes only after warning the user and asking for confirmation.
  • Every spoke targets a unique primary keyword (zero cannibalization).

For each spoke S:

  • S to Pillar (always; anchor text uses the pillar's primary keyword).
  • Pillar to S (always; anchor text uses S's primary keyword).
  • S to other spokes in the same cluster (2 to 3 links each, contextual anchors).
  • S to spokes in adjacent clusters (0 to 1 links, only when semantically relevant).

Verify every spoke has at least 2 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. Canonicalize the output directory, refuse symlinks, and reject writes outside the cluster directory. Slugs must match lowercase letters, numbers, and hyphens only; reject absolute paths, .., path separators inside slugs, and hidden control characters.

<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)
cluster-plan.json schema
{
  "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 seo-dataforseo companion sibling).

cluster-map.html (XSS-safe)

A static, self-contained HTML file with an embedded SVG visualization. Hard rules for the writer:

  • No inline <script> blocks. No onclick, onmouseover, or any on* event attributes anywhere in the document.
  • No external script <src> references.
  • Every text label drawn into the SVG (titles, keywords, cluster names) must be escaped: replace & with &amp;, < with &lt;, > with &gt;, " with &quot;, and ' with &#39; before insertion.
  • Hover effects use CSS :hover only. No JavaScript.
  • Use <title> 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 blog-strategy output into a cluster plan.

  1. Locate strategy output. Scan the current directory (or the user-specified path) for a file containing a Cluster Build Plan table with the columns # | Spoke Topic | Template | Target Keyword | Word Count | Internal Links (the format produced by /blog strategy).
  2. Parse the table. Extract the pillar row (marked P), the spoke rows, template assignments, target keywords, word counts, and link relationships.
  3. Validate and enrich. Run SERP overlap validation (Plan Phase Step 2) on each keyword. Add volume estimates and verify cluster groupings semantically.
  4. If SERP data contradicts the strategy table, flag the conflict; do not silently override the user's strategic intent.
  5. Generate cluster-plan.json and cluster-map.html using the same outputs as the standard Plan Phase.
  6. 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 cluster-plan.json 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."

Before reading a user-supplied plan path, canonicalize it relative to the current working directory. Reject absolute paths, .., symlinks, non-cluster-plan.json filenames, and any path outside the selected cluster directory. Constrain all generated post, image, map, and scorecard outputs to that cluster directory.

Step 2. Determine execution order
  1. Pillar page first (so spokes can link to a known filename).
  2. 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).
  3. Alternating between clusters when more than 2 clusters exist diversifies the early content spread.
Step 3. For each post: build cluster context and call blog-write

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 blog-write. The context tells blog-write 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 [INTERNAL-LINK] placeholders), and the linking requirements for this post.

Evidence provenance propagation. The cluster context includes this directive for every spoke and the pillar: "Keep material claims traceable to sources that support them. Record dates, publisher/title details, retrieval notes, methodology, and limitations when they help identify or interpret the source. Use the publication's citation style. Drop unverifiable statistics and replace contradicted ones."

This cascade preserves evidence discipline across batch execution without turning a fixed source-record format into a score or gate. See skills/blog/references/flow-alignment.md.

The context also instructs blog-write to run autonomously: skip topic clarification, skip outline approval, do not auto-detect template, do not pause.

Output format: standard markdown (.md) by default, matching blog-write'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 blog-image is available, call /blog image generate 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. Delegate provider selection to blog-image, prefer current Gemini image models when available, and record the model ID in the scorecard. If image generation is unavailable or fails, log a warning and continue without images. Image generation is non-blocking.

After each post is written:

  1. Scan all previously written posts in the cluster directory for [INTERNAL-LINK: keyword -> filename.md] markers that reference the just-written post.
  2. Replace each match with a real markdown link: [keyword](filename.md).
  3. Add a cluster metadata block to the post's frontmatter on first pass (cluster:, cluster_role:, cluster_group:).
Step 6. Failure handling

If blog-write returns a quality-gate failure for any post, stop the batch immediately. Save progress, mark the failed post and all remaining posts as skipped, and tell the user to inspect or retry the failed post manually before continuing. Do not keep generating 5 to 15 posts after a quality failure, because that can create scaled-content-abuse risk.

If blog-write fails before content is generated because of a timeout or runtime error, log the failure in the scorecard and stop unless the user explicitly resumes after checking the cause.

If the user cancels mid-execution, save progress and note completed posts. On the next /blog cluster execute, detect already-written files and resume from the next unwritten post.

Step 7. Generate cluster-scorecard.md

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 /blog analyze on each in parallel via Task) 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 [INTERNAL-LINK] markers.
  • Cannibalization check: any two posts sharing primary keyword, or any pair with greater than 70% keyword overlap. Recommend running /blog cannibalization for a deeper pass.
  • Image generation summary: hero images generated vs. skipped.
  • Recommended next actions: schema generation (/blog schema), per-post SEO validation (/blog seo-check), repurposing (/blog repurpose).
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
cluster-plan.json Plan JSON
cluster-map.html Plan Static HTML + inline SVG, no JavaScript
pillar-<slug>.md Execute Markdown (or platform-detected format)
<spoke-slug>.md Execute Markdown (or platform-detected format)
images/<post-slug>-hero.png Execute (optional) PNG via blog-image
cluster-scorecard.md 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 2 or more incoming internal links Warn in scorecard
Length estimate Pillars often need more depth than spokes Pass to blog-write as optional planning context; never enforce a raw word minimum
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 Produce a draft plan only and require user confirmation, imported keyword data, or SERP data before execution.
blog-write fails a quality gate or content generation Stop the batch, save progress, mark remaining posts as skipped, and require manual inspection or explicit resume.
blog-write not installed Return: "blog-cluster requires claude-blog. Install it before running this skill."
cluster-plan.json 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.
Optional image generation unavailable or failed Skip hero image generation; warn once at start of execute, not per post.

Skill Role What blog-cluster adds
blog-strategy 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.
blog-calendar Schedules publication dates around topic clusters Does not build clusters or write posts; this skill does both.
blog-cannibalization Detects keyword overlap in existing content Diagnostic only. blog-cluster prevents cannibalization at the planning stage.
blog-write Writes one post at a time blog-cluster orchestrates many blog-write calls with shared cluster context and bidirectional linking.
blog-outline 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.

1---
2name: blog-cluster
3description: >
4 Semantic topic cluster planning and automated execution engine for claude-blog.
5 Performs SERP-based keyword research, groups keywords by search intent and
6 SERP overlap, builds a hub-and-spoke cluster architecture, generates an
7 interactive SVG cluster map, and executes the full cluster by orchestrating
8 blog-write calls with shared cluster context and automatic internal-link
9 injection. Fills the strategy-to-execution gap: blog-strategy plans the
10 blueprint, blog-cluster builds the house.
11 Use when user says "blog cluster", "topic cluster", "content cluster",
12 "cluster plan", "cluster execute", "pillar content", "hub and spoke",
13 "content ecosystem", "cluster map".
14license: MIT
15compatibility: Requires Claude Code and claude-blog (provides blog-write, blog-chart, blog-image)
16metadata:
17 author: AgriciDaniel
18 version: "2.2.0"
19 category: blog
20user-invokable: true
21argument-hint: "[plan|execute] [seed-keyword|cluster-plan.json]"
22---
23 
24# Blog Cluster (Semantic Topic Cluster Engine)
25 
26Plans and executes entire interlinked content ecosystems from a single seed
27keyword. Three layers: Semantic Clustering (the brain), Cluster Architecture
28(the structure), and Execution Engine (the machine).
29 
30> Adapted from the **semantic-cluster-engine** submission by Lutfiya Miller
31> (winner, AI Marketing Hub Pro Challenge, March 2026, 95/100 Exemplary).
32> Original repository: https://github.com/Drfiya/semantic-cluster-engine
33> This port keeps the Plan + Execute architecture and the cluster context
34> innovation, removes brand-specific (ScienceExperts.ai) styling and image
35> prompts, and routes through claude-blog's existing sub-skills.
36 
37## Commands
38 
39| Command | What it does |
40|---------|--------------|
41| `/blog cluster` | Interactive. Asks whether to plan or execute. |
42| `/blog cluster plan <seed-keyword>` | SERP-based semantic analysis. Outputs cluster plan + map. |
43| `/blog cluster plan --from strategy [path]` | Imports existing `blog-strategy` cluster build plan and validates against SERP data. |
44| `/blog cluster execute [path-to-plan]` | Sequential `blog-write` calls with cluster context and auto-interlinks. |
45 
46## Key references (load on demand)
47 
48- `references/semantic-clustering.md` (SERP overlap analysis, intent classification, keyword universe expansion)
49- `references/cluster-architecture.md` (hub-and-spoke specs, schema strategy, link-density rules)
50- `references/execution-workflow.md` (execution order, context injection, scorecard, failure handling)
51 
52## Cross-references to existing claude-blog skills
53 
54| Skill | When this skill calls it |
55|-------|--------------------------|
56| `/blog strategy` | Upstream planning. `plan --from strategy` consumes its Cluster Build Plan tables. |
57| `/blog write` | Per-post execution. Each spoke and the pillar are produced by `blog-write` with a prepended cluster-context block. |
58| `/blog chart` | Invoked internally by `blog-write` for inline SVG charts. No direct call from this skill. |
59| `/blog image` | Optional hero image generation per post. Model selection is delegated to `blog-image`; prefer current Gemini image models when available. |
60| `/blog seo-check` | Recommended after execution for per-post on-page validation. |
61| `/blog cannibalization` | Recommended after execution to confirm zero keyword overlap across the cluster. |
62| `/blog schema` | Recommended after execution to add `BreadcrumbList`, `ItemList`, and `Article` schema. |
63 
64This skill never modifies files belonging to other skills. It calls them via the Task tool or as orchestrated sub-skills.
65 
66## Command Routing
67 
681. Parse the user's command to determine the sub-command.
692. If the user typed only `/blog cluster`, ask: "Would you like to **plan** a new cluster or **execute** an existing plan?"
703. Route:
71 - `plan <keyword>` to the Plan Phase (below)
72 - `plan --from strategy [path]` to the Strategy Import flow (below)
73 - `execute [path]`, `build`, or `run` to the Execute Phase (below)
74 
75---
76 
77## Plan Phase: `/blog cluster plan <seed-keyword>`
78 
79Reference: `references/semantic-clustering.md`
80 
81### Step 1. Seed keyword expansion
82 
83Use WebSearch to expand the seed into a keyword universe of 30 to 50 phrases:
84 
851. Direct search of `<seed>` to capture related searches and "People also ask".
862. Long-tail expansion: `<seed> guide`, `<seed> tips`, `<seed> tools`, `<seed> examples`, `<seed> vs`, `best <seed>`, `how to <seed>`.
873. Question mining: `what is <seed>`, `how does <seed> work`, `why <seed>`, `<seed> for beginners`.
884. Intent variants: add commercial modifiers (best, top, review, comparison, pricing), informational modifiers (guide, tutorial, explained, examples), and transactional modifiers (buy, download, tool, software, service).
895. Year freshness: `<seed> 2026`.
90 
91### Step 2. Semantic clustering
92 
93Group the expanded keywords using the priority rules in `references/semantic-clustering.md`:
94 
951. **SERP Overlap Analysis** is the primary signal. Two keywords with 4 or more shared top-10 results usually target the same intent and should be considered for one post.
962. **Intent Classification** assigns each keyword to informational, commercial, transactional, or navigational.
973. **Entity Mapping** identifies the people, products, frameworks, and organizations Google associates with the topic.
984. **Grouping** combines keywords that share intent and topical proximity. Each group becomes one branch of the hub and spoke.
99 
100### Step 3. Cluster architecture design
101 
102Reference: `references/cluster-architecture.md`
103 
104Build the hub and spoke:
105 
106- **Pillar (hub)**: targets the broadest keyword. Word count 2,500 to 4,000. Template `pillar-page`. Links down to every spoke.
107- **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.
108 
109Cluster formation rules:
110 
111- Normal mode: 2 to 5 clusters per pillar, 2 to 4 spokes per cluster, total 1 pillar plus 5 to 15 spokes.
112- Small-cluster mode: for narrow seeds, allow 1 pillar plus 2 to 4 spokes only after warning the user and asking for confirmation.
113- Every spoke targets a unique primary keyword (zero cannibalization).
114 
115### Step 4. Internal link matrix
116 
117For each spoke `S`:
118 
119- `S` to Pillar (always; anchor text uses the pillar's primary keyword).
120- Pillar to `S` (always; anchor text uses `S`'s primary keyword).
121- `S` to other spokes in the same cluster (2 to 3 links each, contextual anchors).
122- `S` to spokes in adjacent clusters (0 to 1 links, only when semantically relevant).
123 
124Verify every spoke has at least 2 incoming links. Count total planned interlinks.
125 
126### Step 5. Generate output files
127 
128All plan and execute artifacts go into a single subdirectory of the current working directory. Canonicalize the output directory, refuse symlinks, and reject writes outside the cluster directory. Slugs must match lowercase letters, numbers, and hyphens only; reject absolute paths, `..`, path separators inside slugs, and hidden control characters.
129 
130```
131<cwd>/
132└── cluster-<seed-keyword-slug>/
133 ├── cluster-plan.json
134 ├── cluster-map.html
135 ├── pillar-<slug>.md (Execute Phase)
136 ├── <spoke-slug>.md (Execute Phase, one per spoke)
137 └── cluster-scorecard.md (Execute Phase)
138```
139 
140#### `cluster-plan.json` schema
141 
142```json
143{
144 "seed_keyword": "<seed>",
145 "generated_at": "YYYY-MM-DDTHH:MM:SSZ",
146 "pillar": {
147 "id": "P",
148 "title": "Title of the pillar",
149 "primary_keyword": "broadest keyword",
150 "secondary_keywords": ["..."],
151 "search_volume_estimate": "high|medium|low",
152 "template": "pillar-page",
153 "word_count_target": 3000,
154 "cluster": "pillar"
155 },
156 "clusters": [
157 {
158 "name": "Cluster A: Theme",
159 "intent": "informational|commercial|transactional",
160 "color": "#2563eb",
161 "posts": [
162 {
163 "id": "A1",
164 "title": "Post title",
165 "primary_keyword": "long-tail keyword",
166 "secondary_keywords": ["..."],
167 "search_volume_estimate": "high|medium|low",
168 "template": "how-to-guide",
169 "word_count_target": 1500,
170 "links_to": ["P", "A2"],
171 "links_from": ["P", "A2"]
172 }
173 ]
174 }
175 ],
176 "total_posts": 9,
177 "total_interlinks": 23,
178 "estimated_total_words": 18000
179}
180```
181 
182Note: 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 `seo-dataforseo` companion sibling).
183 
184#### `cluster-map.html` (XSS-safe)
185 
186A static, self-contained HTML file with an embedded SVG visualization. Hard rules for the writer:
187 
188- No inline `<script>` blocks. No `onclick`, `onmouseover`, or any `on*` event attributes anywhere in the document.
189- No external script `<src>` references.
190- Every text label drawn into the SVG (titles, keywords, cluster names) must be escaped: replace `&` with `&amp;`, `<` with `&lt;`, `>` with `&gt;`, `"` with `&quot;`, and `'` with `&#39;` before insertion.
191- Hover effects use CSS `:hover` only. No JavaScript.
192- Use `<title>` child elements inside SVG nodes for accessible tooltips (browser native, no script).
193 
194The map shows: a central pillar node, color-coded cluster groups radiating outward, spoke nodes within each cluster, and link lines connecting related nodes.
195 
196### Step 6. Present plan to user
197 
198Show 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.
199 
200---
201 
202## Strategy Import: `/blog cluster plan --from strategy [path]`
203 
204Bridges `blog-strategy` output into a cluster plan.
205 
2061. Locate strategy output. Scan the current directory (or the user-specified path) for a file containing a `Cluster Build Plan` table with the columns `# | Spoke Topic | Template | Target Keyword | Word Count | Internal Links` (the format produced by `/blog strategy`).
2072. Parse the table. Extract the pillar row (marked `P`), the spoke rows, template assignments, target keywords, word counts, and link relationships.
2083. Validate and enrich. Run SERP overlap validation (Plan Phase Step 2) on each keyword. Add volume estimates and verify cluster groupings semantically.
2094. If SERP data contradicts the strategy table, flag the conflict; do not silently override the user's strategic intent.
2105. Generate `cluster-plan.json` and `cluster-map.html` using the same outputs as the standard Plan Phase.
2116. Present the converted plan with any SERP-based adjustments highlighted, and wait for user confirmation.
212 
213---
214 
215## Execute Phase: `/blog cluster execute [path-to-plan]`
216 
217Reference: `references/execution-workflow.md`
218 
219### Step 1. Load plan
220 
221Read `cluster-plan.json` 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."
222 
223Before reading a user-supplied plan path, canonicalize it relative to the current working directory. Reject absolute paths, `..`, symlinks, non-`cluster-plan.json` filenames, and any path outside the selected cluster directory. Constrain all generated post, image, map, and scorecard outputs to that cluster directory.
224 
225### Step 2. Determine execution order
226 
2271. Pillar page first (so spokes can link to a known filename).
2282. 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).
2293. Alternating between clusters when more than 2 clusters exist diversifies the early content spread.
230 
231### Step 3. For each post: build cluster context and call `blog-write`
232 
233Construct the cluster context block (full schema in `references/execution-workflow.md`) and prepend it to the topic prompt passed to the Task tool invoking `blog-write`. The context tells `blog-write` 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 `[INTERNAL-LINK]` placeholders), and the linking requirements for this post.
234 
235**Evidence provenance propagation.** The cluster context includes this directive
236for every spoke and the pillar: "Keep material claims traceable to sources that
237support them. Record dates, publisher/title details, retrieval notes,
238methodology, and limitations when they help identify or interpret the source.
239Use the publication's citation style. Drop unverifiable statistics and replace
240contradicted ones."
241 
242This cascade preserves evidence discipline across batch execution without
243turning a fixed source-record format into a score or gate. See
244`skills/blog/references/flow-alignment.md`.
245 
246The context also instructs `blog-write` to run autonomously: skip topic clarification, skip outline approval, do not auto-detect template, do not pause.
247 
248Output format: standard markdown (`.md`) by default, matching `blog-write`'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.
249 
250### Step 4. Per-post optional hero image
251 
252If `blog-image` is available, call `/blog image generate` 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`. Delegate provider selection to `blog-image`, prefer current Gemini image models when available, and record the model ID in the scorecard. If image generation is unavailable or fails, log a warning and continue without images. Image generation is non-blocking.
253 
254### Step 5. Backward link injection
255 
256After each post is written:
257 
2581. Scan all previously written posts in the cluster directory for `[INTERNAL-LINK: keyword -> filename.md]` markers that reference the just-written post.
2592. Replace each match with a real markdown link: `[keyword](filename.md)`.
2603. Add a cluster metadata block to the post's frontmatter on first pass (`cluster:`, `cluster_role:`, `cluster_group:`).
261 
262### Step 6. Failure handling
263 
264If `blog-write` returns a quality-gate failure for any post, stop the batch immediately. Save progress, mark the failed post and all remaining posts as skipped, and tell the user to inspect or retry the failed post manually before continuing. Do not keep generating 5 to 15 posts after a quality failure, because that can create scaled-content-abuse risk.
265 
266If `blog-write` fails before content is generated because of a timeout or runtime error, log the failure in the scorecard and stop unless the user explicitly resumes after checking the cause.
267 
268If the user cancels mid-execution, save progress and note completed posts. On the next `/blog cluster execute`, detect already-written files and resume from the next unwritten post.
269 
270### Step 7. Generate `cluster-scorecard.md`
271 
272After all attempted posts complete, produce a markdown scorecard covering:
273 
274- Per-post status (written, failed, skipped) with file path and word count.
275- Per-post quality score (call `/blog analyze` on each in parallel via Task) and the cluster average.
276- Cluster cohesion score: a 0 to 100 composite of link reciprocity, intent diversity, template diversity, and keyword coverage (formula in `references/execution-workflow.md`).
277- Internal-link audit: outgoing and incoming counts per post, orphan flags, unresolved `[INTERNAL-LINK]` markers.
278- Cannibalization check: any two posts sharing primary keyword, or any pair with greater than 70% keyword overlap. Recommend running `/blog cannibalization` for a deeper pass.
279- Image generation summary: hero images generated vs. skipped.
280- Recommended next actions: schema generation (`/blog schema`), per-post SEO validation (`/blog seo-check`), repurposing (`/blog repurpose`).
281 
282### Step 8. Final report
283 
284Return a concise summary to the user with totals, the scorecard path, and the next-action commands.
285 
286---
287 
288## Output Artifacts (summary)
289 
290| File | Phase | Format |
291|------|-------|--------|
292| `cluster-plan.json` | Plan | JSON |
293| `cluster-map.html` | Plan | Static HTML + inline SVG, no JavaScript |
294| `pillar-<slug>.md` | Execute | Markdown (or platform-detected format) |
295| `<spoke-slug>.md` | Execute | Markdown (or platform-detected format) |
296| `images/<post-slug>-hero.png` | Execute (optional) | PNG via `blog-image` |
297| `cluster-scorecard.md` | Execute | Markdown |
298 
299---
300 
301## Quality Gates
302 
303| Gate | Check | Action on fail |
304|------|-------|----------------|
305| Cluster minimum | At least 2 clusters with at least 2 posts each | Warn during plan; suggest expansion |
306| Cannibalization | No two posts share primary keyword | Block execution; require plan adjustment |
307| Link completeness | Every post has 2 or more incoming internal links | Warn in scorecard |
308| Length estimate | Pillars often need more depth than spokes | Pass to `blog-write` as optional planning context; never enforce a raw word minimum |
309| Intent diversity | At least 2 distinct intents across clusters | Warn in scorecard |
310| Template diversity | At least 3 distinct templates across the cluster | Warn in scorecard |
311 
312---
313 
314## Error Handling
315 
316| Scenario | Action |
317|----------|--------|
318| Seed keyword too broad (more than 50 keyword variants) | Suggest narrowing the focus before clustering. |
319| Seed keyword too narrow (fewer than 5 keyword variants) | Offer a smaller cluster (pillar plus 2 to 3 spokes) or suggest broadening. |
320| WebSearch unavailable | Produce a draft plan only and require user confirmation, imported keyword data, or SERP data before execution. |
321| `blog-write` fails a quality gate or content generation | Stop the batch, save progress, mark remaining posts as skipped, and require manual inspection or explicit resume. |
322| `blog-write` not installed | Return: "blog-cluster requires claude-blog. Install it before running this skill." |
323| `cluster-plan.json` malformed | Validate JSON and report parse errors with line numbers. |
324| User cancels execution | Save progress; resume on next invocation with already-written posts auto-detected. |
325| Optional image generation unavailable or failed | Skip hero image generation; warn once at start of execute, not per post. |
326 
327---
328 
329## Differentiation from related claude-blog skills
330 
331| Skill | Role | What blog-cluster adds |
332|-------|------|------------------------|
333| `blog-strategy` | 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. |
334| `blog-calendar` | Schedules publication dates around topic clusters | Does not build clusters or write posts; this skill does both. |
335| `blog-cannibalization` | Detects keyword overlap in existing content | Diagnostic only. blog-cluster prevents cannibalization at the planning stage. |
336| `blog-write` | Writes one post at a time | blog-cluster orchestrates many `blog-write` calls with shared cluster context and bidirectional linking. |
337| `blog-outline` | Generates a single SERP-informed outline | blog-cluster generates an outline-equivalent across an entire cluster, then writes the posts. |
338 
339blog-cluster is the general contractor: it analyzes the topic, draws the data-driven plan, and builds the entire structure from a single seed keyword.
340 
View all files on GitHub →

Details

Updated
Sep 18, 2026
License
MIT
Stars on the repo
★ 2,219
Checked
Source
AgriciDaniel/claude-blog ↗
Creator
AgriciDaniel · 130 listings
View creator

Made with blog-cluster

Blog Cluster (Semantic Topic Cluster Engine) — claude-blog /blog write demo: end-to-end article generation with the 5-gate Delivery Contract (from the AgriciDaniel/claude-blog README)
Blog Cluster (Semantic Topic Cluster Engine) — claude-blog /blog write demo: end-to-end article generation with the 5-gate Delivery Contract (from the AgriciDaniel/claude-blog README)

by AgriciDaniel

Similar skills

See all →
SkillA monthly or weekly content calendar01 content calendar globalminhnv0807/ai-business-skills · by minhnv0807Use when the user needs a monthly or weekly content calendar — posting schedule per channel, funnel ratio, content pillars, repurposing matrix, and an owner per slot. Trigger on 'content calendar', 'posting schedule', 'what should we post this month', 'editorial calendar', 'social media plan', 'we post randomly with no plan'. Also use when the user only says the team keeps running out of things to post. Not for — the brief for one specific post, see `36-content-brief-global`; the caption text itself, see `37-social-caption-global`; deciding next period content from last period data, see `40-next-content-plan-global`; a paid campaign timeline, see `02-campaign-brief-global`.★ 599 GitHub starsSkillGenerate a weekly Facebook Page content plan from a themeFacebook Page Content Plannersergebulaev/facebook-skills · by sergebulaevGenerate a weekly Facebook Page content plan from a theme, audience, and content pillars. Produces per-day picks (short post vs story post, hook formula, angle, posting time, primary goal), a short-to-story post mix, a daily comment-reply target, and a share-optimized goal-mix balance check across shares, comments, and reactions. Use when the user wants to plan a week of Page content. Not for drafting one post (use fb-post-writer) or replying to comments (use fb-engagement-drafter).★ 49 GitHub starsPromptCreate a detailed plan to review guides, blog postsComprehensive content review planf/prompts.chat · by Erkam DemirciCreate a detailed plan to review guides, blog posts, and comparison pages for potential issues, verify them, and implement fixes.New listingPromptCreate a detailed studio beauty editorial close-up shotStudio Beauty Editorial (close-up, pro)f/prompts.chat · by DorukCreate a detailed studio beauty editorial close-up shot prompt. The prompt will include specific instructions on subject demographics, pose, setting, camera details, lighting, and mood to achieve a high-end beauty campaign feel. It will also define technical constraints and negative prompts to avoid unwanted elements.New listingMCPCreates comprehensive content outlines and topic clustersSEO content plannerwshobson/agents · by wshobsonCreates comprehensive content outlines and topic clusters for SEO. Plans content calendars and identifies topic gaps. Use PROACTIVELY for content strategy and planning.★ 39.9k GitHub starsMCPBuilds content engines that rank, convert, and compoundContent strategistalirezarezvani/claude-skills · by alirezarezvaniBuilds content engines that rank, convert, and compound. Thinks in systems — topic clusters, not individual posts. Every piece earns its place or gets killed. Use when content needs to behave like a system rather than a stream of posts — e.g., designing a topic-cluster plan to grow organic traffic from zero, or auditing an editorial calendar and killing pieces that don't convert after 90 days. (For single-asset, on-brand copy production, see cs-content-creator.)★ 26.3k GitHub stars

More from AgriciDaniel

SkillThe Lighthouse Agentic Browsing fractionAgentic Browsing ReadinessAgriciDaniel/claude-seo · by AgriciDanielAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).★ 17.4k GitHub starsSkillOptimize content for AI Overviews , ChatGPT web searchAI Search / GEO Optimization (May 2026)AgriciDaniel/claude-seo · by AgriciDanielOptimize content for AI Overviews (formerly SGE), ChatGPT web search, Perplexity, and other AI-powered search experiences. Generative Engine Optimization (GEO) analysis including brand mention signals, AI crawler accessibility, llms.txt compliance, passage-level citability scoring, and platform-specific optimization. Use when user says "AI Overviews", "SGE", GEO", "AI search", "LLM optimization", "Perplexity", "AI citations", ChatGPT search", or "AI visibility".★ 17.4k GitHub starsSkillReferring domains, anchor text distributionBacklink Profile AnalysisAgriciDaniel/claude-seo · by AgriciDanielBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.★ 17.4k GitHub starsSkillYou share your Amazon advertising numbers and goals; you getAmazon Ads AuditAgriciDaniel/claude-ads · by AgriciDanielYou share your Amazon advertising numbers and goals; you get back a plain-language review of what's draining your budget and what to change first.★ 9.5k GitHub starsSkillPaste what you're spending on Apple Search AdsApple Ads AuditAgriciDaniel/claude-ads · by AgriciDanielPaste what you're spending on Apple Search Ads and your recent numbers; get back a plain review of what's wasting money and what to fix first.★ 9.5k GitHub starsSkillPaste the sales and spend numbers each ad platform claimsAttribution AuditAgriciDaniel/claude-ads · by AgriciDanielPaste the sales and spend numbers each ad platform claims, and get back a plain explanation of why they disagree and which figure to trust.★ 9.5k GitHub stars