Token导航 LogoToken导航

Agent Skill · 研究检索

xiaohongshu-publisher(小红书出版社)

xiaohongshu-publisher 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

xiaohongshu-publisher 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 23,446。

总安装 4,272周安装 178GitHub Stars 8下载 1,424核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:xiaohongshu-publisher(小红书出版社)
来源仓库:https://github.com/iamzifei/red-publisher-skill
仓库路径:skills/xiaohongshu-publisher
安装命令:
npx skills add https://github.com/iamzifei/red-publisher-skill --skill xiaohongshu-publisher
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/iamzifei/red-publisher-skill --skill xiaohongshu-publisher

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

小红书出版社技能用于查找、检索和筛选相关信息。适合根据关键词、任务场景或来源线索快速定位候选结果。通过 npx skills add 命令从指定 GitHub 仓库安装,支持 Codex、Claude、Cursor 等宿主环境。使用前需确认权限范围和维护状态,注意可能触发联网、命令执行或文件读写操作。

xiaohongshu-publisher 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/xiaohongshu-publisher

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/iamzifei/red-publisher-skill --skill xiaohongs…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

xiaohongshu-publisher 怎么安装?

在终端执行 npx skills add https://github.com/iamzifei/red-publisher-skill --skill xiaohongshu-publish…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

xiaohongshu-publisher 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

xiaohongshu-publisher 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

xiaohongshu-publisher 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

xiaohongshu-publisher 用的人多吗?

公开数据是累计安装 4,272 次,近一周安装 178 次,下载 1,424 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

xiaohongshu-publisher 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
xiaohongshu-publisher

小红书出版社 · 本页

4,2728操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Xiaohongshu Publisher (小红书发布器)

Publish images and notes to Xiaohongshu (小红书) Creator Platform using agent-browser with CDP (Chrome DevTools Protocol) mode.

Architecture: CDP Mode

This skill uses CDP mode - connecting to an existing browser instance where the user is already logged in. This approach:

  • Eliminates QR code scanning - User logs in once in their browser
  • Leverages existing session - Uses the browser's cookies and auth state
  • More stable - No need to manage auth state files
  • agent-browser CLI - Simple command-line interface with --cdp flag

⚠️ IMPORTANT: Draft Mode by Default

This skill ALWAYS saves notes as DRAFT by default. It will NEVER auto-publish.

Only click the "发布" (publish) button if the user EXPLICITLY requests immediate publishing with phrases like:

  • "直接发布" / "立即发布" / "马上发布"
  • "publish now" / "publish directly" / "publish immediately"
  • "不要草稿,直接发" / "不存草稿"

If unsure, ALWAYS save as draft and let user review before publishing.

Prerequisites

1. Launch Chrome with Remote Debugging

Before using this skill, the user must launch Chrome with remote debugging enabled:

macOS:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

Or create an alias in ~/.zshrc or ~/.bashrc:

alias chrome-debug='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222'

Then simply run: chrome-debug

2. Login to Xiaohongshu

In the Chrome browser (with debug port), navigate to:

https://creator.xiaohongshu.com/publish/publish

Login using QR code scan with Xiaohongshu App. This only needs to be done once - the session persists in the browser.

Note: After login, you can minimize the browser window to the Dock. The browser must stay running (not closed) for CDP to work, but you don't need to see it.

3. Python Dependencies

pip install Pillow pyobjc-framework-Cocoa

agent-browser CDP Commands Reference

All commands use the --cdp 9222 flag to connect to the existing Chrome browser:

# Navigation
npx agent-browser --cdp 9222 open <url>          # Navigate to URL
npx agent-browser --cdp 9222 snapshot -i         # Get page snapshot with element refs

# Element Interaction
npx agent-browser --cdp 9222 click @e5           # Click element by ref
npx agent-browser --cdp 9222 fill @e2 "text"     # Fill input field
npx agent-browser --cdp 9222 type @e3 "text"     # Type text into element
npx agent-browser --cdp 9222 upload @e4 "/path/to/file.jpg"  # Upload file

# Keyboard & Wait
npx agent-browser --cdp 9222 press Enter         # Press key
npx agent-browser --cdp 9222 wait 2000           # Wait milliseconds
npx agent-browser --cdp 9222 wait --text "发布"  # Wait for text

# Screenshot
npx agent-browser --cdp 9222 screenshot          # Take screenshot

