Agent skill

Xiaohongshu

by zhjiang22 in zhjiang22/openclaw-xhs

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

MITAuto-check passed

Install Xiaohongshu

skills CLI
$ npx skills add zhjiang22/openclaw-xhs --skill xiaohongshu -a claude-code

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

GitHub CLI
$ gh skill install zhjiang22/openclaw-xhs xiaohongshu --agent claude-code

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

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

Facts

Skill name
xiaohongshu
GitHub stars
123
Used in
1 other repo
Token cost
~1.1k tokens
SKILL.md length
223 words
Files
26 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

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

  • SKILL.md covers 前置条件, 核心数据流, 脚本参考 and MCP 工具详细参数, plus 3 more sections
  • Runs Shell and Python scripts from its folder; calls apt-get

What it does

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

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 26 other files, including scripts (for example `README.md`, `README_CN.md` and `scripts/comment.sh`).

It works with Xiaohongshu and Model Context Protocol. The repository describes itself as: 🔥 让 OpenClaw 读懂你的小红书 — MCP 集成 + 热点跟踪 + 个人记忆库导出. The licence is MIT.

Example prompts

  • “搜一下小红书上的XX”
  • “跟踪一下小红书上的XX热点”
  • “分析小红书上关于XX的讨论”
  • “/xiaohongshu”

