with one click
dxm-startup
速卖通上架——启动模块:Chrome CDP调试模式启动 + Relay中继链 + Playwright连接 + 登录检查
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
速卖通上架——启动模块:Chrome CDP调试模式启动 + Relay中继链 + Playwright连接 + 登录检查
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
速卖通店铺运营自动化 — 每日巡检/每周策略/商品上架/数据分析全流程。填入你的店铺名即可使用。
店小秘速卖通编辑页——属性信息模块:产品属性批量填(ant-select CDP填充)+ 自定义属性删除
店小秘速卖通编辑页——基本信息模块:标题改英文 + 产品分类选择
速卖通上架——1688采集模块:从1688搜索产品 → 采集到店小秘采集箱 → 提取产品参数(价格/库存/重量/材质等)
店小秘速卖通编辑页——店小秘信息模块:来源URL(只读,记录用)
店小秘速卖通上品完整工作流——从采集箱到发布的所有模块编排、调用顺序、区域调价、保存发布
| name | dxm-startup |
| description | 速卖通上架——启动模块:Chrome CDP调试模式启动 + Relay中继链 + Playwright连接 + 登录检查 |
| domain | ecommerce |
| triggers | ["用户说\"开始上架\"、\"连接浏览器\"、\"启动Chrome\"、\"relay断了\"","CDP连不上时"] |
Windows Chrome (--remote-debugging-port=9222)
↕ Relay2.exe (0.0.0.0:9255 → 127.0.0.1:9222)
Windows IP (172.24.48.1:9255)
↕ WSL chrome_relay.py (127.0.0.1:19223 → 172.24.48.1:9255)
↕ Playwright connect_over_cdp('http://127.0.0.1:19223')
# 先杀掉旧Chrome进程
taskkill /F /IM chrome.exe
# 启动Chrome带调试端口
cmd.exe /c start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" \
--remote-debugging-port=9222 \
--user-data-dir="C:\Users\[你的Windows用户名]\Desktop\chrome-debug"
⚠️ 必须用独立 --user-data-dir(如 chrome-debug),默认profile绑不了9222。
Relay2.exe应在 Windows 启动项自动运行:
C:\Users\[你的Windows用户名]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\hermes-gateway.vbs
手动启动:双击运行 Relay2.exe。
cd ~/.hermes/scripts && python3 chrome_relay.py &
# 检查WSL relay
curl -s http://127.0.0.1:19223/json | head -5
# 应返回Chrome标签页列表的JSON
from playwright.async_api import async_playwright
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp('http://127.0.0.1:19223')
pages = browser.contexts[0].pages
# 检查已打开的标签页
导航到店小秘 → 检查是否已登录(看页面是否有 [你的店小秘用户名] 用户名):
document.body.innerText.includes('[你的店小秘用户名]')
未登录时用二维码登录:店小秘右上角 → 扫码登录。
检查1688登录状态:打开1688任意产品页 → 看是否有"登录"按钮。
document.body.innerText.includes('登录')
未登录时手动登录(1688验证码无法自动化)。
致命错误: 直接调用 browser_navigate 会创建新标签页,丢失已填数据。
正确步骤:
1. browser_cdp → Target.getTargets # 列出所有标签页
2. 找到店小秘编辑页(title="店小秘--编辑速卖通产品")
3. Runtime.evaluate 读取页面状态(标题/hash/bodyText)
4. 确认哪个标签页有已填数据
5. Target.closeTarget 关闭空白/重复标签页
6. Target.activateTarget 激活正确标签页
7. 此时 browser_snapshot 应显示已填数据
# WSL端
pkill -f chrome_relay.py
cd ~/.hermes/scripts && python3 chrome_relay.py &
# Windows端(需手动或从WSL触发)
taskkill /F /IM chrome.exe
# 重新启动Chrome(Step A)
作者: Rigi AI Commons | 小红书 @瑞吉AI人民公社 | AI自动化专家工作流