Loading...
Loading...
Compare original and translation side by side
xhs-*clawhub install xhs-skillagent-browser-stealthpublish_from_payloadagent-browser-stealthagent-browseragent-browser-stealthdata/agent-browser-stealthos error 35snapshotsnapshot -iplaceholder/role/textxhs-*clawhub install xhs-skillagent-browser-stealthpublish_from_payloadagent-browser-stealthagent-browseragent-browser-stealthdata/agent-browser-stealthos error 35snapshotsnapshot -iplaceholder/role/textclawhub install xhs-skill
cd skills/xhs-skill
npm inpm iagent-browser-stealthclawhub install xhs-skill
cd skills/xhs-skill
npm inpm iagent-browser-stealthdata/xhs_login_qr.pngdata/raw_cookies.jsondata/xhs_cookies.jsondata/exports/<YYYY-MM-DD>/data/assets/<YYYY-MM-DD>/mkdir -p datadata/xhs_login_qr.pngdata/raw_cookies.jsondata/xhs_cookies.jsondata/exports/<YYYY-MM-DD>/data/assets/<YYYY-MM-DD>/mkdir -p dataagent-browser-stealthhttps://creator.xiaohongshu.com/loginagent-browser-stealthdata/xhs_login_qr.pngnode ./bin/xhs-skill.mjs qr show --in ./data/xhs_login_qr.pngdata/xhs_login_qr.pngnode ./bin/xhs-skill.mjs qr show --in ./data/xhs_login_qr.png请用小红书 App 扫这个二维码登录。
二维码文本: <qr_text>
<ASCII QR>data/raw_cookies.jsonagent-browser-stealth cookies --json > ./data/raw_cookies.jsondata/xhs_cookies.jsonnode ./bin/xhs-skill.mjs cookies normalize --in ./data/raw_cookies.json --out ./data/xhs_cookies.json
node ./bin/xhs-skill.mjs cookies status --in ./data/xhs_cookies.jsonundefinedagent-browser-stealthhttps://creator.xiaohongshu.com/loginagent-browser-stealthdata/xhs_login_qr.pngnode ./bin/xhs-skill.mjs qr show --in ./data/xhs_login_qr.pngdata/xhs_login_qr.pngnode ./bin/xhs-skill.mjs qr show --in ./data/xhs_login_qr.pngPlease scan this QR code with the Xiaohongshu App to log in.
QR Code Text: <qr_text>
<ASCII QR>data/raw_cookies.jsonagent-browser-stealth cookies --json > ./data/raw_cookies.jsondata/xhs_cookies.jsonnode ./bin/xhs-skill.mjs cookies normalize --in ./data/raw_cookies.json --out ./data/xhs_cookies.json
node ./bin/xhs-skill.mjs cookies status --in ./data/xhs_cookies.jsonundefined
登录成功判定(强制):
- 必须同时满足以下 2 条才可回报“登录完成”(`web_session` 不再作为硬依赖):
- 当前 URL 已离开 `/login`
- 可访问创作者后台页面,且不会 401/回跳登录
- 加分项:cookies 中存在“session-like cookie”(例如 `web_session`,或 cookie 名含 `session`)。没有也可能可用,但稳定性更差。
- 任一强制条件不满足,必须回报“登录失败/未完成”,并重试登录流程;禁止误报成功。
登录结果输出契约(JSON):
```json
{
"task": "xhs_login",
"ok": true,
"checks": {
"left_login": true,
"backend_not_rejected": true,
"has_session_like_cookie": true
},
"artifacts": {
"qr_png": "data/xhs_login_qr.png",
"raw_cookies": "data/raw_cookies.json",
"normalized_cookies": "data/xhs_cookies.json"
}
}ok=false/loginCookie:node ./bin/xhs-skill.mjs cookies to-header --in ./data/xhs_cookies.jsonagent-browser-stealthdata/raw_cookies.json
Login Success Criteria (Mandatory):
- Both of the following 2 conditions must be met to report "Login Completed" (`web_session` is no longer a hard dependency):
- The current URL has left `/login`
- The creator backend page is accessible, and there is no 401/redirect to login
- Bonus: The cookies contain a "session-like cookie" (e.g., `web_session`, or a cookie name containing `session`). Even without it, it may still work, but stability will be worse.
- If any mandatory condition is not met, you must report "Login Failed/Incomplete" and retry the login process; false success reports are prohibited.
Login Result Output Contract (JSON):
```json
{
"task": "xhs_login",
"ok": true,
"checks": {
"left_login": true,
"backend_not_rejected": true,
"has_session_like_cookie": true
},
"artifacts": {
"qr_png": "data/xhs_login_qr.png",
"raw_cookies": "data/raw_cookies.json",
"normalized_cookies": "data/xhs_cookies.json"
}
}ok=false/loginCookie:node ./bin/xhs-skill.mjs cookies to-header --in ./data/xhs_cookies.jsonagent-browser-stealthdata/raw_cookies.json1.2s~7stype --delayfill--profile--headed24h <= 3303~7profile + IP + 设备环境1.2s~7stype --delayfill--profile--headed24h <= 3303~7profile + IP + device environmentYYYY-MM-DDdata/publish_payload.json{
"topic": "今日热点:xxxx",
"source": {
"name": "央视新闻",
"url": "https://example.com/news",
"date": "2026-02-12",
"evidence_snippet": "2月12日该媒体报道提到:......",
"key_facts": ["关键事实1(含日期/数字)", "关键事实2(含日期/数字)"]
},
"post": {
"title": "20字内标题示例",
"body": "不少于 80 字的正文......",
"tags": ["#热点", "#今日新闻", "#小红书运营"],
"real_topics": ["#人工智能", "#AI资讯", "#科技观察"],
"media": ["/abs/path/cover.png", "/abs/path/card_1.png"]
}
}undefinedYYYY-MM-DDdata/publish_payload.json{
"topic": "Today's Hot Topic: xxxx",
"source": {
"name": "CCTV News",
"url": "https://example.com/news",
"date": "2026-02-12",
"evidence_snippet": "On February 12, this media report mentioned:......",
"key_facts": ["Key Fact 1 (including numbers/dates/source mentions)", "Key Fact 2 (including numbers/dates/source mentions)"]
},
"post": {
"title": "Example title within 20 characters",
"body": "Body with no less than 80 words......",
"tags": ["#HotTopic", "#TodayNews", "#XiaohongshuOperation"],
"real_topics": ["#ArtificialIntelligence", "#AII资讯", "#TechnologyObservation"],
"media": ["/abs/path/cover.png", "/abs/path/card_1.png"]
}
}undefined
3. 发布前必须执行内容审核脚本(分层规则 + AI):
```bash
node ./scripts/review_publish_payload.mjs --in ./data/publish_payload.json --policy ./config/review_policy.json --taxonomy ./config/review_taxonomy.json --ai-provider auto --require-ai off --mode hot --jsonok=true./config/verify_publish_policy.json./config/review_policy.json./config/review_taxonomy.jsonhttp/httpswww.xxx.com/.cn/...review_publish_payloaddecision=passrisk_pathreview_queuesource.evidence_snippetsource.key_factspost.real_topicsdata/tag_registry.json#标签agent-browser-stealthcat > ./data/tag_registry.json <<'JSON'
{
"updated_at": "2026-02-24",
"source": {
"platform": "xiaohongshu",
"method": "manual_from_publish_topic_picker",
"url": "https://creator.xiaohongshu.com/creator/publish"
},
"tags": ["#AI热点", "#人工智能", "#行业观察", "#科技新闻", "#AI资讯", "#科技观察"]
}
JSONagent-browser-stealthverify/reviewok=true\\ntext.replaceAll("\\\\n", "\n")innerText\\n<= 20#tag_registrypost.real_topicstag_registrysnapshot -i1280x7201242x1660agent-browser-stealthsleep/waitos error 35title/body/imgCount/tagsagent-browser-stealthagent-browser-stealth get titleh1title/h1agent-browser-stealthdata/assets/<YYYY-MM-DD>/icons/<name>.pngdata/assets/<YYYY-MM-DD>/sources.txtagent-browser-stealthdata/publish_payload.jsonok=true8~20>= 80#post.real_topicsdata/tag_registry.jsonscreenshot/login_qrsnapshot -iagent-browser-stealth{
"task": "xhs_publish",
"ok": true,
"result_url": "https://creator.xiaohongshu.com/....",
"content_checks": {
"title_len": 18,
"body_len": 136,
"tag_count": 3,
"topic": "今日热点:xxxx",
"source_date": "2026-02-12"
},
"artifacts": {
"payload_json": "data/publish_payload.json",
"media_inputs": ["..."],
"error_screenshot": null
}
}ok=falseerror_messageerror_screenshotmissing_checks
3. Must execute the content review script (layered rules + AI) before publishing:
```bash
node ./scripts/review_publish_payload.mjs --in ./data/publish_payload.json --policy ./config/review_policy.json --taxonomy ./config/review_taxonomy.json --ai-provider auto --require-ai off --mode hot --jsonok=true./config/verify_publish_policy.json./config/review_policy.json./config/review_taxonomy.jsonhttp/httpswww.xxx.com/.cn/...review_publish_payloaddecision=passrisk_pathreview_queuesource.evidence_snippetsource.key_factspost.real_topicsdata/tag_registry.json#tagsagent-browser-stealthcat > ./data/tag_registry.json <<'JSON'
{
"updated_at": "2026-02-24",
"source": {
"platform": "xiaohongshu",
"method": "manual_from_publish_topic_picker",
"url": "https://creator.xiaohongshu.com/creator/publish"
},
"tags": ["#AIHotTopic", "#ArtificialIntelligence", "#IndustryObservation", "#TechnologyNews", "#AII资讯", "#TechnologyObservation"]
}
JSONagent-browser-stealthverify/reviewok=true\\ntext.replaceAll("\\\\n", "\n")innerText\\n<= 20#tag_registrypost.real_topicstag_registrysnapshot -i1280x7201242x1660agent-browser-stealthsleep/waitos error 35title/body/imgCount/tagsagent-browser-stealthagent-browser-stealth get titleh1title/h1agent-browser-stealthdata/assets/<YYYY-MM-DD>/icons/<name>.pngdata/assets/<YYYY-MM-DD>/sources.txtagent-browser-stealthdata/publish_payload.jsonok=true8~20>= 80#post.real_topicsdata/tag_registry.jsonscreenshot/login_qrsnapshot -iagent-browser-stealth{
"task": "xhs_publish",
"ok": true,
"result_url": "https://creator.xiaohongshu.com/....",
"content_checks": {
"title_len": 18,
"body_len": 136,
"tag_count": 3,
"topic": "Today's Hot Topic: xxxx",
"source_date": "2026-02-12"
},
"artifacts": {
"payload_json": "data/publish_payload.json",
"media_inputs": ["..."],
"error_screenshot": null
}
}ok=falseerror_messageerror_screenshotmissing_checksdata/exports/<YYYY-MM-DD>/agent-browser-stealthdata/exports/<date>/data/exports/<YYYY-MM-DD>/agent-browser-stealthdata/exports/<date>/node ./bin/xhs-skill.mjs qr show --in <pngPath>node ./bin/xhs-skill.mjs cookies normalize --in <jsonPath> --out <outPath>node ./bin/xhs-skill.mjs cookies status --in <cookiesJsonPath>node ./bin/xhs-skill.mjs cookies to-header --in <cookiesJsonPath>node ./scripts/verify_publish_payload.mjs --in <payloadJsonPath> --policy ./config/verify_publish_policy.json --tag-registry ./data/tag_registry.json --min-registry-tags 12 --require-source-evidence on --strict-anti-ai on [--mode hot]node ./scripts/review_publish_payload.mjs --in <payloadJsonPath> --policy ./config/review_policy.json --taxonomy ./config/review_taxonomy.json --ai-provider auto --require-ai off [--mode hot]node ./bin/xhs-skill.mjs qr show --in <pngPath>node ./bin/xhs-skill.mjs cookies normalize --in <jsonPath> --out <outPath>node ./bin/xhs-skill.mjs cookies status --in <cookiesJsonPath>node ./bin/xhs-skill.mjs cookies to-header --in <cookiesJsonPath>node ./scripts/verify_publish_payload.mjs --in <payloadJsonPath> --policy ./config/verify_publish_policy.json --tag-registry ./data/tag_registry.json --min-registry-tags 12 --require-source-evidence on --strict-anti-ai on [--mode hot]node ./scripts/review_publish_payload.mjs --in <payloadJsonPath> --policy ./config/review_policy.json --taxonomy ./config/review_taxonomy.json --ai-provider auto --require-ai off [--mode hot]npm run check:constraintsnpm testgit status --shortdocs(skill): 补充发版前快速自检清单clawhub sync --all --bump patch --changelog "docs: 补充发版前快速自检清单"npm run check:constraintsnpm testgit status --shortdocs(skill): 补充发版前快速自检清单clawhub sync --all --bump patch --changelog "docs: 补充发版前快速自检清单"