# Xhs Comment

> Universal Xiaohongshu skill via VibeSurf. Use when the user asks to (1) comment on a target account's first post, (2) browse feed/search results and comment multiple posts, or (3) draft/publish a Xiaohongshu post.

- Skill: `growvv/xhs-comment` (Agent Skill, multi-file: 10 files)
- Install (CLI): `npx skillmds@latest add growvv/xhs-comment`
- Raw SKILL.md: https://api.skillmd.com/api/skills/growvv/xhs-comment/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: growvv (https://skillmd.com/u/growvv)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/growvv/xhs-comment

---


# XHS Universal Skill

Use one script with three subcommands:

- `comment-user-first`: search a target user and comment on the first matched post
- `browse-comment`: browse feed/search results and comment multiple posts
- `post`: draft or publish a Xiaohongshu post via browser-use automation

## Prerequisites

- VibeSurf is running (default endpoint: `http://127.0.0.1:9335`)
- Xiaohongshu account is logged in inside VibeSurf browser session
- `python3` is available
- `curl` and `jq` are available (used by automation wrappers)

Quick dependency check:

```bash
{baseDir}/scripts/check_dependencies.sh
```

## Command Entrypoints

Main script:

```bash
python3 {baseDir}/scripts/xhs_universal.py <subcommand> [args...]
```

Backward-compatible alias (same as `comment-user-first`):

```bash
{baseDir}/scripts/xhs_comment.sh --nickname "发哥不发愁" --comment "路过支持一下"
```

## 1) Comment Target User's First Post

```bash
python3 {baseDir}/scripts/xhs_universal.py comment-user-first \
  --nickname "发哥不发愁" \
  --comment "发哥好，路过支持一下！"
```

Dry run:

```bash
python3 {baseDir}/scripts/xhs_universal.py comment-user-first \
  --nickname "发哥不发愁" \
  --comment "发哥好，路过支持一下！" \
  --dry-run
```

## 2) Browse Feed and Comment

Browse recommendations and comment up to 2 posts:

```bash
python3 {baseDir}/scripts/xhs_universal.py browse-comment \
  --comment "路过支持一下，内容很有帮助" \
  --max-posts 12 \
  --max-comments 2
```

Filter by keyword and dry-run:

```bash
python3 {baseDir}/scripts/xhs_universal.py browse-comment \
  --keyword "AI" \
  --comment "路过支持一下，感谢分享" \
  --source auto \
  --dry-run
```

## 3) Draft or Publish a Post

Default is safe draft-only mode (will not click publish):

```bash
python3 {baseDir}/scripts/xhs_universal.py post \
  --title "今天的AI效率工作流" \
  --body "分享 3 个我最近在用的提效技巧..."
```

Attach images during post flow:

```bash
python3 {baseDir}/scripts/xhs_universal.py post \
  --title "产品更新" \
  --body "本周版本更新如下..." \
  --image /abs/path/cover.png \
  --image /abs/path/detail.png
```

Actual publish requires explicit confirmation:

```bash
python3 {baseDir}/scripts/xhs_universal.py post \
  --title "正式发布测试" \
  --body "这是一次自动化发布测试" \
  --publish \
  --confirm PUBLISH
```

## Notes

- `post` subcommand uses `execute_browser_use_agent` because Xiaohongshu publish API is not exposed as a stable direct website-api method.
- Prefer dry-run first for any high-risk action.
- If website-api calls are slow, add `--api-timeout 30` to fail fast and diagnose login/session issues.
- `xhs_openclaw_celebrate.sh` now uses built-in default image (`assets/openclaw_skill_default.png`) and no longer depends on external nano-banana skill.

