小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录. An agent skill from autoclaw-cc/xiaohongshu-skills.

MITAuto-check passed

Install Xhs Auth

skills CLI
$ npx skills add autoclaw-cc/xiaohongshu-skills --skill xhs-auth -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install autoclaw-cc/xiaohongshu-skills xhs-auth --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/autoclaw-cc/xiaohongshu-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/xhs-auth .claude/skills/xhs-auth && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xhs-auth
GitHub stars
1.9k
Token cost
~832 tokens
SKILL.md length
181 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录. An agent skill from autoclaw-cc/xiaohongshu-skills.

  • Works in 3 steps: 用户要求"检查登录 / 是否登录 / 登录状态":执行登录状态检查。 → 用户要求"登录 / 扫码登录 / 手机登录 / 打开登录页":执行登录流程。 → 用户要求"退出登录 / 清除登录":执行 delete-cookies。
  • SKILL.md covers 🔒 技能边界(强制), 输入判断, 必做约束 and 工作流程, plus 1 more section
  • Calls python

What it does

Xhs Auth is an agent skill from autoclaw-cc/xiaohongshu-skills. 小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录。 当用户要求登录小红书、检查登录状态、退出登录时触发。

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Xiaohongshu and Model Context Protocol. The licence is MIT.

Example prompts

  • “/xhs-auth”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 用户要求"检查登录 / 是否登录 / 登录状态":执行登录状态检查。
  2. 用户要求"登录 / 扫码登录 / 手机登录 / 打开登录页":执行登录流程。
  3. 用户要求"退出登录 / 清除登录":执行 delete-cookies。

What it can do on your machine

Read from SKILL.md and the folder at commit b043748. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Xhs Auth loads about 832 tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 181 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~18
When it runs · the whole SKILL.md, loaded when a task matches
~832

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from autoclaw-cc/xiaohongshu-skills at commit b043748, republished under its MIT licence (© autoclaw-cc). 181 words, ~832 tokens.

