ModLens Image Vision Bridge
liustack/modlens
Gives text-only models sight by running the modlens CLI on an image path or URL and returning structured JSON evidence with transcribed text, layout and semantics.
小红书全能助手 — 文案生成、封面制作、内容发布与管理。当用户要求写小红书笔记、生成小红书文案/标题/封面、发小红书、搜索小红书、评论点赞收藏等任何小红书相关操作时使用。支持一站式从文案创作到自动发布的完整流程。封面AI生图需配置可选环境变量(GEMINIAPIKEY 或 IMGAPIKEY 或 HUNYUANSECRETID+KEY)。
$ npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills xiaohongshu --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/xhs .claude/skills/xiaohongshu && rm -rf skills-srcUse ~/.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/
Install the "xiaohongshu" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhs into .claude/skills/xiaohongshu/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xiaohongshu", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills xiaohongshu --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/xhs .agents/skills/xiaohongshu && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "xiaohongshu" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhs into .agents/skills/xiaohongshu/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xiaohongshu", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills xiaohongshu --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/xhs .cursor/skills/xiaohongshu && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "xiaohongshu" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhs into .cursor/skills/xiaohongshu/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xiaohongshu", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/xhs--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills xiaohongshu --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/xhs .gemini/skills/xiaohongshu && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "xiaohongshu" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhs into .gemini/skills/xiaohongshu/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xiaohongshu", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills xiaohongshuInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/xhs .github/skills/xiaohongshu && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "xiaohongshu" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhs into .github/skills/xiaohongshu/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xiaohongshu", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills xiaohongshu --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/xhs .opencode/skills/xiaohongshu && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "xiaohongshu" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/xhs into .opencode/skills/xiaohongshu/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xiaohongshu", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
xiaohongshu小红书全能助手 — 文案生成、封面制作、内容发布与管理。当用户要求写小红书笔记、生成小红书文案/标题/封面、发小红书、搜索小红书、评论点赞收藏等任何小红书相关操作时使用。支持一站式从文案创作到自动发布的完整流程。封面AI生图需配置可选环境变量(GEMINIAPIKEY 或 IMGAPIKEY 或 HUNYUANSECRETID+KEY)。
Xiaohongshu is an agent skill from LeoYeAI/openclaw-master-skills. 小红书全能助手 — 文案生成、封面制作、内容发布与管理。当用户要求写小红书笔记、生成小红书文案/标题/封面、发小红书、搜索小红书、评论点赞收藏等任何小红书相关操作时使用。支持一站式从文案创作到自动发布的完整流程。封面AI生图需配置可选环境变量(GEMINIAPIKEY 或 IMGAPIKEY 或 HUNYUANSECRETID+KEY)。
Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `_meta.json`, `check_env.sh` and `references/content-guide.md`).
It sits in AI & LLM Engineering, covering LLM API integration. It works with Xiaohongshu, Google Gemini, OpenAI and Bash. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
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.
Ships 2 files in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
curlbashjqaptyumwgetFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comapi.openai.comAlso links to:
aistudio.google.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
XHS_AI_API_KEYGEMINI_API_KEYIMG_API_KEYHUNYUAN_SECRET_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Xiaohongshu loads about 3.6k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 47 tokens; SKILL.md has 561 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
sudo apt update && sudo apt install -y xvfb imagemagick zbar-tools xdotool fonts-noto-cjksudo yum install -y xorg-x11-server-Xvfb ImageMagick zbar xdotoolsudo systemctl enable xvfb && sudo systemctl start xvfbsudo systemctl daemon-reloadsudo systemctl enable xhs-mcp && sudo systemctl start xhs-mcpAutomated 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.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 561 words, ~3,576 tokens.
.claude/skills/xiaohongshu/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.两大核心能力:文案创作(标题+正文+封面图)和 平台操作(发布+搜索+互动)。
文案创作默认使用当前对话的主模型,无需额外配置。
当用户询问"有哪些模型"、"当前模型"、"可用模型"、"能用什么模型"时,读取配置文件展示:
# 查看当前主模型
cat ~/.openclaw/openclaw.json | jq -r '.agents.defaults.model.primary // .agents.defaults.model // "未设置"' 2>/dev/null
# 查看所有可用模型(提供商/模型ID - 名称)
cat ~/.openclaw/openclaw.json | jq -r '.models.providers | to_entries[] | .key as $p | .value.models[]? | "\($p)/\(.id) - \(.name)"' 2>/dev/null当用户要求写笔记、生成文案、创作小红书内容时,按 标题 → 正文 → 封面图 三步执行,每步需用户确认后再继续。
优先使用当前对话模型直接生成,参考 references/title-guide.md 中的规范生成5个不同风格的标题。
核心要求:每个标题使用不同风格,20字以内,含1-2个emoji,禁用平台禁忌词。
备用方案:如果用户明确配置了 XHS_AI_API_KEY 环境变量并要求使用指定 API,可调用脚本:
bash {baseDir}/scripts/generate.sh title "内容摘要"输出后询问用户:选择哪个标题?可修改或自定义。默认选第一个。
优先使用当前对话模型直接生成,参考 references/content-guide.md 中的规范,根据选定标题生成正文。
核心要求:600-800字,像朋友聊天的语气,禁用列表/编号,用自然段落呈现,文末5-10个#标签。
备用方案:如果用户明确配置了 XHS_AI_API_KEY 环境变量并要求使用指定 API,可调用脚本:
bash {baseDir}/scripts/generate.sh content "完整内容" "选定标题"输出后询问用户:是否满意?可要求修改。确认后进入封面图步骤。
封面图结构:1080x1440(3:4),上半部分为主题图片(1080x720),下半部分为纯色底+标题文字(1080x720)。
必须先询问用户:
封面图的主题图片,你想怎么来?
- AI 自动生成 — 根据文案主题自动生成匹配的图片
- 上传自己的图片 — 提供图片路径,我来帮你拼接封面
继续询问 prompt 方式:
AI图片的提示词,你想怎么来?
- 预设推荐 — 我根据你的文案主题自动生成最佳英文prompt
- 自定义提示词 — 你提供想要的画面描述,我来翻译成英文prompt
预设推荐:Agent 参考 references/cover-guide.md 自动生成英文 prompt,展示给用户确认后执行。
自定义提示词:用户描述画面,Agent 翻译/优化为英文 prompt,展示确认后执行。
确认 prompt 后,根据主题从 references/cover-guide.md 配色库选择底色和字色(必须主动搭配,禁止白底黑字)。
优先尝试当前对话使用的模型直接生图(如果当前模型支持图片生成)。Agent 在自己的对话环境中直接调用生图能力:
/tmp/xhs_ai_img.png)__USER_IMAGE__:/tmp/xhs_ai_img.png,跳过脚本内置的 API 调用如果当前模型不支持生图(生成失败或明确不具备图片生成能力),询问用户:
当前模型不支持图片生成,请选择生图方式:
- Google Gemini — 需要提供 GEMINI_API_KEY(获取地址)
- OpenAI / OpenAI兼容API — 需要提供 API Key 和 Base URL
- 其他方式 — 你来提供图片,我帮你拼接封面
用户选择后,设置对应的环境变量再调用 cover.sh:
GEMINI_API_KEY=xxx bash cover.sh "标题" "prompt" ...IMG_API_TYPE=openai IMG_API_KEY=xxx IMG_API_BASE=https://api.openai.com/v1 IMG_MODEL=dall-e-3 bash cover.sh "标题" "prompt" ...IMG_API_TYPE=hunyuan HUNYUAN_SECRET_ID=AKID... HUNYUAN_SECRET_KEY=... HUNYUAN_REGION=ap-guangzhou bash cover.sh "标题" "prompt" ...__USER_IMAGE__ 模式若用户之前已提供过 API Key(本次会话中),后续生图直接复用,无需重复询问。
直接调用 cover.sh 的命令格式(仅当需要脚本内置 API 生图时):
bash {baseDir}/scripts/cover.sh "标题文字" "英文prompt" [输出路径] [底色hex] [字色hex]用户提供图片路径后,同样搭配底色和字色,执行:
bash {baseDir}/scripts/cover.sh "标题文字" "__USER_IMAGE__:/path/to/image.jpg" [输出路径] [底色hex] [字色hex]__USER_IMAGE__: 前缀会跳过 AI 生成,直接用用户图片裁剪拼接。
convert 或 magick)、中文字体(fonts-noto-cjk)询问用户是否要直接发布到小红书。如果要发布,自动进入下方「平台操作」的发布流程。
当用户要求发帖、搜索、评论等小红书操作时使用。所有命令在云服务器本地执行,MCP 服务运行在 http://localhost:18060/mcp。
每次操作前必须先执行:
bash {baseDir}/check_env.sh返回码:0 = 正常已登录 → 调用工具;1 = 未安装 → 安装 MCP 服务;2 = 未登录 → 扫码登录流程。
⚠️ 极其重要:小红书 MCP 使用 Streamable HTTP 模式。每次调用都必须:初始化 → 获取 Session ID → 带 Session ID 调用工具。三步在同一个 exec 中执行。
MCP_URL="${XHS_MCP_URL:-http://localhost:18060/mcp}"
# 初始化并获取 Session ID
SESSION_ID=$(curl -s -D /tmp/xhs_headers -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"openclaw","version":"1.0"}},"id":1}' > /dev/null && grep -i 'Mcp-Session-Id' /tmp/xhs_headers | tr -d '\r' | awk '{print $2}')
# 确认初始化
curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-H "Mcp-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' > /dev/null
# 调用工具(替换 <工具名> 和 <参数>)
curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-H "Mcp-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"<工具名>","arguments":{<参数>}},"id":2}'注意:每次调用都必须重新初始化获取新 Session ID,三步必须在同一个 exec 中顺序执行。
title: 标题,≤20字(必填)content: 正文,≤1000字(必填)images: 图片本地绝对路径数组(必填),如 ["/tmp/food1.jpg"]title: 标题(必填)content: 描述(必填)video: 视频文件本地绝对路径(必填)keyword: 搜索关键词(必填)feed_id: 帖子ID(从搜索/推荐结果获取,必填)xsec_token: 安全token(从搜索/推荐结果获取,必填)load_all_comments: 是否加载全部评论,默认 false 仅返回前 10 条(可选)click_more_replies: 是否展开二级回复,仅 load_all_comments=true 时生效(可选)limit: 限制加载的一级评论数量,默认 20(可选)reply_limit: 跳过回复数过多的评论,默认 10(可选)scroll_speed: 滚动速度 slow/normal/fast(可选)feed_id: 帖子ID(必填)xsec_token: 安全token(必填)unlike: 是否取消点赞,true=取消,默认 false=点赞(可选)feed_id: 帖子ID(必填)xsec_token: 安全token(必填)unfavorite: 是否取消收藏,true=取消,默认 false=收藏(可选)feed_id: 帖子ID(必填)xsec_token: 安全token(必填)content: 评论内容(必填)feed_id: 帖子ID(必填)xsec_token: 安全token(必填)content: 回复内容(必填)comment_id: 目标评论ID,从评论列表获取(可选)user_id: 目标评论用户ID,从评论列表获取(可选)user_id: 用户ID(必填)xsec_token: 安全token(必填)搜索:
MCP_URL="http://localhost:18060/mcp"
SESSION_ID=$(curl -s -D /tmp/xhs_headers -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"openclaw","version":"1.0"}},"id":1}' > /dev/null && grep -i 'Mcp-Session-Id' /tmp/xhs_headers | tr -d '\r' | awk '{print $2}')
curl -s -X POST "$MCP_URL" -H "Content-Type: application/json" -H "Mcp-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' > /dev/null
curl -s -X POST "$MCP_URL" -H "Content-Type: application/json" -H "Mcp-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_feeds","arguments":{"keyword":"美食探店"}},"id":2}'当前置检查返回 2(未登录)时,询问用户选择登录方式:
需要登录小红书,请选择登录方式:
- 快捷扫码 — 直接获取二维码图片(推荐同城/常用设备)
- 截图扫码 — 通过登录工具截屏获取(推荐异地登录,支持短信验证码)
- 手动Cookie — 直接粘贴浏览器Cookie字符串(推荐已在浏览器登录的用户)
通过 MCP 工具直接获取二维码 Base64 图片,流程简洁,但不支持输入验证码。异地登录可能触发短信验证,此时需切换为方式二。
MCP_URL="${XHS_MCP_URL:-http://localhost:18060/mcp}"
SESSION_ID=$(curl -s -D /tmp/xhs_headers -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"openclaw","version":"1.0"}},"id":1}' > /dev/null && grep -i 'Mcp-Session-Id' /tmp/xhs_headers | tr -d '\r' | awk '{print $2}')
curl -s -X POST "$MCP_URL" -H "Content-Type: application/json" -H "Mcp-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' > /dev/null
curl -s -X POST "$MCP_URL" -H "Content-Type: application/json" -H "Mcp-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_login_qrcode","arguments":{}},"id":2}'从返回结果中提取 Base64 字符串(去掉 data:image/png;base64, 前缀),保存为图片:
# 假设 BASE64_STR 为提取到的 Base64 内容(不含 data:image/png;base64, 前缀)
echo "$BASE64_STR" | base64 -d > /tmp/xhs_qr.png告知用户扫码,扫码后用 check_login_status 工具验证是否登录成功。二维码过期则重新执行步骤 1-3。
通过 GUI 登录工具获取二维码,支持异地登录时输入短信验证码。
所有命令必须用 nohup 后台运行,否则会因超时被中断。
pkill -f xiaohongshu-login 2>/dev/null
sleep 1
cd ~/xiaohongshu-mcp && DISPLAY=:99 nohup ./xiaohongshu-login-linux-amd64 > login.log 2>&1 &
sleep 5DISPLAY=:99 import -window root /tmp/xhs_qr.pngzbarimg -q /tmp/xhs_qr.png告知用户"已发送二维码,请用小红书APP扫码登录",等待用户确认。
export DISPLAY=:99
WIN_ID=$(xdotool search --onlyvisible --name '小红书|xiaohongshu|Xiaohongshu' | head -n1)
xdotool type --window "$WIN_ID" --delay 50 '<CODE>'
xdotool key --window "$WIN_ID" Returncat ~/xiaohongshu-mcp/login.log | tail -5
# 如果显示 "Login successful":
pkill -f xiaohongshu 2>/dev/null
cd ~/xiaohongshu-mcp && DISPLAY=:99 nohup ./xiaohongshu-mcp-linux-amd64 > mcp.log 2>&1 &如用户反馈扫码失败,重复步骤 1-3 获取新二维码。
当用户提供浏览器复制的 Cookie 字符串时,将其转换为 JSON 数组格式并保存到 ~/xiaohongshu-mcp/cookies.json。
用户会提供类似这样的字符串(从浏览器开发者工具复制):
a1=19c464ed2df...; webId=807ede65b...; web_session=040069b4...; xsecappid=xhs-pc-web将用户提供的 Cookie 字符串按 ; 分割每个键值对,转换为如下 JSON 数组格式,保存到 ~/xiaohongshu-mcp/cookies.json:
python3 -c "
import json, sys
cookie_str = sys.argv[1].strip()
cookies = []
for pair in cookie_str.split(';'):
pair = pair.strip()
if '=' not in pair:
continue
name, value = pair.split('=', 1)
cookies.append({
'name': name.strip(),
'value': value.strip(),
'domain': '.xiaohongshu.com',
'path': '/',
'expires': -1,
'httpOnly': name.strip() in ('web_session', 'id_token', 'acw_tc'),
'secure': name.strip() in ('web_session', 'id_token'),
'session': False,
'priority': 'Medium',
'sameParty': False,
'sourceScheme': 'Secure',
'sourcePort': 443
})
with open('$HOME/xiaohongshu-mcp/cookies.json', 'w') as f:
json.dump(cookies, f, ensure_ascii=False)
print(f'✅ 已保存 {len(cookies)} 个 Cookie 到 cookies.json')
" "用户提供的cookie字符串"pkill -f xiaohongshu-mcp-linux 2>/dev/null
sleep 1
cd ~/xiaohongshu-mcp && DISPLAY=:99 nohup ./xiaohongshu-mcp-linux-amd64 > mcp.log 2>&1 &
sleep 3用 check_login_status 工具验证是否登录成功。如果失败,提示用户 Cookie 可能已过期,建议重新从浏览器获取或改用扫码登录。
注意事项:
web_session 和 a1,缺少这两个会导致登录失败当前置检查返回 1 时执行。
hostnamectl根据 Operating System 确定包管理器(apt/yum/dnf),根据 Architecture 确定二进制版本(x86_64=amd64, aarch64=arm64)。
# Ubuntu/Debian
sudo apt update && sudo apt install -y xvfb imagemagick zbar-tools xdotool fonts-noto-cjk
# CentOS/RHEL
sudo yum install -y xorg-x11-server-Xvfb ImageMagick zbar xdotool# 快速启动
Xvfb :99 -screen 0 1920x1080x24 &
# 或 systemd 服务(推荐,开机自启)
cat > /etc/systemd/system/xvfb.service << 'EOF'
[Unit]
Description=X Virtual Frame Buffer
After=network.target
[Service]
ExecStart=/usr/bin/Xvfb :99 -screen 0 1920x1080x24
Restart=always
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable xvfb && sudo systemctl start xvfb项目地址:https://github.com/xpzouying/xiaohongshu-mcp/releases
mkdir -p ~/xiaohongshu-mcp && cd ~/xiaohongshu-mcp
# 根据架构选择(云服务器通常是 x86_64 = amd64)
ARCH="amd64" # 如果是 ARM 服务器改为 arm64
wget https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/xiaohongshu-mcp-linux-${ARCH}.tar.gz
tar xzf xiaohongshu-mcp-linux-${ARCH}.tar.gz
chmod +x xiaohongshu-*推荐使用 systemd 守护(崩溃自动重启 + 开机自启):
cat > /etc/systemd/system/xhs-mcp.service << 'EOF'
[Unit]
Description=Xiaohongshu MCP Service
After=network.target xvfb.service
Requires=xvfb.service
[Service]
Environment=DISPLAY=:99
WorkingDirectory=/root/xiaohongshu-mcp
ExecStart=/root/xiaohongshu-mcp/xiaohongshu-mcp-linux-amd64
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable xhs-mcp && sudo systemctl start xhs-mcp
systemctl status xhs-mcp或手动启动(不推荐,进程退出不会自动恢复):
cd ~/xiaohongshu-mcp
DISPLAY=:99 nohup ./xiaohongshu-mcp-linux-amd64 > mcp.log 2>&1 &
sleep 3
pgrep -f xiaohongshu-mcp && echo "✅ 启动成功" || echo "❌ 启动失败,查看 mcp.log"安装完成后,回到登录流程完成首次登录。
成功:解析 result.content[0].text 获取数据。
错误:
Not logged in: 未登录,走扫码流程Session expired: 会话过期,重新登录Rate limited: 频率限制,稍后重试# MCP 服务是否运行
pgrep -f xiaohongshu-mcp-linux
# Xvfb 是否运行
pgrep -x Xvfb
# 查看 MCP 日志
tail -20 ~/xiaohongshu-mcp/mcp.log
# 查看登录日志
tail -20 ~/xiaohongshu-mcp/login.log
# 检查端口
lsof -i :18060© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 7 other files (scripts, references) in skills/xhs of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Xiaohongshu this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~3.6k | Automated safety check: Notes | MIT | |
| ModLens Image Vision Bridgeliustack/modlens | 4.2k | — | ~1.3k | Automated safety check: Notes | MIT | |
| Using Ccproxy Inspectorstarbaser/ccproxy | 350 | — | ~2.7k | Automated safety check: Pass | Custom licence | |
| Using Ccproxy APIstarbaser/ccproxy | 350 | — | ~4k | Automated safety check: Pass | Custom licence | |
| Mmsp PythonPrism-Shadow/model-message-stream-protocol | 113 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Mmsp TypescriptPrism-Shadow/model-message-stream-protocol | 113 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 |
liustack/modlens
Gives text-only models sight by running the modlens CLI on an image path or URL and returning structured JSON evidence with transcribed text, layout and semantics.
starbaser/ccproxy
Operates the ccproxy inspector MITM system for intercepting, inspecting, and transforming LLM API traffic.
starbaser/ccproxy
Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting.
Prism-Shadow/model-message-stream-protocol
Guidance for using the MMSP Python SDK (mmsp). An agent skill from Prism-Shadow/model-message-stream-protocol.
Prism-Shadow/model-message-stream-protocol
Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp).
neondatabase/agent-skills
One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Works with
Categories
小红书全能助手 — 文案生成、封面制作、内容发布与管理。当用户要求写小红书笔记、生成小红书文案/标题/封面、发小红书、搜索小红书、评论点赞收藏等任何小红书相关操作时使用。支持一站式从文案创作到自动发布的完整流程。封面AI生图需配置可选环境变量(GEMINIAPIKEY 或 IMGAPIKEY 或 HUNYUANSECRETID+KEY)。. Xiaohongshu is an agent skill from LeoYeAI/openclaw-master-skills.
Xiaohongshu fits situations like: tasks that involve LLM API integration.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a claude-code`. Or copy the skill folder (skills/xhs in LeoYeAI/openclaw-master-skills) into .claude/skills/xiaohongshu in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill xiaohongshu -a codex`. Or copy the skill folder (skills/xhs in LeoYeAI/openclaw-master-skills) into .agents/skills/xiaohongshu in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --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.
Going by SKILL.md and its folder, Xiaohongshu needs a shell for the scripts in its folder, the command-line tools its instructions call (curl, bash, jq, apt, yum and wget) and credentials named XHS_AI_API_KEY, GEMINI_API_KEY, IMG_API_KEY and HUNYUAN_SECRET_KEY. Our summary lists: A Bash shell; A credential in GEMINI_API_KEY; A credential in IMG_API_KEY.
SKILL.md names 3 domains. In commands or code: github.com and api.openai.com; the agent is likely to contact these when it follows the instructions. As links in the text: aistudio.google.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. 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.
Xiaohongshu is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.6k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Xiaohongshu: ModLens Image Vision Bridge (liustack/modlens, 4.2k stars), Using Ccproxy Inspector (starbaser/ccproxy, 350 stars), Using Ccproxy API (starbaser/ccproxy, 350 stars) and Mmsp Python (Prism-Shadow/model-message-stream-protocol, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.