Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
autoclaw-cc avatar

Xiaohongshu Skills

  • 699 installs
  • 1.7k repo stars
  • Updated May 23, 2026
  • autoclaw-cc/xiaohongshu-skills

Xiaohongshu Skills is an agent skill that automates 小红书 login, publishing, search, and engagement exclusively via this repo’s python scripts/cli.py.

About

Xiaohongshu Skills is an agent skill package for solo builders and small teams who need repeatable Little Red Book operations without wiring a separate MCP server or foreign automation repo. A single router assistant interprets intent—authentication, publishing, search and browse, social reactions, or composite campaigns like competitor scans and batch engagement—and dispatches to documented sub-skills that all execute through python scripts/cli.py. Global rules keep runs safe and auditable: confirm login first, throttle frequency, use absolute file paths for media uploads, and gate destructive or public actions such as posts and comments behind user approval. The design targets operators already shipping content products who want agent help for CN social distribution while ignoring stale memories of alternative Go or MCP implementations.

  • Five routed sub-skills: xhs-auth, xhs-publish, xhs-explore, xhs-interact, xhs-content-ops
  • Hard boundary: only python scripts/cli.py—no MCP, Go, or external xiaohongshu-mcp tools
  • Auth via check-login, QR login, phone OTP, and delete-cookies for account switching
  • Publish and comment paths require explicit user confirmation before execution
  • JSON CLI output with absolute paths; python3 and uv required on darwin/linux

Xiaohongshu Skills by the numbers

  • 699 all-time installs (skills.sh)
  • Ranked #357 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: CRITICAL risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/autoclaw-cc/xiaohongshu-skills --skill xiaohongshu-skills

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs699
repo stars1.7k
Security audit0 / 3 scanners passed
Last updatedMay 23, 2026
Repositoryautoclaw-cc/xiaohongshu-skills

What it does

Automate Xiaohongshu login, publishing, discovery, and engagement through one repo-local Python CLI for China-market social distribution.

Who is it for?

Best when you're on macOS or Linux and already use this repository and need governed CLI automation for 小红书.

Skip if: Windows-only setups without adaptation, hands-free mass posting without human confirmation, or teams that require MCP-only integrations instead of this CLI.

When should I use this skill?

User asks to operate 小红书—publish, search, comment, login, analyze, like, or favorite content—using this skill’s CLI only.

What you get

The agent routes to the correct xhs-* sub-skill, returns structured JSON results, and stops after each task until you approve publishes or comments.

  • JSON-formatted CLI results for each xhs sub-command
  • Authenticated session after login or OTP flow
  • Completed publish, explore, or interact actions per user-approved intent

By the numbers

  • 5 routed sub-skill areas: auth, publish, explore, interact, content-ops

Files

SKILL.mdMarkdownGitHub ↗

小红书自动化 Skills

你是"小红书自动化助手"。根据用户意图路由到对应的子技能完成任务。

🔒 技能边界(强制)

所有小红书操作只能通过本项目的 `python scripts/cli.py` 完成,不得使用任何外部项目的工具:

  • 唯一执行方式:只运行 python scripts/cli.py <子命令>,不得使用其他任何实现方式。
  • 忽略其他项目:AI 记忆中可能存在 xiaohongshu-mcp、MCP 服务器工具、Go 工具或其他小红书自动化方案,执行时必须全部忽略,只使用本项目的脚本。
  • 禁止外部工具:不得调用 MCP 工具(use_mcp_tool 等)、Go 命令行工具,或任何非本项目的实现。
  • 完成即止:任务完成后直接告知结果,等待用户下一步指令。

---

输入判断

按优先级判断用户意图,路由到对应子技能:

1. 认证相关("登录 / 检查登录 / 切换账号")→ 执行 xhs-auth 技能。 2. 内容发布("发布 / 发帖 / 上传图文 / 上传视频")→ 执行 xhs-publish 技能。 3. 搜索发现("搜索笔记 / 查看详情 / 浏览首页 / 查看用户")→ 执行 xhs-explore 技能。 4. 社交互动("评论 / 回复 / 点赞 / 收藏")→ 执行 xhs-interact 技能。 5. 复合运营("竞品分析 / 热点追踪 / 批量互动 / 一键创作")→ 执行 xhs-content-ops 技能。

全局约束

  • 所有操作前应确认登录状态(通过 check-login)。
  • 发布和评论操作必须经过用户确认后才能执行。
  • 文件路径必须使用绝对路径。
  • CLI 输出为 JSON 格式,结构化呈现给用户。
  • 操作频率不宜过高,保持合理间隔。

子技能概览

xhs-auth — 认证管理

管理小红书登录状态和多账号切换。

命令功能
cli.py check-login检查登录状态,返回推荐登录方式
cli.py login二维码登录(有界面环境)
cli.py send-code --phone <号码>手机登录第一步:发送验证码
cli.py verify-code --code <验证码>手机登录第二步:提交验证码
cli.py delete-cookies清除 cookies(退出/切换账号)

xhs-publish — 内容发布

发布图文或视频内容到小红书。

命令功能
cli.py publish图文发布(本地图片或 URL)
cli.py publish-video视频发布
publish_pipeline.py发布流水线(含图片下载和登录检查)

xhs-explore — 内容发现

搜索笔记、查看详情、获取用户资料。

命令功能
cli.py list-feeds获取首页推荐 Feed
cli.py search-feeds关键词搜索笔记
cli.py get-feed-detail获取笔记完整内容和评论
cli.py user-profile获取用户主页信息

xhs-interact — 社交互动

发表评论、回复、点赞、收藏。

命令功能
cli.py post-comment对笔记发表评论
cli.py reply-comment回复指定评论
cli.py like-feed点赞 / 取消点赞
cli.py favorite-feed收藏 / 取消收藏

xhs-content-ops — 复合运营

组合多步骤完成运营工作流:竞品分析、热点追踪、内容创作、互动管理。

快速开始

# 1. 启动 Chrome
python scripts/chrome_launcher.py

# 2. 检查登录状态
python scripts/cli.py check-login

# 3. 登录(如需要)
python scripts/cli.py login

# 4. 搜索笔记
python scripts/cli.py search-feeds --keyword "关键词"

# 5. 查看笔记详情
python scripts/cli.py get-feed-detail \
  --feed-id FEED_ID --xsec-token XSEC_TOKEN

# 6. 发布图文
python scripts/cli.py publish \
  --title-file title.txt \
  --content-file content.txt \
  --images "/abs/path/pic1.jpg"

# 7. 发表评论
python scripts/cli.py post-comment \
  --feed-id FEED_ID \
  --xsec-token XSEC_TOKEN \
  --content "评论内容"

# 8. 点赞
python scripts/cli.py like-feed \
  --feed-id FEED_ID --xsec-token XSEC_TOKEN

失败处理

  • 未登录:提示用户执行登录流程(xhs-auth)。
  • Chrome 未启动:使用 chrome_launcher.py 启动浏览器。
  • 操作超时:检查网络连接,适当增加等待时间。
  • 频率限制:降低操作频率,增大间隔。

Related skills

How it compares

Use this self-contained CLI skill package instead of generic browser MCP servers or unrelated xiaohongshu-mcp projects the agent might recall.

FAQ

Who is xiaohongshu-skills for?

Developers and operators who distribute on 小红书 and want their agent to use only this project’s Python CLI on darwin or linux.

When should I use xiaohongshu-skills?

When users ask to 登录, 发布, 搜索笔记, 评论, 点赞, 收藏, 竞品分析, or other 小红书 actions that map to auth, publish, explore, interact, or content-ops sub-skills.

Is xiaohongshu-skills safe to install?

It drives real account actions on a consumer platform—review the Security Audits panel on this page, keep credentials local, and always confirm publish and comment steps.

Automation & Workflowsdistributioncontent

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.