Requirements

  • Python 3
  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 8b6fca2. 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

    Ships 15 files in scripts/ (Shell and Python, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • apt-get

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    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

Xiaohongshu loads about 1.1k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 223 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from zhjiang22/openclaw-xhs at commit 8b6fca2, republished under its MIT licence (© zhjiang22). 223 words, ~1,116 tokens.

Download SKILL.mdSave it as .claude/skills/xiaohongshu/SKILL.md (or your agent's skills folder). This skill also uses 25 other files; get the full folder from GitHub.
name
xiaohongshu
description
小红书(RedNote)内容工具。使用场景: - 搜索小红书笔记并获取详情 - 获取首页推荐列表 - 获取帖子详情(正文、图片、互动数据、评论) - 发表评论 / 回复评论 - 获取用户主页和笔记列表 - 点赞、收藏帖子 - 发布图文或视频笔记 - 热点话题跟踪与分析报告 - 帖子导出为长图 触发词示例: - "搜一下小红书上的XX" - "跟踪一下小红书上的XX热点" - "分析小红书上关于XX的讨论" - "小红书XX话题报告" - "生成XX的小红书舆情报告"

小红书 MCP Skill

基于 xiaohongshu-mcp 封装的 shell 脚本工具集。

前置条件

bash
cd scripts/
./install-check.sh    # 检查依赖(xiaohongshu-mcp、jq、python3)
./start-mcp.sh        # 启动 MCP 服务(默认端口 18060)
./status.sh           # 确认已登录

未登录时需扫码:mcp-call.sh get_login_qrcode 获取二维码,用小红书 App 扫码。

服务端口可通过 MCP_URL 环境变量覆盖(默认 http://localhost:18060/mcp)。

核心数据流

重要: 大多数操作需要 feed_id + xsec_token 配对。这两个值从搜索/推荐/用户主页结果中获取,不可自行构造。

search_feeds / list_feeds / user_profile
        │
        ▼
  返回 feeds 数组,每个 feed 包含:
  ├── id          → 用作 feed_id
  ├── xsecToken   → 用作 xsec_token
  └── noteCard    → 标题、作者、封面、互动数据
        │
        ▼
  get_feed_detail(feed_id, xsec_token)
        │
        ▼
  返回完整笔记: 正文、图片列表、评论列表
  评论中包含 comment_id、user_id(用于回复评论)

脚本参考

脚本用途参数
search.sh <关键词>搜索笔记关键词
recommend.sh首页推荐无
post-detail.sh <feed_id> <xsec_token>帖子详情+评论从搜索结果获取
comment.sh <feed_id> <xsec_token> <内容>发表评论从搜索结果获取
user-profile.sh <user_id> <xsec_token>用户主页+笔记从搜索结果获取
track-topic.sh <话题> [选项]热点分析报告--limit N --output file --feishu
export-long-image.sh帖子导出长图--posts-file json -o output.jpg
mcp-call.sh <tool> [json_args]通用 MCP 调用见下方工具表
start-mcp.sh启动服务--headless=false --port=N
stop-mcp.sh停止服务无
status.sh检查登录无
install-check.sh检查依赖无

MCP 工具详细参数

search_feeds — 搜索笔记
json
{"keyword": "咖啡", "filters": {"sort_by": "最新", "note_type": "图文", "publish_time": "一周内"}}

filters 可选字段:

  • sort_by: 综合 | 最新 | 最多点赞 | 最多评论 | 最多收藏
  • note_type: 不限 | 视频 | 图文
  • publish_time: 不限 | 一天内 | 一周内 | 半年内
  • search_scope: 不限 | 已看过 | 未看过 | 已关注
  • location: 不限 | 同城 | 附近
get_feed_detail — 帖子详情
json
{"feed_id": "...", "xsec_token": "...", "load_all_comments": true, "limit": 20}
  • load_all_comments: false(默认) 返回前10条,true 滚动加载更多
  • limit: 加载评论上限(仅 load_all_comments=true 时生效),默认 20
  • click_more_replies: 是否展开二级回复,默认 false
  • reply_limit: 跳过回复数超过此值的评论,默认 10
  • scroll_speed: slow | normal | fast
post_comment_to_feed — 发表评论
json
{"feed_id": "...", "xsec_token": "...", "content": "写得真好!"}
reply_comment_in_feed — 回复评论
json
{"feed_id": "...", "xsec_token": "...", "content": "谢谢!", "comment_id": "...", "user_id": "..."}

comment_id 和 user_id 从 get_feed_detail 返回的评论列表中获取。

user_profile — 用户主页
json
{"user_id": "...", "xsec_token": "..."}

user_id 从 feed 的 noteCard.user.userId 获取,xsec_token 使用该 feed 的 xsecToken。

like_feed — 点赞/取消
json
{"feed_id": "...", "xsec_token": "..."}
{"feed_id": "...", "xsec_token": "...", "unlike": true}
favorite_feed — 收藏/取消
json
{"feed_id": "...", "xsec_token": "..."}
{"feed_id": "...", "xsec_token": "...", "unfavorite": true}
publish_content — 发布图文
json
{"title": "标题(≤20字)", "content": "正文(≤1000字)", "images": ["/path/to/img.jpg"], "tags": ["美食","旅行"]}
  • images: 至少1张,支持本地路径或 HTTP URL
  • tags: 可选,话题标签
  • schedule_at: 可选,定时发布(ISO8601,1小时~14天内)
publish_with_video — 发布视频
json
{"title": "标题", "content": "正文", "video": "/path/to/video.mp4"}
其他工具
工具参数说明
check_login_status无检查登录状态
list_feeds无获取首页推荐
get_login_qrcode无获取登录二维码(Base64 PNG)
delete_cookies无删除 cookies,重置登录

热点跟踪

自动搜索 → 拉取详情 → 生成 Markdown 报告。

bash
./track-topic.sh "DeepSeek" --limit 5
./track-topic.sh "春节旅游" --limit 10 --output report.md
./track-topic.sh "iPhone 16" --limit 5 --feishu    # 导出飞书

报告包含:概览统计、热帖详情(正文+热评)、评论关键词、趋势分析。

长图导出

将帖子导出为白底黑字的 JPG 长图。

bash
./export-long-image.sh --posts-file posts.json -o output.jpg

posts.json 格式:

json
[{
  "title": "标题", "author": "作者", "stats": "1.3万赞",
  "desc": "正文摘要", "images": ["https://..."],
  "per_image_text": {"1": "第2张图的说明"}
}]

依赖:Python 3.10+、Pillow。

注意事项

  • Cookies 有效期约 30 天,过期需重新扫码
  • 首次启动会下载 headless 浏览器(~150MB)
  • 同一账号避免多客户端同时操作
  • 发布限制:标题≤20字符,正文≤1000字符,日发布≤50条
  • Linux 服务器无桌面环境需安装 xvfb(apt-get install xvfb,脚本自动管理)

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

Files

SKILL.md and 25 other files (scripts) in the repository root of zhjiang22/openclaw-xhs.

  • SKILL.md
  • .gitignore
  • LICENSE
  • README.md
  • README_CN.md
  • scripts/comment.sh
  • scripts/export-long-image.py
  • scripts/export-long-image.sh
  • scripts/install-check.sh
  • scripts/login.sh
  • scripts/mcp-call.sh
  • scripts/post-detail.sh
  • scripts/recommend.sh
  • scripts/search.sh
  • scripts/start-mcp.sh
  • scripts/status.sh
  • scripts/stop-mcp.sh
  • scripts/track-topic.py
  • scripts/track-topic.sh
  • scripts/user-profile.sh
  • … and 6 more

Open the folder on GitHubat commit 8b6fca2

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in zhjiang22/openclaw-xhs, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Xiaohongshu 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.

Xiaohongshu compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xiaohongshu this skillzhjiang22/openclaw-xhs1231 repos~1.1kAutomated safety check: PassMIT
Xiaohongshu Skillsautoclaw-cc/xiaohongshu-skills1.9k—~748Automated safety check: PassMIT
Media Crawlertsingyuai/growth-lab2k—~731Automated safety check: PassApache-2.0
Qiaomu Codex Imagegenjoeseesun/qiaomu-codex-imagegen125—~2.3kAutomated safety check: PassMIT
Xhs Authautoclaw-cc/xiaohongshu-skills1.9k—~832Automated safety check: PassMIT
Sandbasesandbaseai/cli188—~3.1kAutomated safety check: PassApache-2.0

Similar 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
  • 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
  • Xhs Auth

    autoclaw-cc/xiaohongshu-skills

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

    1.9k GitHub stars~832 tokensUpdated 4 mo ago
    Auto-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

Questions about Xiaohongshu

What does Xiaohongshu do?

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

How do I install Xiaohongshu in Claude Code?

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

How do I install Xiaohongshu in Codex?

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

Can I use Xiaohongshu 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 zhjiang22/openclaw-xhs --skill xiaohongshu -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xiaohongshu, .gemini/skills/xiaohongshu, .github/skills/xiaohongshu and .opencode/skills/xiaohongshu in your project.

What does Xiaohongshu need to run?

Going by SKILL.md and its folder, Xiaohongshu needs a shell and Python for the scripts in its folder and the command-line tools its instructions call (apt-get). Our summary lists: Python 3; A Bash shell.

Does Xiaohongshu access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Xiaohongshu 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Xiaohongshu use?

Xiaohongshu is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Xiaohongshu use?

About 1.1k tokens (SKILL.md is roughly 4.5k 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 Xiaohongshu?

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

Who maintains Xiaohongshu?

zhjiang22 (a GitHub user) maintains it in zhjiang22/openclaw-xhs, which has 123 GitHub stars. The repository was last updated on March 8, 2026.

Source: zhjiang22/openclaw-xhs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.