xiaohongshu-cli — Claude Code skill: what it does, how to install
Controls Xiaohongshu accounts directly through your coding agent. Searches notes, extracts comments, likes posts, and publishes content using a CLI tool.
npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a claude-codeWhat xiaohongshu-cli does
This skill connects your agent to Xiaohongshu via the xhs terminal utility. It lets the model search notes, inspect trending posts, read full comment threads, and follow authors. Creating new posts with images is also supported.
The setup depends on Python 3.10+ and the xiaohongshu-cli package. You can install the binary using uv tool install xiaohongshu-cli or pipx install xiaohongshu-cli. Output defaults to structured YAML or JSON for machine consumption.
Autonomous execution stops when credentials are missing or expired. The utility attempts to extract active cookies from local desktop browsers, or you must scan a terminal QR code with xhs login --qrcode. When the platform triggers a captcha, you will need to open a browser and solve it manually.
What it helps with
- search notes and trending feeds by keywords
- extract comments and replies for specific posts
- like notes and manage saved bookmarks
- publish new notes with text and images
Example prompts for the agent
- Search Xiaohongshu for trending travel notes and show top results.
- Check xhs auth status and fetch all comments for note 1 in JSON.
How to install xiaohongshu-cli
1Skills CLI (Vercel)
npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a claude-code2Manually: put the files in place
~/.claude/skills/xiaohongshu-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/xiaohongshu-cli/
1Skills CLI (Vercel)
npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a codex2Manually: put the files in place
.agents/skills/xiaohongshu-cli/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a cursor2Manually: put the files in place
.cursor/skills/xiaohongshu-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jackwener/xiaohongshu-cli xiaohongshu-cli2Manually: put the files in place
.github/skills/xiaohongshu-cli/SKILL.md1Skills CLI (Vercel)
npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a gemini-cli2Platform CLI
gemini skills install https://github.com/jackwener/xiaohongshu-cliManually: put the files in place
.devin/skills/xiaohongshu-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Similar
Questions about xiaohongshu-cli
How to install xiaohongshu-cli in Claude Code?
Run npx skills add jackwener/xiaohongshu-cli --skill xiaohongshu-cli -a claude-code. You also need the xhs binary, installed via uv tool install xiaohongshu-cli.
What does xiaohongshu-cli do?
It lets your agent search notes, read discussions, interact with publications, and publish new posts on Xiaohongshu using the command line.
How does authentication work in xhs?
Run xhs login to pull session cookies from supported desktop browsers. If cookies are not found, use xhs login --qrcode to log in via a terminal QR code.