jd-price-protect

Auto-apply JD.com (京东) price protection on all eligible orders. Connects to Chrome via OpenClaw Browser Relay CDP, navigates to JD price protection page, clicks all "申请价保" buttons, and reports refund results. Supports pagination and scheduled cron usage.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "jd-price-protect" with this command: npx skills add danielwangyy/jd-price-protect

JD Price Protection

Auto-apply price protection (价格保护) on all eligible JD.com orders via Chrome Browser Relay.

Prerequisites

  • Chrome with OpenClaw Browser Relay extension installed and connected (badge ON)
  • User must be logged into JD.com in Chrome
  • OpenClaw gateway running

Usage

Run the script:

node <skill-dir>/scripts/price-protect.js

The script will:

  1. Connect to Chrome via OpenClaw's CDP relay (auto-derives relay token from gateway config)
  2. Navigate to https://pcsitepp-fm.jd.com/ if needed
  3. Click every "申请价保" button on the page
  4. Reload and collect results (successes with refund amounts, failures with reasons)
  5. Output JSON results

Interpreting Results

{
  "total": 11,
  "clicked": 11,
  "success": [{"name": "ANKER 140W充电线...", "amount": "6.00"}],
  "failed": [{"name": "KAMAN收纳盒...", "reason": "无差价"}]
}
  • Only notify user if success array is non-empty (refunds obtained)
  • If all items show "无差价", update state silently

Scheduled Usage

Set up a cron job to run every ~8 hours. Example agent prompt:

Run node <skill-dir>/scripts/price-protect.js. If Chrome relay is disconnected (error), skip silently. If refunds found, notify user. Otherwise update checkedAt silently.

Troubleshooting

  • "No browser page available": Chrome relay disconnected. User must click Browser Relay toolbar icon.
  • "No gateway token found": Set GATEWAY_TOKEN env var or ensure ~/.openclaw/openclaw.json has gateway.auth.token.
  • Timeout on clicks: A popup may be blocking. Script presses Escape after each click to dismiss.

How It Works

Derives the relay auth token via HMAC-SHA256(gatewayToken, "openclaw-extension-relay-v1:<port>"), connects Playwright to Chrome's CDP websocket, then uses getByText('申请价保', {exact: true}).click() to trigger each button.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

JD Shopping

Help users decide whether JD.com is the right place to buy a product, then assist with browser automation for search, reviews, price comparison, coupons, and...

Registry SourceRecently Updated
1.2K0Profile unavailable
Coding

Browser Agent - Chrome CDP 自动化

通过 Chrome DevTools Protocol 直接控制浏览器,实现登录状态复用和多场景自动化操作,支持 Windows 和 OpenClaw 集成。

Registry SourceRecently Updated
6880Profile unavailable
Coding

bb-browser

Turn any website into a CLI command. 36 platforms, 103 commands — Twitter, Reddit, GitHub, YouTube, Zhihu, Bilibili, Weibo, and more. Uses OpenClaw's browser...

Registry SourceRecently Updated
4.6K18Profile unavailable
Coding

Virtual Desktop — Universal Browser Execution

Full Computer Use for OpenClaw via kasmweb/chrome Docker sidecar. Navigate any website, click, type, fill forms, extract data, upload files, screenshot on an...

Registry SourceRecently Updated
3901Profile unavailable