dxm-startup
速卖通上架——启动模块:Chrome CDP调试模式启动 + Relay中继链 + Playwright连接 + 登录检查
by southernspark-nfxh★ 45 GitHub stars
Install dxm-startup in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
启动模块:Chrome + Relay + Playwright
架构
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')
Step A:启动Chrome(Windows)
# 先杀掉旧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。
Step B:启动Relay2(Windows)
Relay2.exe应在 Windows 启动项自动运行:
C:\Users\[你的Windows用户名]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\hermes-gateway.vbs
手动启动:双击运行 Relay2.exe。
Step C:启动WSL Relay
cd ~/.hermes/scripts && python3 chrome_relay.py &
Step D:验证链路
# 检查WSL relay
curl -s http://127.0.0.1:19223/json | head -5
# 应返回Chrome标签页列表的JSON
Step E:Playwright连接
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登录状态:打开1688任意产品页 → 看是否有"登录"按钮。
document.body.innerText.includes('登录')
未登录时手动登录(1688验证码无法自动化)。
故障恢复
Gateway断连后重连铁律
致命错误: 直接调用 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)
作者: 南方星火 SouthernSpark | 小红书 @南方星火 SouthernSpark | AI自动化专家工作流
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the dxm-startup skill do?
速卖通上架——启动模块:Chrome CDP调试模式启动 + Relay中继链 + Playwright连接 + 登录检查
How do I install the dxm-startup skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the dxm-startup skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…