mcpField
S
site-content-catalog

site-content-catalog

github.com/gooseworks-ai营销与增长1.3k52 次安装3 天前更新
代码仓库

关于 site-content-catalog

site-content-catalog 是用于网站内容审计的技能,可从站点地图、RSS 和博客页面发现并归类页面。它汇总内容类型、主题集群和发布规律,并可选分析重点页面。

主要功能

  1. 01从站点地图、RSS 和博客发现页面
  2. 02按内容类型和主题归类
  3. 03统计发布频率与趋势
  4. 04可选深入分析重点页面
  5. 05输出 JSON 和 Markdown 摘要

适用场景

  1. 01盘点网站的全部内容页面
  2. 02比较不同内容类型的数量
  3. 03分析过去一年的发布节奏

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/gooseworks-ai/goose-skills --skill site-content-catalog

安装后在 Claude Code 中输入/site-content-catalog确认已加载。

附带文件scripts/catalog_content.pyskill.meta.json

详细介绍

网站内容目录

抓取网站的站点地图和博客,构建完整的内容清单——为每个页面编录 URL、标题、日期、内容类型和主题集群。按类别对内容分组,识别发布规律,并可选择对热门页面进行深入分析。

快速开始

# Basic content inventory
python3 scripts/catalog_content.py --domain "example.com"

# With deep analysis of top 20 pages
python3 scripts/catalog_content.py --domain "example.com" --deep-analyze 20

# Output to specific file
python3 scripts/catalog_content.py --domain "example.com" --output content-inventory.json

输入

参数必填默认值描述
domain是—要编录的域名(例如,“example.com”)
deep-analyze否0要深入阅读并进行内容分析的热门页面数量
output否stdout保存 JSON 输出的路径
include-non-blog否true同时编录落地页、文档等内容(不只是博客)

费用

  • 站点地图/RSS 抓取: 免费(直接发送 HTTP 请求)
  • Apify 站点地图提取器(备用方案): 每个站点约 $0.50
  • 深入分析: 免费(使用 WebFetch 获取单个页面)

流程

阶段 1:发现所有页面

脚本会依次尝试多种方法,查找网站上的所有页面:

A) Sitemap.xml
  1. 获取 https://[domain]/sitemap.xml
  2. 如果是站点地图索引,则递归获取所有子站点地图
  3. 常见的备用位置:/sitemap_index.xml、/sitemap-index.xml、/wp-sitemap.xml
  4. 检查 robots.txt 中的 Sitemap: 指令
B) RSS/Atom 订阅源
  1. 检查 /feed、/rss、/atom.xml、/blog/feed 等路径
  2. 提取文章的标题、日期和 URL
  3. RSS 通常只能显示近期内容(最近 10-50 篇文章)
C) 博客索引页抓取
  1. 获取 /blog、/resources、/insights、/news、/articles
  2. 从页面中提取链接
  3. 如果存在分页,则继续抓取(/blog/page/2、?page=2 等)
D) Site: 搜索(备用方案)
  1. WebSearch:使用 site:[domain] 估算已编入索引的页面总数
  2. WebSearch:使用 site:[domain]/blog 查找博客内容
  3. WebSearch:使用 site:[domain] intitle: 发现页面标题规律
E) Apify 站点地图提取器(适用于 JavaScript 内容较多的网站的备用方案)
  • Actor:onescales/sitemap-url-extractor
  • 当缺少 sitemap.xml 且网站由 JavaScript 渲染时使用
阶段 2:为每个页面分类

对发现的每个 URL,按以下类别进行分类:

内容类型

根据 URL 格式和页面标题进行分类:

类型URL 格式示例
blog-post/blog/、/posts/、/articles/操作指南、观点文章
case-study/case-study/、/customers/、/success-stories/客户案例
comparison/vs/、/compare/、/alternative/X 与 Y 的对比页面
landing-page/solutions/、/use-cases/、/for-/产品营销页面
docs/docs/、/help/、/documentation/、/api/技术文档
changelog/changelog/、/releases/、/whats-new/产品更新
pricing/pricing/定价页面
about/about/、/team/、/careers/公司页面
legal/privacy/、/terms/、/security/法律/合规内容
resource/resources/、/guides/、/ebooks/、/webinars/需注册获取/可下载的内容
glossary/glossary/、/dictionary/、/terms/SEO 术语表页面
integration/integrations/、/apps/、/marketplace/集成页面
other—其他所有内容
主题集群

