Xiaohongshu (XHS) Login Manager for Openclaw

A specialized skill for AI agents to handle Xiaohongshu authentication, status monitoring, and secure account switching via QR codes.

xmznini
v0.1.0
Mar 5, 2026
0
1.2k
14

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install xhs-login

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install xhs-login using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Xiaohongshu (XHS) Login Manager?

The Xiaohongshu (XHS) Login Manager is a critical utility for Openclaw Skills users who need to automate interactions with the XHS platform. This skill enables AI agents to verify authentication status, initiate secure QR code login sessions, and manage local session cookies. By bridging the gap between automated workflows and the platform's mobile-centric security, it ensures that your agent remains connected and authorized to perform social media tasks.

Designed for reliability, this skill provides the underlying infrastructure needed for other Openclaw Skills to function on XHS, handling everything from initial setup to session persistence. It ensures that manual security steps, like scanning a QR code, are integrated smoothly into a developer's automated environment.

Xiaohongshu (XHS) Login Manager Use Cases

  • Verifying if the AI agent is currently authenticated with a Xiaohongshu account.
  • Generating a secure QR code for mobile app scanning when a session expires or a new login is required.
  • Resetting authentication tokens to switch between multiple professional XHS accounts safely.
  • Providing a fallback mechanism to view and open login QR codes in CLI or restricted terminal environments.

How Xiaohongshu (XHS) Login Manager Works

  1. The agent calls check_login_status to determine if a valid session exists and identify the current user.
  2. If no active session is found, the agent invokes get_login_qrcode to retrieve a Base64 encoded PNG image.
  3. The user scans the displayed QR code using their mobile Xiaohongshu application within the expiration window.
  4. Upon confirmation from the mobile device, the agent re-verifies the status to finalize the authentication lifecycle.
  5. For account changes, the agent clears existing session data via delete_cookies before initiating a new login sequence.

Xiaohongshu (XHS) Login Manager Setup

To integrate this authentication layer within your Openclaw Skills environment, ensure the MCP tool is configured correctly. If the tool is not detected, use the following setup command:

/setup-xhs-mcp

For terminal users needing to manually process the QR code data, you can use these fallback commands to render the login image:

# Save QR code to a temporary file
echo "<base64_data>" | base64 -d > /tmp/xhs-qrcode.png

# Open on macOS
open /tmp/xhs-qrcode.png

# Open on Linux
xdg-open /tmp/xhs-qrcode.png

Xiaohongshu (XHS) Login Manager Data Schema & Taxonomy

The skill manages authentication through the following structured data components:

Component Description
Session Cookies Local storage for persistent authentication tokens used for platform requests.
QR Code Image Base64 encoded PNG data transmitted via MCP image content types.
Login Status Boolean indicator (Logged In/Out) associated with a specific Username.
Expiry Metadata A timestamp string indicating the deadline for the current QR code validity.

Xiaohongshu (XHS) Login Manager Advanced Features

  • Multi-account management support through controlled cookie clearing and re-authentication.
  • Automated status polling capabilities to detect successful mobile app confirmation in real-time.
  • Cross-platform image rendering logic to support both GUI-based and headless Openclaw Skills clients.
  • Safety-first execution with mandatory user confirmation hooks for session-destructive actions like deleting cookies.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*