← 返回 Skills 市场
qirongzhang

Shopify Category Collector

作者 QirongZhang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
221
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install category-collector
功能描述
Shopify 网店分类链接采集器 - 自动从导航提取真实分类层级,处理 Ajax 懒加载下拉菜单,一级分类二级分类分别放在不同单元格,输出 CSV。支持 Shopify 多级别分类导航。
使用说明 (SKILL.md)

Shopify 分类采集器 (Category Collector)

自动采集 Shopify 网店分类链接,从导航结构提取真实分类层级,一级分类和二级分类分别放在不同单元格,输出标准 CSV 文件。

功能特点

  • 从导航结构提取真实层级 - 不是仅从 URL 猜测,而是根据实际导航菜单提取
  • 处理 Ajax 懒加载 - 支持需要鼠标悬停才加载的下拉菜单
  • 一级/二级分类分开 - 一级分类放在一个单元格,二级分类放在另一个单元格
  • 根据实际层级分栏 - 有多少层分多少层,自动检测实际深度
  • 清晰中文表头 - Excel 可以直接打开,一目了然
  • 自动创建输出目录 - 自动截图保存首页

适用场景

这个技能特别适合:

  • Shopify 网店分类导航采集
  • 一级菜单 + 下拉二级菜单结构
  • Ajax 懒加载下拉菜单(主题常用结构)
  • 需要将层级分别导出到不同单元格

使用方法

# 采集分类(默认输出到 C:\workspace\caiji)
node collect.js \x3C网站URL>

# 指定输出目录
node collect.js \x3C网站URL> C:\输出目录

# 查看帮助
node collect.js

CSV 输出格式(完全符合要求)

列名 说明
完整链接 分类页面的完整 URL
URL 路径 slug URL 中的路径部分
一级分类 提取的第一级分类名称
二级分类 提取的第二级分类名称
实际层级深度 实际有多少级分类

示例(你要求的格式)

对于链接 https://lulumonclick-eu.shop/collections/women-women-clothes-tank-tops

字段
完整链接 https://lulumonclick-eu.shop/collections/women-women-clothes-tank-tops
URL 路径 slug women/women-clothes-tank-tops
一级分类 Women
二级分类 Women Clothes Tank Tops
实际层级深度 2

对于 https://shop.futvortexstore.com/collections/liverpool

字段
完整链接 https://shop.futvortexstore.com/collections/liverpool
URL 路径 slug premier-league/liverpool
一级分类 Premier League
二级分类 Liverpool
实际层级深度 2

完全符合你的要求! 👍

安装

npm install
# 如果你已经安装了 playwright,不需要重复安装

依赖:

  • playwright(已安装)

测试结果

https://shop.futvortexstore.com/ 测试:

  • 找到 10 个一级分类
  • 采集到 42 个分类
  • 其中 6 个一级分类有二级分类,共 32 个二级分类
  • 正确提取层级:Premier League 一级 → Liverpool 二级 ✅

作者

Created by OpenClaw 根据需求自动生成

安全使用建议
This package appears to be a coherent Shopify navigation scraper, but take these precautions before installing or running it: - Review and run the code in an isolated environment (VM/container) first. The scripts will launch a browser and visit many pages on the target site and write files locally. - Install dependencies explicitly: run 'npm install' in the package directory, then 'npx playwright install chromium' (Playwright requires browser binaries). The package-lock references a mirror (npmmirror); you may prefer to use the official registry (registry.npmjs.org) when installing. - Edit the default output path: the scripts default to C:\workspace\caiji (Windows). Change it to a safe, platform-appropriate directory before running to avoid path errors or accidental writes. - Be mindful of scraping policies and rate: visiting many category pages may be rate-limited or violate a site's Terms of Service — obtain permission if needed and throttle requests. - Because the registry metadata omitted an install spec but code exists, the agent/operator must ensure dependencies and Playwright browsers are installed; otherwise the scripts will fail. If you want me to: (a) generate a safe install/run checklist (commands to run in a sandbox), (b) point out any specific lines of code to change (e.g., default paths, headless flag), or (c) re-audit for any additional concerns, tell me which and I will provide tailored steps.
功能分析
Type: OpenClaw Skill Name: category-collector Version: 1.0.0 The bundle contains a collection of Node.js scripts (collect.js, collect-ajax.js, etc.) designed to scrape Shopify store category hierarchies using Playwright. The code is well-documented, lacks obfuscation, and performs actions strictly aligned with its stated purpose of web scraping and CSV generation. No evidence of data exfiltration, credential theft, or malicious prompt injection was found in the code or SKILL.md instructions.
能力评估
Purpose & Capability
The name and description (Shopify category collector) align with the included scripts: multiple Node.js/Playwright scrapers that navigate shop pages, extract menu/breadcrumbs, take screenshots and write CSVs. Playwright is an expected dependency for this purpose.
Instruction Scope
SKILL.md and scripts instruct the agent/user to run node collect*.js to visit the target site(s), capture screenshots, traverse links and save CSVs. The instructions and code only read page content and write local files; they do not exfiltrate data to external endpoints. Note: the skill will visit many category pages (makes outbound requests to the target domain) and will save screenshots/CSV to disk.
Install Mechanism
Registry metadata claims 'instruction-only' / no install spec, but the package contains package.json and package-lock (Playwright dependency). There is no install step declared for the agent; running the scripts requires 'npm install' and Playwright browser binaries (npx playwright install chromium). package-lock references a mirror (registry.npmmirror.com) which is a non-default npm mirror — not necessarily malicious but worth noting. The missing install spec is an operational inconsistency and could cause failures or surprises if the agent tries to run scripts without installing dependencies.
Credentials
No environment variables, credentials, or config paths are requested. The scripts only write files to disk (default output C:\workspace\caiji) and take screenshots. No secrets are required or used.
Persistence & Privilege
Skill does not request 'always: true', does not modify other skills, and does not persist credentials. It writes output files and screenshots into a filesystem path under the user's control. That is expected for a scraper tool.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install category-collector
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /category-collector 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Shopify 网店分类链接采集器 - 自动从导航提取真实分类层级
元数据
Slug category-collector
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Shopify Category Collector 是什么?

Shopify 网店分类链接采集器 - 自动从导航提取真实分类层级,处理 Ajax 懒加载下拉菜单,一级分类二级分类分别放在不同单元格,输出 CSV。支持 Shopify 多级别分类导航。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 221 次。

如何安装 Shopify Category Collector?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install category-collector」即可一键安装,无需额外配置。

Shopify Category Collector 是免费的吗?

是的,Shopify Category Collector 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Shopify Category Collector 支持哪些平台?

Shopify Category Collector 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Shopify Category Collector?

由 QirongZhang(@qirongzhang)开发并维护,当前版本 v1.0.0。

💬 留言讨论