360 Secure SkillHub
360 安全技能中心

keyword-clustering-lite

读取关键词 txt 或 CSV(可选搜索量列),用去停用词、轻量词干化的词面 Jaccard 相似度聚出话题簇,输出含支柱词、主要搜索意图与建议页面类型的 Markdown 表。全程离线,不查询实时搜索结果,同义词与同排名页面不会合并。脚本文件在包内缺失。

未知作者
热度 0.00
最近更新 2026-10-18 21:39:39
分类:营销依赖:代码执行 / 读写文件应用场景:市场分析 / 数据处理 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add seoskills.sh/keyword-clustering-lite
Metadata
name
keyword-clustering-lite
description
Group a keyword list into topic clusters with a pillar keyword, majority search intent and suggested page type, so one page targets each cluster. Use when the user pastes keywords or a keyword CSV and asks to cluster, group, organise or map keywords to pages, or plan a content hub. Offline, no API keys.
license
MIT

Keyword clustering (lite)

Turns a flat keyword list into page-sized clusters. Each cluster gets a pillar keyword (highest volume, or shortest if there is no volume), a majority intent and the page type that usually ranks for that intent.

When to use

  • "Cluster these keywords", "group this keyword export", "which keywords can share one page?"
  • Planning a pillar/cluster content hub from a keyword tool export (Ahrefs, Semrush, GSC, Keyword Planner).

How to run

  1. Save the keywords as a .txt (one per line) or a CSV with a keyword or query column. An optional volume / search volume / impressions column is used to pick pillars and order clusters.
  2. Run:
    python3 scripts/cluster.py keywords.csv            # default threshold 0.5
    python3 scripts/cluster.py keywords.txt --threshold 0.4   # looser clusters
    
  3. Present the Markdown table. For the top 3 clusters, suggest one URL slug and an H1 each.

How it works (and its limits)

Lexical clustering: stopwords are removed, words are lightly stemmed, and a keyword joins the cluster whose pillar shares at least threshold of its core terms (Jaccard). Single-word cores only join identical cores. It does not look at live SERPs, so synonyms ("cheap" vs "affordable") stay separate and two clusters with the same ranking URLs are not merged. Tell the user to check the live SERP for the top clusters before merging or splitting pages.

Example

Input: best crm for small business, small business crm software, crm for small business, crm vs erp, erp vs crm difference. Output: cluster 1 "crm for small business" (commercial, comparison page, 3 keywords); cluster 2 "crm vs erp" (commercial, 2 keywords).

Want more?