Important:

  • Element refs (like @e5) come from snapshot -i output. Always take a snapshot before interacting.
  • The --cdp 9222 flag connects to the browser's debug port instead of launching a new browser.
  • Do NOT use the close command as it would close the user's browser!

Scripts

Located in ~/.claude/skills/xiaohongshu-publisher/scripts/:

parse_note.py

Parse Markdown and extract structured data for Xiaohongshu notes:

python parse_note.py <markdown_file> [--output json]

Returns JSON with: title, content, images (list of paths), tags

copy_to_clipboard.py

Copy image to system clipboard for pasting:

python copy_to_clipboard.py image /path/to/image.jpg [--quality 80]

Workflow

Phase 0: Verify Browser Connection

CRITICAL: First verify that the CDP browser is running and connected.

  1. Check if browser is accessible: npx agent-browser --cdp 9222 snapshot -i

- If connection fails, tell user: "请先启动带调试端口的 Chrome 浏览器"

  1. Provide startup command if needed: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

Phase 1: Check Login Status

  1. Navigate to creator page (if not already there): npx agent-browser --cdp 9222 open "https://creator.xiaohongshu.com/publish/publish"
  2. Take snapshot to check login status: npx agent-browser --cdp 9222 snapshot -i

- Look for "上传图片" button = logged in - Look for QR code or login form = need to login

  1. If login required:

- Tell user: "请在浏览器中扫码登录小红书,登录后告诉我" - Wait for user confirmation - Take new snapshot to verify login success

Phase 2: Parse Content

If user provides a markdown file, parse it:

python ~/.claude/skills/xiaohongshu-publisher/scripts/parse_note.py /path/to/note.md

Output JSON:

{
  "title": "Note Title",
  "content": "Note description/content text...",
  "images": ["/path/to/img1.jpg", "/path/to/img2.jpg"],
  "tags": ["tag1", "tag2"]
}

Phase 3: Upload Images

  1. Take snapshot to get current element refs: npx agent-browser --cdp 9222 snapshot -i
  2. Find the upload input element (look for file input or "上传图片" area)
  3. Upload images: # Single image npx agent-browser --cdp 9222 upload @e<ref> "/path/to/image1.jpg" # Multiple images (comma-separated) npx agent-browser --cdp 9222 upload @e<ref> "/path/to/img1.jpg,/path/to/img2.jpg,/path/to/img3.jpg"
  4. Wait for uploads to complete: npx agent-browser --cdp 9222 wait 3000
  5. Take new snapshot after upload completes

Phase 4: Fill Title and Content

  1. Find title input field from snapshot (placeholder usually contains "标题")
  2. Fill title: npx agent-browser --cdp 9222 fill @e<title_ref> "Your Note Title"

- Title limit: ~20 characters recommended

  1. Find content/description field (placeholder usually contains "描述" or "正文")
  2. Fill content: npx agent-browser --cdp 9222 fill @e<content_ref> "Your note content here..."

- Content limit: ~1000 characters max

Phase 5: Add Tags (Optional)

If tags are provided:

  1. Find tag input area from snapshot
  2. Add each tag: npx agent-browser --cdp 9222 click @e<add_tag_ref> npx agent-browser --cdp 9222 fill @e<tag_input_ref> "tag1" npx agent-browser --cdp 9222 press Enter

- Repeat for each tag (max 5 recommended)

Phase 6: Save as Draft (Default) or Publish

Default Action: Save as Draft
  1. Find "存草稿" button from snapshot
  2. Click draft button: npx agent-browser --cdp 9222 click @e<draft_button_ref>
  3. Verify success - take snapshot or wait for confirmation
Only If User Explicitly Requests Publishing

ONLY if user said "直接发布", "立即发布", or "publish now":

  1. Find "发布" button from snapshot
  2. Click publish button: npx agent-browser --cdp 9222 click @e<publish_button_ref>

When in doubt, ALWAYS save as draft.

Phase 7: Verify and Report

  1. Take final snapshot to verify success: npx agent-browser --cdp 9222 snapshot -i
  2. Report to user:

- Draft saved: "草稿已保存!请在小红书 App 中预览和发布。" - Published: "笔记已发布成功!"

Example Flows

Example 1: Basic Image Publish

User: "发布这些图片到小红书: /path/to/photo1.jpg, /path/to/photo2.jpg, 标题是'周末好去处'"

# 1. Verify connection and check login
npx agent-browser --cdp 9222 snapshot -i

