xhs-login

xhs-login is a skill for Claude Code, Codex from autoclaw-cc/xiaohongshu-mcp-skills. It costs 64 tokens per session (521 once invoked), scanned A, original, MIT.

A guide for managing the login state of Xiaohongshu, a Chinese social media app also known as Little Red Book. It supports checking the current account and signing in with a QR code.

In plain words
What is it for?
Use it to check whether Xiaohongshu is logged in, show a QR code for sign-in, confirm that scanning worked, or prepare a switch to another account after confirmation to clear the current login.
Why use it?
It makes login checks and account switching explicit, including the need for the user to scan a temporary code with the mobile app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check whether Xiaohongshu is logged in, show a QR code for sign-in, confirm that scanning worked, or prepare a switch to another account after confirmation to clear the current login.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add autoclaw-cc/xiaohongshu-mcp-skills --skill xhs-login
Clone the repo
git clone --depth 1 https://github.com/autoclaw-cc/xiaohongshu-mcp-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xhs-login

README.md
[![agentmods](https://agentmods.dev/badge/skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login/github.svg)](https://agentmods.dev/skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login)
Your own site
<a href="https://agentmods.dev/skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login"><img src="https://agentmods.dev/badge/skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xhs-login

Your own site · 80×15
<a href="https://agentmods.dev/skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login"><img src="https://agentmods.dev/badge/skills/autoclaw-cc/xiaohongshu-mcp-skills/xhs-login.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.00521
Opus 5 $0.00032 $0.00260
Sonnet 5 $0.00013 $0.00104
Haiku 4.5 $0.00006 $0.00052

Measured 12d ago against content hash 5ff373e23ecb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

xhs-login scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/xhs-login/SKILL.md · 56 lines

What it actually says

执行流程

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
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 56 lines · 64 tokens per session scan A 5ff373e23ecb

Subscribe to this mod's changes

xhs-login is a skill published in the GitHub repository autoclaw-cc/xiaohongshu-mcp-skills (257 stars, last pushed 6mo ago), licensed MIT. It adds 64 tokens to every session and 521 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens