xiaohongshu-browser

Browse Xiaohongshu (小红书) and take screenshots of posts. Supports keyword search, post modal screenshots, and returns post links. Requires prior manual login.

3,891 stars

Best use case

xiaohongshu-browser is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Browse Xiaohongshu (小红书) and take screenshots of posts. Supports keyword search, post modal screenshots, and returns post links. Requires prior manual login.

Teams using xiaohongshu-browser should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/xiaohongshu-browser/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/besty0121/xiaohongshu-browser/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/xiaohongshu-browser/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How xiaohongshu-browser Compares

Feature / Agentxiaohongshu-browserStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Browse Xiaohongshu (小红书) and take screenshots of posts. Supports keyword search, post modal screenshots, and returns post links. Requires prior manual login.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Xiaohongshu Browser / 小红书浏览器

用 Playwright 自动化浏览小红书,搜索关键词并截图帖子弹窗预览。

Automate Xiaohongshu browsing — search keywords and screenshot post modal previews.

## 前置要求 / Prerequisites

**Python 3.x** + **Playwright**:

```bash
pip install playwright
playwright install chromium
```

## 使用步骤

### 第一步:首次登录(只需要做一次)

1. 运行登录脚本,会弹出浏览器窗口:

```bash
python <skill_dir>/scripts/xhs_open.py
```

2. 在弹出的浏览器里**手动登录小红书**(扫码或账号密码都行)

3. 登录成功后,创建一个控制文件来保存登录状态:

```bash
# Windows (PowerShell):
Set-Content "$env:USERPROFILE\.openclaw\.close_browser" "CLOSE"

# Windows (CMD):
echo CLOSE > %USERPROFILE%\.openclaw\.close_browser

# Linux / macOS:
echo CLOSE > ~/.openclaw/.close_browser
```

4. 看到终端输出 `AUTH_SAVED` 就说明登录状态保存好了

> 💡 登录状态保存在 `~/.openclaw/xhs_data`,以后搜索时会自动使用,不需要重复登录。

### 第二步:搜索并截图

```bash
python <skill_dir>/scripts/xhs_search.py "关键词" 数量
```

**参数说明:**
- 第一个参数:搜索关键词(默认:`御姐`)
- 第二个参数:截图几个帖子(默认:`5`)

**示例:**

```bash
# 搜索"美食",截图前3个帖子
python <skill_dir>/scripts/xhs_search.py "美食" 3

# 搜索"穿搭",截图前10个
python <skill_dir>/scripts/xhs_search.py "穿搭" 10

# 不传参数,用默认值
python <skill_dir>/scripts/xhs_search.py
```

### 输出结果

截图保存在 `<skill_dir>/output/` 目录,文件名格式:`post_序号_时间戳.png`

每张截图包含帖子弹窗预览(图文详情)。

## 常见问题

### 需要重新登录?

小红书的登录会过期,如果搜索时遇到登录弹窗,需要重新登录:

```bash
# 1. 删除旧的登录数据
# Windows:
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw\xhs_data"
# Linux / macOS:
rm -rf ~/.openclaw/xhs_data

# 2. 重新运行登录脚本
python <skill_dir>/scripts/xhs_open.py
```

### 搜索没结果?

- 小红书可能会限制频繁访问,等几分钟再试
- 关键词不要太长,2-6个字最佳
- 不要带 `#` 号,直接搜关键词

## 目录结构

```
xiaohongshu-browser/
├── SKILL.md              # 本说明文件
├── scripts/
│   ├── xhs_open.py       # 登录脚本(首次使用)
│   └── xhs_search.py     # 搜索+截图脚本
└── output/               # 截图输出目录
```

## 注意事项

- 使用无头浏览器(headless),不会弹出窗口
- 操作间有随机延迟,降低被检测风险
- 频繁使用可能触发小红书的反爬机制
- 帖子链接需要 `xsec_token` 才能直接访问(搜索结果中已包含)

Related Skills

my-browser-agent

3891
from openclaw/skills

A custom browser automation skill using Playwright.

Web Automation

rent-my-browser

3891
from openclaw/skills

When the agent is idle, connect to the Rent My Browser marketplace and execute browser tasks for consumers. Earn money by renting out the node's browser during downtime. Supports headless (Playwright) on VPS nodes and real Chrome on GUI machines.

Monetization & Resource Management

browser-cdp

3880
from openclaw/skills

Real Chrome browser automation via CDP Proxy — access pages with full user login state, bypass anti-bot detection, perform interactive operations (click/fill/scroll), extract dynamic JavaScript-rendered content, take screenshots. Triggers (satisfy ANY one): - Target URL is a search results page (Bing/Google/YouTube search) - Static fetch (agent-reach/WebFetch) is blocked by anti-bot (captcha/intercept/empty) - Need to read logged-in user's private content - YouTube, Twitter/X, Xiaohongshu, WeChat public accounts, etc. - Task involves "click", "fill form", "scroll", "drag" - Need screenshot or dynamic-rendered page capture

Web Automation

browser-automation

3891
from openclaw/skills

Automate web browser interactions using natural language via CLI commands. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.

Easy-xiaohongshu - 小红书 AI 图文自动发布

3891
from openclaw/skills

✨ **从创意到发布,全自动完成** — 提示词优化 → 图文生成 → 一键发布

Agent Browser Skill

3891
from openclaw/skills

## Description

xiaohongshu-mcp

3891
from openclaw/skills

Automate Xiaohongshu (RedNote) content operations using a Python client for the xiaohongshu-mcp server. Use for: (1) Publishing image, text, and video content, (2) Searching for notes and trends, (3) Analyzing post details and comments, (4) Managing user profiles and content feeds. Triggers: xiaohongshu automation, rednote content, publish to xiaohongshu, xiaohongshu search, social media management.

stealth-browser

3891
from openclaw/skills

Anti-detection web browsing that bypasses bot detection, CAPTCHAs, and IP blocks using puppeteer-extra with stealth plugin and optional residential proxy support. Use when (1) websites block headless browsers or datacenter IPs, (2) need to bypass Cloudflare/Vercel protection, (3) accessing sites that detect automation (Reddit, Twitter/X, signup flows), (4) scraping protected content, or (5) automating web tasks that require human-like behavior.

agent-browser-zh

3891
from openclaw/skills

A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands. (Chinese localized version)

browser-booking-agent

3891
from openclaw/skills

Execute booking/search flows via browser automation with verification artifacts. Use for reservation forms, availability checks, and capture of proof (screenshots/confirmation IDs).

Xiaohongshu Founder Growth Writer

3891
from openclaw/skills

Turn rough notes, founder insights, and English drafts into natural Xiaohongshu posts that feel human, trustworthy, and platform-native.

Agent Browser

3891
from openclaw/skills

Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection