Logo di Topic Clustering

Topic Clustering

Community
XuanRanL
topic-clustering

Plan + execute pillar-and-spoke content clusters from a single seed keyword. Three layers — Semantic Clustering (SERP-overlap brain), Cluster Architecture (hub-spoke structure), Execution Engine (batch dispatch to /article with shared cluster context). Detects cannibalization. Generates interactive SVG cluster map. The strategy-to-execution gap.

Panoramica

Pubblicato daXuanRanL
Repositoryloamwright-SEO-Skill
Nome della skilltopic-clustering
Stelle
52
Fork
9
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da XuanRanL su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Topic Clustering in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/XuanRanL/loamwright-SEO-Skill/tree/main/subskills/plan/topic-clustering
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/XuanRanL/loamwright-SEO-Skill.git /tmp/loamwright-SEO-Skill
mkdir -p .claude/skills
cp -r /tmp/loamwright-SEO-Skill/subskills/plan/topic-clustering .claude/skills/topic-clustering
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Topic Clustering in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Topic Clustering non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Topic Clustering non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Topic Clustering · Semantic Cluster Engine

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

When to invoke

  • /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

Cross-references to other subskills

SubskillWhen this calls it
format-selectorDetermines per-spoke article format
outline-architectBuilds per-spoke outline within cluster context
batch-article queueExecute phase enqueues spokes for sequential processing
internal-linker + cross_article_linker.pyInject inter-spoke + hub-spoke links post-write
schema-generatorAdd BreadcrumbList, ItemList, Article schema cluster-wide
seo-content-writerPer-post content production

Plan Phase · /cluster plan <seed-keyword>

Step 1: Seed keyword expansion

Use WebSearch to expand the seed into a keyword universe of 30-50 phrases:

  1. Direct search of <seed> to capture related searches + "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:
    • Commercial: best, top, review, comparison, pricing
    • Informational: guide, tutorial, explained, examples
    • Transactional: buy, download, tool, software, service
  5. Year freshness: <seed> 2026

Step 2: Semantic clustering (SERP-overlap based)

Group expanded keywords by these priority rules:

  1. SERP Overlap Analysis (primary signal) — two keywords with 5+ shared top-10 results target the same intent and belong in one post
  2. Intent Classification — each keyword tagged informational / commercial / transactional / navigational
  3. Entity Mapping — identifies people, products, frameworks, organizations Google associates with the topic
  4. Grouping — combine keywords sharing intent + topical proximity; each group becomes one hub-spoke branch

SERP overlap thresholds (cannibalization decision matrix):

Shared top-10 URLsDecision
7-10MERGE — same intent; pick one keyword, drop the others
4-6CLUSTER candidate — related; interlink heavily as a spoke pair
2-3INTERLINK lightly — adjacent topics
0-1SEPARATE topics — no cross-link needed

Step 3: Cluster architecture design

Build hub-and-spoke:

  • Pillar (hub): targets the broadest keyword. Word count 2,500-4,000. Template pillar-page. Links down to every spoke.
  • Spokes: each targets a long-tail cluster. Word count 1,200-1,800. Template auto-selected by intent. Links up to pillar + across to siblings.

Formation rules:

  • 2-5 clusters per pillar
  • 2-4 spokes per cluster
  • Total: 1 pillar + 5-15 spokes
  • Every spoke targets a unique primary keyword (zero cannibalization)

Step 4: Internal link matrix

