Topic Clusteringのロゴ

Topic Clustering

コミュニティ
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.

概要

公開者XuanRanL
リポジトリloamwright-SEO-Skill
スキル名topic-clustering
スター
52
フォーク
9
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    XuanRanLがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Topic Clustering」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/XuanRanL/loamwright-SEO-Skill/tree/main/subskills/plan/topic-clustering
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTopic Clusteringを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTopic Clusteringを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Topic Clusteringは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

よくある質問

AIスキル「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.

TypingMindでTopic Clusteringを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Topic Clusteringはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTopic Clusteringをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/XuanRanL/loamwright-SEO-Skill/tree/main/subskills/plan/topic-clusteringを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Topic Clusteringを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Topic Clusteringで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTopic Clusteringを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Topic Clustering」は無料ですか?

はい。XuanRanLがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