Download SKILL.mdSave it as .claude/skills/xhs-auth/SKILL.md (or your agent's skills folder).
name
xhs-auth
description
小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录。 当用户要求登录小红书、检查登录状态、退出登录时触发。
version
2.0.0

小红书认证管理

你是"小红书认证助手"。负责管理小红书登录状态。

🔒 技能边界(强制)

所有认证操作只能通过本项目的 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

输入判断

按优先级判断用户意图:

  1. 用户要求"检查登录 / 是否登录 / 登录状态":执行登录状态检查。
  2. 用户要求"登录 / 扫码登录 / 手机登录 / 打开登录页":执行登录流程。
  3. 用户要求"退出登录 / 清除登录":执行 delete-cookies。

必做约束

  • 所有 CLI 命令位于 scripts/cli.py,输出 JSON。
  • 如果使用文件路径,必须使用绝对路径。
  • 不要频繁重复登录或退出登录,避免触发账号风控。

工作流程

第一步:检查登录状态
bash
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 扫描以下二维码登录:

![小红书登录二维码]({qrcode_image_url})

您也可以在手机浏览器中直接访问此链接完成登录:
{qr_login_url}

展示规范(必须全部遵守):

  1. 展示二维码图片(qrcode_image_url)。
  2. 如果输出含 qr_login_url,必须同时展示该链接并提示用户"也可以在手机浏览器中直接访问此链接完成登录"。
  3. 禁止省略 qr_login_url,即使已展示了二维码图片。

图片内嵌在对话窗口,用户可以扫码或直接访问链接登录。

第二步 — 等待登录完成(单次调用,无需轮询):

bash
python scripts/cli.py wait-login
  • 连接已有浏览器 tab,内部阻塞等待(最多 120 秒)。
  • 输出 {"logged_in": true} 则完成;超时则提示用户重新运行 get-qrcode 刷新二维码。

二维码过期刷新:如需单独刷新二维码(如超时后),可运行 get-qrcode,它仍作为独立命令保留。

方式 B:手机验证码登录(无界面服务器,分两步)

⚠️ 强制要求:必须先向用户确认手机号,即使上下文中已有手机号也不得跳过。

  • 用户可能要登录不同账号,手机号可能已变更。
  • 禁止从历史对话、记忆或上下文中自动填入手机号。
  • 每次登录都必须明确向用户询问并得到确认后才能执行 send-code。

第一步 — 向用户确认手机号,然后发送验证码:

必须先问用户:"请提供您要登录的手机号(不含国家码,如 13800138000)"。 收到用户明确回复手机号后,才能执行以下命令。不得跳过此步。

bash
python scripts/cli.py send-code --phone <用户确认的手机号>
  • 自动填写手机号、勾选用户协议、点击"获取验证码"。
  • 正常输出:{"status": "code_sent", "message": "..."}
  • 频率限制:自动切换为二维码登录,输出含 qrcode_image_url。告知用户"验证码发送受限,已切换为二维码登录",按方式 A 的展示规范展示二维码,然后运行 wait-login。

第二步 — 向用户询问验证码,然后提交登录:

告知用户验证码已发送,询问:"请输入您收到的 6 位短信验证码",获得回复后再执行以下命令。

bash
python scripts/cli.py verify-code --code <用户提供的6位验证码>
  • 自动填写验证码、点击登录。
  • 输出:{"logged_in": true, "message": "登录成功"}
清除 Cookies(退出登录)

delete-cookies 命令内部自动完成两步:先通过页面 UI 点击「更多」→「退出登录」,再删除本地 cookies 文件。只需执行一条命令即可。

bash
python scripts/cli.py delete-cookies

失败处理

  • 验证码错误:输出包含 "logged_in": false,重新运行 verify-code --code <新验证码>。
  • 二维码超时:重新执行 get-qrcode 获取新二维码,再运行 wait-login。
  • 扩展未连接:CLI 会自动打开 Chrome 并等待扩展连接,若超时提示用户检查 XHS Bridge 扩展是否已安装并启用。

© autoclaw-cc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/xhs-auth of autoclaw-cc/xiaohongshu-skills.

Open the folder on GitHubat commit b043748

Compare with similar skills

Xhs Auth next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Xhs Auth compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xhs Auth this skillautoclaw-cc/xiaohongshu-skills1.9k—~832Automated safety check: PassMIT
Xiaohongshuzhjiang22/openclaw-xhs1231 repos~1.1kAutomated safety check: PassMIT
Media Crawlertsingyuai/growth-lab2k—~731Automated safety check: PassApache-2.0
Qiaomu Codex Imagegenjoeseesun/qiaomu-codex-imagegen125—~2.3kAutomated safety check: PassMIT
Sandbasesandbaseai/cli188—~3.1kAutomated safety check: PassApache-2.0
Xiaohongshu Content Researchjumodada/Drissionpage-MCP-Server487—~768Automated safety check: PassCustom licence

Similar skills

  • Xiaohongshu

    zhjiang22/openclaw-xhs

    小红书(RedNote)内容工具。使用场景: - 搜索小红书笔记并获取详情 - 获取首页推荐列表 - 获取帖子详情(正文、图片、互动数据、评论) - 发表评论 / 回复评论 - 获取用户主页和笔记列表 - 点赞、收藏帖子 - 发布图文或视频笔记 - 热点话题跟踪与分析报告 - 帖子导出为长图 触发词示例: - "搜一下小红书上的XX" - "跟踪一下小红书上的XX热点" -…

    123 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Media Crawler

    tsingyuai/growth-lab

    Install, authenticate, configure, operate, and troubleshoot the external MediaCrawler client shared by Douyin, Kuaishou, Bilibili, Weibo, Tieba, and Zhihu collectors.

    2k GitHub stars~731 tokensUpdated 12 days ago
    Data & AnalyticsAuto-check passed
  • Qiaomu Codex Imagegen

    joeseesun/qiaomu-codex-imagegen

    Generate or edit images with Codex's built-in image generation from any agent, through an MCP tool or a plain CLI.

    125 GitHub stars~2.3k tokensUpdated 7 days ago
    Media & CreativeAuto-check passed
  • Sandbase

    sandbaseai/cli

    Discover better ways to complete tasks. An agent skill from sandbaseai/cli.

    188 GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Xiaohongshu Content Research

    jumodada/Drissionpage-MCP-Server

    A skill your agent uses for authorized, read-only research on public Xiaohongshu content or the local Xiaohongshu-like playground fixture.

    487 GitHub stars~768 tokensUpdated 27 days ago
    Productivity & AutomationAuto-check passed
  • Setup Xhs MCP

    autoclaw-cc/xiaohongshu-mcp-skills

    安装部署 xiaohongshu-mcp 服务并配置 MCP 连接,引导用户完成从零到可用的全流程. An agent skill from autoclaw-cc/xiaohongshu-mcp-skills.

    272 GitHub stars~678 tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed

More from autoclaw-cc/xiaohongshu-skills

  • Xiaohongshu Skills

    autoclaw-cc/xiaohongshu-skills

    小红书自动化技能集合。支持认证登录、内容发布、搜索发现、社交互动、复合运营. An agent skill from autoclaw-cc/xiaohongshu-skills.

    1.9k GitHub stars~748 tokensUpdated 4 mo ago
    Auto-check passed
  • Xhs Content Ops

    autoclaw-cc/xiaohongshu-skills

    小红书复合内容运营技能。组合搜索、详情、发布、互动等能力完成运营工作流. An agent skill from autoclaw-cc/xiaohongshu-skills.

    1.9k GitHub stars~919 tokensUpdated 4 mo ago
    Auto-check passed
  • Xhs Explore

    autoclaw-cc/xiaohongshu-skills

    小红书内容发现与分析技能。搜索笔记、浏览首页、查看详情、获取用户资料. An agent skill from autoclaw-cc/xiaohongshu-skills.

    1.9k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Xhs Interact

    autoclaw-cc/xiaohongshu-skills

    小红书社交互动技能。发表评论、回复评论、点赞、收藏. An agent skill from autoclaw-cc/xiaohongshu-skills.

    1.9k GitHub stars~637 tokensUpdated 4 mo ago
    Auto-check passed
  • Xhs Publish

    autoclaw-cc/xiaohongshu-skills

    小红书内容发布技能。支持图文发布、视频发布、长文发布、定时发布、标签、可见性设置. An agent skill from autoclaw-cc/xiaohongshu-skills.

    1.9k GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Xhs Auth

What does Xhs Auth do?

小红书认证管理技能。检查登录状态、登录(二维码或手机号)、退出登录. An agent skill from autoclaw-cc/xiaohongshu-skills. Xhs Auth is an agent skill from autoclaw-cc/xiaohongshu-skills.

How do I install Xhs Auth in Claude Code?

Run `npx skills add autoclaw-cc/xiaohongshu-skills --skill xhs-auth -a claude-code`. Or copy the skill folder (skills/xhs-auth in autoclaw-cc/xiaohongshu-skills) into .claude/skills/xhs-auth in your project. Claude Code loads it when a task matches its description.

How do I install Xhs Auth in Codex?

Run `npx skills add autoclaw-cc/xiaohongshu-skills --skill xhs-auth -a codex`. Or copy the skill folder (skills/xhs-auth in autoclaw-cc/xiaohongshu-skills) into .agents/skills/xhs-auth in your project. Codex loads it when a task matches its description.

Can I use Xhs Auth in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add autoclaw-cc/xiaohongshu-skills --skill xhs-auth -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xhs-auth, .gemini/skills/xhs-auth, .github/skills/xhs-auth and .opencode/skills/xhs-auth in your project.

What does Xhs Auth need to run?

Going by SKILL.md and its folder, Xhs Auth needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Xhs Auth access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Xhs Auth safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Xhs Auth use?

Xhs Auth is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Xhs Auth use?

About 832 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Xhs Auth?

Skills that share tags, products or a category with Xhs Auth: Xiaohongshu (zhjiang22/openclaw-xhs, 123 stars), Media Crawler (tsingyuai/growth-lab, 2k stars), Qiaomu Codex Imagegen (joeseesun/qiaomu-codex-imagegen, 125 stars) and Sandbase (sandbaseai/cli, 188 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xhs Auth?

autoclaw-cc (a GitHub organization) maintains it in autoclaw-cc/xiaohongshu-skills, which has 1,949 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on May 23, 2026.

Source: autoclaw-cc/xiaohongshu-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.