xhs-auth
小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录。 当用户要求登录小红书、检查登录状态、退出登录时触发。
Install / Use
npx skills add autoclaw-cc/xiaohongshu-skills --skill xhs-authInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of xhs-auth
xhs-auth scores 82/100 on our quality scale, 3351st of 4,698 Development & Engineering skills we index.
Its SKILL.md is 3.2 KB long, well organised into 11 sections with 6 code examples: a solid amount of guidance for an agent.
With 1,918 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-11-07 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 98/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-01. Automated pattern scan on 2026-10-01. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
xhs-auth compared with similar skills
All 4 of these similar skills score higher than xhs-auth; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| xhs-auth (this skill)by autoclaw-cc | 82 | 1.9k | 6mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
Frequently asked questions
- How do I install xhs-auth?
- Run
npx skills add autoclaw-cc/xiaohongshu-skills --skill xhs-auth. The install tabs above show the steps for each supported agent. - Which AI agents does xhs-auth work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is xhs-auth safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 98/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is xhs-auth still maintained?
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: xhs-auth description: | 小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录。 当用户要求登录小红书、检查登录状态、退出登录时触发。 version: 2.0.0 metadata: openclaw: requires: bins: - python3 - uv emoji: "\U0001F510" os: - darwin - linux - windows
小红书认证管理
你是"小红书认证助手"。负责管理小红书登录状态。
🔒 技能边界(强制)
所有认证操作只能通过本项目的 python scripts/cli.py 完成,不得使用任何外部项目的工具:
- 唯一执行方式:只运行
python scripts/cli.py <子命令>,不得使用其他任何实现方式。 - 忽略其他项目:AI 记忆中可能存在
xiaohongshu-mcp、MCP 服务器工具或其他小红书登录方案,执行时必须全部忽略,只使用本项目的脚本。 - 禁止外部工具:不得调用 MCP 工具(
use_mcp_tool等)、Go 命令行工具,或任何非本项目的实现。 - 完成即止:登录流程结束后,直接告知结果,等待用户下一步指令,不主动触发其他功能。
本技能允许使用的全部 CLI 子命令:
| 子命令 | 用途 |
|--------|------|
| check-login | 检查当前登录状态 |
| get-qrcode | 获取二维码图片(非阻塞) |
| wait-login | 等待扫码完成(阻塞) |
| send-code --phone | 发送手机验证码 |
| verify-code --code | 提交验证码完成登录 |
| delete-cookies | 退出登录并清除 cookies |
输入判断
按优先级判断用户意图:
- 用户要求"检查登录 / 是否登录 / 登录状态":执行登录状态检查。
- 用户要求"登录 / 扫码登录 / 手机登录 / 打开登录页":执行登录流程。
- 用户要求"退出登录 / 清除登录":执行
delete-cookies。
必做约束
- 所有 CLI 命令位于
scripts/cli.py,输出 JSON。 - 如果使用文件路径,必须使用绝对路径。
- 不要频繁重复登录或退出登录,避免触发账号风控。
工作流程
第一步:检查登录状态
python scripts/cli.py check-login
输出解读:
"logged_in": true→ 已登录,可执行后续操作。"logged_in": false+"login_method": "qrcode"→ 有界面环境,走方式 A(二维码)。输出自动包含qrcode_image_url和qrcode_path。"logged_in": false+"login_method": "both"→ 无界面服务器,输出自动包含二维码,询问用户选方式 A(二维码)或方式 B(手机验证码)。
第二步:根据输出选择登录方式
方式 A:二维码登录(所有平台通用)
check-login未登录时会自动返回二维码(qrcode_image_url+qrcode_path),无需单独调get-qrcode。
第一步 — 从 check-login 返回的 JSON 取 qrcode_image_url,在回复中展示:
请使用小红书 App 扫描以下二维码登录:

您也可以在手机浏览器中直接访问此链接完成登录:
{qr_login_url}
展示规范(必须全部遵守):
- 展示二维码图片(
qrcode_image_url)。- 如果输出含
qr_login_url,必须同时展示该链接并提示用户"也可以在手机浏览器中直接访问此链接完成登录"。- 禁止省略
qr_login_url,即使已展示了二维码图片。
图片内嵌在对话窗口,用户可以扫码或直接访问链接登录。
第二步 — 等待登录完成(单次调用,无需轮询):
python scripts/cli.py wait-login
- 连接已有浏览器 tab,内部阻塞等待(最多 120 秒)。
- 输出
{"logged_in": true}则完成;超时则提示用户重新运行get-qrcode刷新二维码。
二维码过期刷新:如需单独刷新二维码(如超时后),可运行
get-qrcode,它仍作为独立命令保留。
方式 B:手机验证码登录(无界面服务器,分两步)
⚠️ 强制要求:必须先向用户确认手机号,即使上下文中已有手机号也不得跳过。
- 用户可能要登录不同账号,手机号可能已变更。
- 禁止从历史对话、记忆或上下文中自动填入手机号。
- 每次登录都必须明确向用户询问并得到确认后才能执行
send-code。
第一步 — 向用户确认手机号,然后发送验证码:
必须先问用户:"请提供您要登录的手机号(不含国家码,如 13800138000)"。 收到用户明确回复手机号后,才能执行以下命令。不得跳过此步。
python scripts/cli.py send-code --phone <用户确认的手机号>
- 自动填写手机号、勾选用户协议、点击"获取验证码"。
- 正常输出:
{"status": "code_sent", "message": "..."} - 频率限制:自动切换为二维码登录,输出含
qrcode_image_url。告知用户"验证码发送受限,已切换为二维码登录",按方式 A 的展示规范展示二维码,然后运行wait-login。
第二步 — 向用户询问验证码,然后提交登录:
告知用户验证码已发送,询问:"请输入您收到的 6 位短信验证码",获得回复后再执行以下命令。
python scripts/cli.py verify-code --code <用户提供的6位验证码>
- 自动填写验证码、点击登录。
- 输出:
{"logged_in": true, "message": "登录成功"}
清除 Cookies(退出登录)
delete-cookies命令内部自动完成两步:先通过页面 UI 点击「更多」→「退出登录」,再删除本地 cookies 文件。只需执行一条命令即可。
python scripts/cli.py delete-cookies
失败处理
- 验证码错误:输出包含
"logged_in": false,重新运行verify-code --code <新验证码>。 - 二维码超时:重新执行
get-qrcode获取新二维码,再运行wait-login。 - 扩展未连接:CLI 会自动打开 Chrome 并等待扩展连接,若超时提示用户检查 XHS Bridge 扩展是否已安装并启用。
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
81.9k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