# 2. Navigate to publish page (if needed)
npx agent-browser --cdp 9222 open "https://creator.xiaohongshu.com/publish/publish"

# 3. Take snapshot, verify "上传图片" visible
npx agent-browser --cdp 9222 snapshot -i

# 4. Upload images
npx agent-browser --cdp 9222 upload @e<ref> "/path/to/photo1.jpg,/path/to/photo2.jpg"
npx agent-browser --cdp 9222 wait 3000

# 5. Take new snapshot, fill title
npx agent-browser --cdp 9222 snapshot -i
npx agent-browser --cdp 9222 fill @e<title_ref> "周末好去处"

# 6. Save as draft
npx agent-browser --cdp 9222 click @e<draft_ref>

Example 2: Markdown File Publish

User: "把这个 markdown 发到小红书: /path/to/note.md"

# 1. Parse markdown
python ~/.claude/skills/xiaohongshu-publisher/scripts/parse_note.py /path/to/note.md

# 2. Extract: title, content, images, tags from JSON output

# 3. Verify connection
npx agent-browser --cdp 9222 snapshot -i

# 4. Upload all images from parsed result
npx agent-browser --cdp 9222 upload @e<ref> "/path/to/img1.jpg,/path/to/img2.jpg"

# 5. Fill title and content
npx agent-browser --cdp 9222 fill @e<title_ref> "parsed title"
npx agent-browser --cdp 9222 fill @e<content_ref> "parsed content"

# 6. Add tags if present
npx agent-browser --cdp 9222 fill @e<tag_ref> "tag1"
npx agent-browser --cdp 9222 press Enter

# 7. Save as draft
npx agent-browser --cdp 9222 click @e<draft_ref>

Example 3: Direct Publish

User: "直接发布这些图到小红书,不用草稿"

# [Same as above until Step 6]

# Find and click "发布" button (NOT 存草稿)
npx agent-browser --cdp 9222 click @e<publish_ref>

Critical Rules

  1. 🚨 NEVER AUTO-PUBLISH - ALWAYS save as draft by default
  2. 🔌 ALWAYS USE --cdp 9222 - Every command must include this flag
  3. ❌ NEVER USE close COMMAND - Would close user's browser!
  4. 📸 TAKE SNAPSHOTS FREQUENTLY - Page state changes, always get fresh refs
  5. ⏳ WAIT AFTER UPLOADS - Give time for images to process
  6. 🔄 HANDLE LOGIN GRACEFULLY - Guide user to login in browser if needed
  7. 📝 RESPECT CONTENT LIMITS - Title ~20 chars, Content ~1000 chars
  8. 🖼️ IMAGE LIMITS - 1-18 images per note

Troubleshooting

CDP Connection Failed

If snapshot fails to connect:

  1. Verify Chrome is running with debug port: lsof -i:9222
  2. If not running, start Chrome: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
  3. Check for port conflicts - another process might be using 9222

Session Expired

If previously logged in but now seeing login page:

  1. Tell user to re-login in browser: "您的登录状态已过期,请在浏览器中重新扫码登录"
  2. Wait for user confirmation
  3. Take new snapshot to verify

Upload Failed

  • Check image file exists and is valid format (jpg, png, gif, webp)
  • Check file size (Xiaohongshu has limits)
  • Try uploading one at a time
  • Take screenshot to see actual error: npx agent-browser --cdp 9222 screenshot error.png

Element Not Found

  • Page structure may have changed
  • Always take a fresh snapshot before interacting
  • Look for similar elements with different refs

Why CDP Mode with agent-browser?

Advantages:

  1. No QR code scanning per session - Login persists in browser
  2. User's own browser - Existing cookies and preferences
  3. Simple CLI - Same agent-browser commands, just add --cdp 9222
  4. No MCP server - Direct CLI invocation
  5. Reliable auth - Browser handles session management

Trade-offs:

  1. Requires browser running - User must start Chrome with debug port
  2. Single browser instance - One session at a time
  3. Manual first login - User does initial QR scan in browser

Supported Content

TypeDetails
ImagesJPG, PNG, GIF, WebP (1-18 images)
TitleUp to ~20 characters recommended
ContentUp to ~1000 characters
TagsUp to 5 tags recommended

平台分布

Codex

34.66%
按下载量换算494

Claude

33.75%
按下载量换算481

Cursor

19.3%
按下载量换算275

Gemini CLI

10.1%
按下载量换算144

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills