xhs-login

管理小红书登录状态:检查是否已登录、二维码扫码登录、重置登录切换账号。 当用户提到登录、扫码、账号、切换账号、退出登录、登录状态检查,或其他 skill 报告"未登录"需要先登录时使用。

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 "xhs-login" with this command: npx skills add xmznini/xhs-login

执行流程

1. 检查登录状态

调用 check_login_status(无参数),返回是否已登录及用户名。

  • 已登录 → 告知用户当前登录账号
  • 未登录 → 进入步骤 2

2. 扫码登录

调用 get_login_qrcode(无参数)。MCP 工具返回两部分内容:

  • 文本:超时提示(含截止时间)
  • 图片:PNG 格式二维码(MCP image content type,Base64 编码)

展示二维码:MCP 返回的图片会通过客户端渲染给用户。如果客户端无法直接展示图片(如纯文本终端),则将 Base64 数据保存为临时 PNG 文件,告知用户文件路径让其手动打开:

# fallback: 保存二维码到临时文件
echo "<base64_data>" | base64 -d > /tmp/xhs-qrcode.png
open /tmp/xhs-qrcode.png   # macOS
xdg-open /tmp/xhs-qrcode.png  # Linux

提示用户:

  • 打开小红书 App 扫描二维码
  • 二维码有效期有限,过期需重新获取

扫码完成后,调用 check_login_status 确认登录成功。

3. 重新登录 / 切换账号

当用户要求重新登录或切换账号时:

  1. 调用 delete_cookies(⚠️ 需用户确认)— 清除当前登录状态
  2. 调用 get_login_qrcode — 获取新二维码
  3. 引导用户扫码

约束

  • delete_cookies 会清除登录状态,执行前必须确认
  • 登录需要用户手动用手机 App 扫码,无法自动完成

失败处理

场景处理
MCP 工具不可用引导用户使用 /setup-xhs-mcp 完成部署和连接配置
二维码超时重新调用 get_login_qrcode

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.

General

Digicert

DigiCert integration. Manage Certificates, Orders, Users, Organizations. Use when the user wants to interact with DigiCert data.

Registry SourceRecently Updated
General

Dialpad

Dialpad integration. Manage Users, Groups, Departments, Offices. Use when the user wants to interact with Dialpad data.

Registry SourceRecently Updated
General

Darwinbox

Darwinbox integration. Manage Organizations, Goals, Roles, Projects, Pipelines, Leads and more. Use when the user wants to interact with Darwinbox data.

Registry SourceRecently Updated
General

Creatio

Creatio integration. Manage Leads, Organizations, Users. Use when the user wants to interact with Creatio data.

Registry SourceRecently Updated