从 URL slug 和标题中提取主题信号,并据此分组:

  • 从 URL 路径片段中提取关键词
  • 将相似关键词归入集群(例如,“aws-cost”、“cloud-spending”、“finops” → “云成本管理”)
  • 使用简单的关键词共现方法进行聚类
阶段 3:分析发布规律

根据带有日期的内容(主要是博客文章)分析:

  • 内容总量: 按类型统计
  • 发布频率: 最近 12 个月每月发布的文章数
  • 趋势: 发布量上升、下降或稳定
  • 近期情况: 最近一次发布的日期
  • 作者多样性: 不同作者的数量(若可从 RSS 中提取)
阶段 4:深度分析(可选)

如果指定了 --deep-analyze N,则获取排名靠前的 N 个页面(优先选择博客文章),并提取:

  • 字数(约值)
  • 目标关键词(根据标题、H1 和 URL 推断)
  • 漏斗阶段: TOFU(认知)、MOFU(考虑)、BOFU(决策)
  • 内容深度: 浅(少于 500 个词)、中(500~1500 个词)、深(1500 个词以上)
  • 是否包含图片/视频: 布尔值
  • 是否包含 CTA: 布尔值(通过常见 CTA 模式检测)
  • 内部链接数量
阶段 5:输出
JSON 输出(默认)
{
  "domain": "example.com",
  "crawl_date": "2026-02-25",
  "total_pages": 347,
  "discovery_methods": ["sitemap.xml", "rss"],
  "pages": [
    {
      "url": "https://example.com/blog/reduce-aws-costs",
      "title": "How to Reduce Your AWS Bill by 40%",
      "date": "2025-11-15",
      "type": "blog-post",
      "topic_cluster": "Cloud Cost Optimization",
      "deep_analysis": {
        "word_count": 2100,
        "target_keyword": "reduce aws costs",
        "funnel_stage": "TOFU",
        "content_depth": "deep",
        "has_images": true,
        "has_cta": true
      }
    }
  ],
  "summary": {
    "by_type": {"blog-post": 89, "landing-page": 23, "case-study": 12, ...},
    "by_topic": {"Cloud Cost Optimization": 34, "FinOps": 18, ...},
    "publishing_cadence": {
      "posts_per_month_avg": 4.2,
      "trend": "increasing",
      "most_recent": "2026-02-20"
    }
  }
}
Markdown 摘要(同时生成)
# Content Inventory: example.com
**Crawled:** 2026-02-25 | **Total pages:** 347

## Content by Type
| Type | Count | % |
|------|-------|---|
| Blog Posts | 89 | 25.6% |
| Landing Pages | 23 | 6.6% |
| ...

## Content by Topic Cluster
| Topic | Posts | Most Recent |
|-------|-------|-------------|
| Cloud Cost Optimization | 34 | 2026-02-20 |
| ...

## Publishing Cadence
- Average: 4.2 posts/month
- Trend: Increasing (3.1 → 5.4 over last 6 months)
- Most recent: 2026-02-20

## Full Catalog
| # | Date | Type | Topic | Title | URL |
|---|------|------|-------|-------|-----|
| 1 | 2026-02-20 | blog-post | Cloud Cost | How to Reduce... | https://... |

提示

  • Sitemap.xml 是最佳来源。 大多数维护良好的网站都有 sitemap.xml。如果缺失,这本身就是一个负面的 SEO 信号。
  • RSS 只显示最近的内容。 如果需要完整目录,sitemap 至关重要。RSS 是补充来源。
  • 深度分析是可选的,但很有价值。 将数据输入 brand-voice-extractor 或需要映射漏斗阶段时,可使用此功能。
  • 由 JS 渲染的网站可能需要使用 Apify 备用方案。相关迹象:sitemap.xml 返回 HTML,或博客页面返回的主要是 JavaScript。
  • 与 seo-domain-analyzer 结合使用,可将流量数据叠加到内容清单上,了解哪些内容真正有效。

依赖项

  • Python 3.8+
  • requests 库(pip install requests)
  • APIFY_API_TOKEN 环境变量(仅用于 Apify 备用模式)

评论

支持 Markdown