Apache-2.0 · Python · Playwright · AgentSkill

Automate Xiaohongshu & RedNote with AI agents

A production-grade skill for search, note details, publishing, and account-safe operations with clean JSON output and every write gated behind explicit approval.

Claude Code Codex OpenClaw ClawHub skills.sh Cursor
xiaohongshu-skill
$ xiaohongshu-skill search "上海咖啡" --limit=3
{
"count": 3,
"results": [
{ "title": "上海咖啡地图", "user": "demo_user" },
]
}
// writes stop for approval, read-only stays safe
Runtime
Python 3.10+
Browser
Playwright Chromium
Output
Stable JSON
Writes
Approval-gated
Capabilities

Everything an agent needs, one skill

Search, read, publish, and operate Xiaohongshu through a consistent CLI surface with safety and session isolation built in.

Search

Keyword search with sort, type, time, scope, and location filters.

Read

Note details, comments, user pages, profile state, and the explore feed.

Publish

Image, video, Markdown-image, and long-form drafts after approval.

Operate

Comments, replies, likes, collections, templates, limits, and SOPs.

Install

Five seconds to your agent

Pick the surface that matches your runner: skills.sh and ClawHub for agent catalogs, pip for the shell.

npx skills add DeliciousBuding/xiaohongshu-skill
clawhub install xiaohongshu-skill
pip install git+https://github.com/DeliciousBuding/xiaohongshu-skill.git
git clone https://github.com/DeliciousBuding/xiaohongshu-skill.git <skills-dir>/xiaohongshu-skill
docker compose run --rm xiaohongshu search "美食"
Safety model

Reads run free. Writes ask first.

The skill separates read-only commands from state-changing ones, so an agent can never publish or interact without explicit user approval.

Read-only SAFE

  • search, feed, user, explore, me
  • selectors and contracts expose stable automation surfaces.
  • --profile <name> isolates sessions per account.

Approval-gated CONFIRM

  • publish, comment, reply, like, and collect change account state.
  • The browser stops on captcha or verification pages.
  • Live tests run only with XHS_LIVE_TEST=1 and a dedicated account.
Works with

Drop it into your stack

Compatible with the agent runners and catalogs people already use.

Claude Code
Codex
OpenClaw
ClawHub
skills.sh
Cursor
Cline
n8n