For each spoke S:

  • S → Pillar (always; anchor text uses the pillar's primary keyword)
  • Pillar → 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.

Step 5: Generate output files

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
json
{
  "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:

  • NO inline <script> blocks
  • NO onclick, onmouseover, or any on* event attributes
  • NO external script <src> references
  • Every text label escaped: & → &amp;, < → &lt;, > → &gt;, " → &quot;, ' → &#39;
  • Hover effects via CSS :hover only
  • Accessibility via <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.

Step 6: Pre-flight cost estimate + user confirmation

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.

Execute Phase · /cluster execute [path-to-plan]

Step 1: Load 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."

Step 2: Determine execution order

  1. Pillar page FIRST (so spokes can link to a known filename)
  2. Then spokes, ordered by (cluster priority desc, search_volume_estimate desc, post id alphabetical)
  3. Cluster priority = sum of estimated volumes within cluster (highest first)
  4. Alternate between clusters when 2+ exist — diversifies early content spread

Step 3: Per-post execution — cluster context + /article dispatch

Construct cluster context block, prepend to the brief passed to L1 seo-blog:

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

Step 4: Backward link injection

After each post is written:

  1. Scan all previously written posts in the cluster directory for [INTERNAL-LINK: keyword -> filename.md] markers referencing the just-written post
  2. Replace each with a real markdown link: [keyword](filename.md)
  3. Add cluster metadata to post frontmatter: cluster:, cluster_role:, cluster_group:

Step 5: Failure handling

  • If /article fails for a single post (timeout, error, quality gate fail): log + continue with remaining
  • Do NOT abort the cluster
  • Scorecard marks the gap + recommends retry with manual /article invocation
  • If user cancels mid-execution: save progress; detect already-written files on next /cluster execute and resume

Step 6: Generate cluster-scorecard.md

After all posts complete:

  • Per-post status (written / failed / skipped) + file path + word count
  • Per-post quality score (call /audit on each in parallel) + cluster average
  • Cluster cohesion score (0-100 composite of link reciprocity, intent diversity, template diversity, keyword coverage)
  • Internal-link audit: outgoing + incoming counts per post, orphan flags, unresolved [INTERNAL-LINK] markers
  • Cannibalization check: any two posts sharing primary keyword OR >70% keyword overlap
  • Image generation summary: hero images generated vs skipped
  • Recommended next actions: /schema, /seo-check, /repurpose

Step 7: Final report

Concise summary: totals, scorecard path, next-action commands.

Cannibalization detection (standalone diagnostic)

When /cannibalization is invoked WITHOUT planning a new cluster:

  1. Read all projects/{slug}/articles/*/publish-log.json
  2. Build primary-keyword → post URL map
  3. Pairwise check:
    • Same primary keyword → CRITICAL (consolidate)
    • 70% keyword overlap → HIGH (differentiate or merge)

    • Title-shingle similarity >0.6 → MEDIUM (review)
  4. Output projects/{slug}/cannibalization-report-{date}.md with merge/differentiate recommendations

Quality gates

GateCheckAction on fail
Cluster minimum≥2 clusters with ≥2 posts eachWarn during plan; suggest expansion
CannibalizationNo two posts share primary keywordBLOCK execution; require plan adjustment
Link completenessEvery post has ≥3 incoming internal linksWarn in scorecard
Word countPillar ≥2,500w; spokes ≥1,200wPass to /article as hard constraint
Intent diversity≥2 distinct intents across clustersWarn in scorecard
Template diversity≥3 distinct templates across clusterWarn in scorecard

Error handling

ScenarioAction
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 unavailableFall back to LLM reasoning for keyword expansion; note reduced accuracy
/article fails for one postLog, skip, continue; mark gap in scorecard
cluster-plan.json malformedValidate + report parse errors with line numbers
User cancels mid-executionSave progress; resume on next invocation with auto-detection

See also

  • references/seo/blog-formats-2026.md — per-format word count + template guide
  • scripts/_core/batch_queue.py — execution queue
  • scripts/optimize/cross_article_linker.py — post-write link injection
  • scripts/analysis/dataforseo.py — for precise volume data
  • subskills/plan/format-selector/SKILL.md — per-spoke format decision

Domande frequenti

Cosa fa la skill IA Topic Clustering?

Plan + execute pillar-and-spoke content clusters from a single seed keyword. Three layers — Semantic Clustering (SERP-overlap brain), Cluster Architecture (hub-spoke structure), Execution Engine (batch dispatch to /article with shared cluster context). Detects cannibalization. Generates interactive SVG cluster map. The strategy-to-execution gap.

Perché usare Topic Clustering su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Topic Clustering è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Topic Clustering in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/XuanRanL/loamwright-SEO-Skill/tree/main/subskills/plan/topic-clustering. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Topic Clustering?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Topic Clustering?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Topic Clustering: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Topic Clustering è gratuita?

Sì. È pubblicata su GitHub da XuanRanL con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