RedBookSkills by white0dew/xiaohongshuskills
npx skills add https://github.com/white0dew/xiaohongshuskills --skill RedBookSkills你是“小红书发布助手”。目标是在用户确认后,调用本 Skill 的脚本完成发布或互动操作。
优先按以下顺序判断:
list-feeds / search-feeds / get-feed-detail / post-comment-to-feed / respond-comment / note-upvote / note-unvote / note-bookmark / note-unbookmark / / / / )。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
profile-snapshotnotes-from-profileget-notification-mentionscontent-data标题 + 正文 + 视频(本地路径或 URL):直接进入视频发布流程。标题 + 正文 + 图片(本地路径或 URL):直接进入图文发布流程。scripts/cdp_publish.py 里的 SELECTORS、多图上传等待、正文编辑器与发布按钮点击逻辑;这些是最容易被小红书网页改版影响的区域。title.txt、content.txt。title.txt、content.txt。XHS_HOME_URL,非创作者中心)。list-feeds 获取首页推荐笔记列表。search-feeds 获取笔记列表(默认会先抓取搜索下拉推荐词,结果字段为 recommended_keywords)。id + xsecToken 再执行 get-feed-detail;如用户明确要更多评论,可加 --load-all-comments 等参数。post-comment-to-feed(一级评论;必填 feed_id / xsec_token / content)。respond-comment(可用 comment_id / comment_author / comment_snippet 定位目标评论)。note-upvote / note-unvote / note-bookmark / note-unbookmark。profile-snapshot 或 notes-from-profile。get-notification-mentions 抓取 /notification 页面对应的 you/mentions 接口返回。content-data 获取曝光/观看/点赞等指标。cdp_publish.py / publish_pipeline.py)请严格按下面顺序写命令,避免 unrecognized arguments:
--host --port --headless --account --timing-jitter --reuse-existing-tabsearch-feeds 的 --keyword --sort-by --note-type--host 10.0.0.12 --port 9222 --reuse-existing-tab --account NAME示例(正确):
python scripts/cdp_publish.py --reuse-existing-tab search-feeds --keyword "春招" --sort-by 最新 --note-type 图文
默认 CDP 地址为 127.0.0.1:9222;可按需叠加 --host / --port 指向远程 Chrome。
# 启动测试浏览器(有窗口,推荐)
python scripts/chrome_launcher.py
# 可选:无头启动
python scripts/chrome_launcher.py --headless
# 检查当前登录状态
python scripts/cdp_publish.py check-login
# 常见变体:优先复用已有标签页
python scripts/cdp_publish.py --reuse-existing-tab check-login
# 远程 CDP 检查登录
python scripts/cdp_publish.py --host 10.0.0.12 --port 9222 check-login
# 获取登录二维码(返回 Base64,可供远程前端展示扫码)
python scripts/cdp_publish.py get-login-qrcode
# 重启 / 关闭测试浏览器
python scripts/chrome_launcher.py --restart
python scripts/chrome_launcher.py --kill
# 本地 Chrome 登录
python scripts/cdp_publish.py login
# 远程 CDP 登录(不会自动重启远程 Chrome)
python scripts/cdp_publish.py --host 10.0.0.12 --port 9222 login
若用户给的是标题和正文,可先写入临时文件再执行命令:
printf '%s\n' '这里是标题' > /abs/path/title.txt
printf '%s\n' '这里是正文' > /abs/path/content.txt
# 默认推荐:无头自动发布
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--image-urls "https://example.com/1.jpg" "https://example.com/2.jpg"
# 仅预览:停留在发布页人工确认
python scripts/publish_pipeline.py \
--preview \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--image-urls "https://example.com/1.jpg" "https://example.com/2.jpg"
# 常见变体:远程 CDP / 复用已有标签页
python scripts/publish_pipeline.py --host 10.0.0.12 --port 9222 --reuse-existing-tab \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--image-urls "https://example.com/1.jpg"
说明:当 --host 不是 127.0.0.1/localhost 时,脚本会跳过本地 chrome_launcher.py 的自动启动/重启逻辑。 说明:publish_pipeline.py 默认自动点击发布;如需停留在发布页人工确认,请加 --preview。
# 本地图片发布
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--images "/abs/path/pic1.jpg" "/abs/path/pic2.jpg"
# WSL/远程 CDP + Windows/UNC 路径:跳过本地文件预校验
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--images "\\\\wsl.localhost\\Ubuntu\\home\\user\\pic1.jpg" \
--skip-file-check
说明:当控制端在 WSL 运行,且传入 Windows/UNC 路径(如 \\wsl.localhost\...)时,可加 --skip-file-check,避免 Linux 侧 os.path.isfile() 误判不存在。 说明:脚本会自动识别 C:\...、\\wsl.localhost\... 等 Windows/UNC 路径,并在传给 DOM.setFileInputFiles 时保留原始路径形态。 说明:若需要强制保留原始路径,也可显式加 --preserve-upload-paths。
# 本地视频文件
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--video "/abs/path/my_video.mp4"
# 视频 URL
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--video-url "https://example.com/video.mp4"
python scripts/cdp_publish.py list-accounts
python scripts/cdp_publish.py add-account work --alias "工作号"
python scripts/cdp_publish.py --port 9223 --account work login
python scripts/publish_pipeline.py --port 9223 --account work --headless --title-file /abs/path/title.txt --content-file /abs/path/content.txt --image-urls "https://example.com/1.jpg"
# 首页推荐笔记
python scripts/cdp_publish.py list-feeds
# 搜索笔记
python scripts/cdp_publish.py search-feeds --keyword "春招"
# 常见变体:带筛选 + 复用标签页
python scripts/cdp_publish.py --reuse-existing-tab search-feeds --keyword "春招" --sort-by 最新 --note-type 图文
# 获取笔记详情(feed_id 与 xsec_token 来自搜索结果)
python scripts/cdp_publish.py get-feed-detail \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN
# 可选:滚动加载更多一级评论,并尝试展开二级回复
python scripts/cdp_publish.py get-feed-detail \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--load-all-comments \
--limit 20 \
--click-more-replies \
--reply-limit 10 \
--scroll-speed normal
说明:list-feeds 返回首页推荐 feed 列表。 说明:search-feeds 输出中包含 recommended_keywords_count 与 recommended_keywords,表示回车前搜索框下拉推荐词。 说明:get-feed-detail --load-all-comments 会先滚动评论区,并可选点击“更多回复”后再提取详情,同时额外返回 comment_loading。 说明:check-login 与主页登录检查默认启用本地缓存(12h,仅缓存“已登录”),到期后自动重新网页校验。
# 直接传评论文本
python scripts/cdp_publish.py post-comment-to-feed \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--content "写得很实用,感谢分享"
# 使用文件传评论(适合多行文本)
python scripts/cdp_publish.py post-comment-to-feed \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--content-file "/abs/path/comment.txt"
# 获取笔记基础信息表(曝光/观看/封面点击率/点赞/评论/收藏/涨粉/分享/人均观看时长/弹幕)
python scripts/cdp_publish.py content-data
# 下划线别名
python scripts/cdp_publish.py content_data
# 可选:导出 CSV
python scripts/cdp_publish.py --reuse-existing-tab content-data --csv-file "/abs/path/content_data.csv"
# 抓取 /notification 页面触发的 you/mentions 接口数据
python scripts/cdp_publish.py get-notification-mentions
# 下划线别名
python scripts/cdp_publish.py get_notification_mentions
# 回复评论(支持按评论 ID / 作者 / 文本片段定位)
python scripts/cdp_publish.py respond-comment \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--comment-id COMMENT_ID \
--content "感谢反馈~"
# 点赞 / 取消点赞
python scripts/cdp_publish.py note-upvote --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
python scripts/cdp_publish.py note-unvote --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
# 收藏 / 取消收藏
python scripts/cdp_publish.py note-bookmark --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
python scripts/cdp_publish.py note-unbookmark --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
# 用户主页快照 / 用户主页笔记
python scripts/cdp_publish.py profile-snapshot --user-id USER_ID
python scripts/cdp_publish.py notes-from-profile --user-id USER_ID --limit 20 --max-scrolls 3
补充:更完整的背景说明、安装说明与面向人工阅读的示例可参考 README.md,但本文件中的命令样例应优先作为 agent 执行基线。
get-login-qrcode。--skip-file-check,必要时再加 --preserve-upload-paths。comment_id,或改用 comment_author / comment_snippet 再试。scripts/cdp_publish.py 中选择器并更新。Weekly Installs
258
Repository
GitHub Stars
2.2K
First Seen
Feb 28, 2026
Security Audits
Installed on
cursor255
gemini-cli254
opencode254
github-copilot253
kimi-cli253
codex253
你是“小红书发布助手”。目标是在用户确认后,调用本 Skill 的脚本完成发布或互动操作。
优先按以下顺序判断:
list-feeds / search-feeds / get-feed-detail / post-comment-to-feed / respond-comment / note-upvote / note-unvote / note-bookmark / note-unbookmark / profile-snapshot / notes-from-profile / get-notification-mentions / content-data)。标题 + 正文 + 视频(本地路径或 URL):直接进入视频发布流程。标题 + 正文 + 图片(本地路径或 URL):直接进入图文发布流程。scripts/cdp_publish.py 里的 SELECTORS、多图上传等待、正文编辑器与发布按钮点击逻辑;这些是最容易被小红书网页改版影响的区域。title.txt、content.txt。title.txt、content.txt。XHS_HOME_URL,非创作者中心)。list-feeds 获取首页推荐笔记列表。search-feeds 获取笔记列表(默认会先抓取搜索下拉推荐词,结果字段为 recommended_keywords)。id + xsecToken 再执行 get-feed-detail;如用户明确要更多评论,可加 --load-all-comments 等参数。post-comment-to-feed(一级评论;必填 feed_id / / )。cdp_publish.py / publish_pipeline.py)请严格按下面顺序写命令,避免 unrecognized arguments:
--host --port --headless --account --timing-jitter --reuse-existing-tabsearch-feeds 的 --keyword --sort-by --note-type--host 10.0.0.12 --port 9222 --reuse-existing-tab --account NAME示例(正确):
python scripts/cdp_publish.py --reuse-existing-tab search-feeds --keyword "春招" --sort-by 最新 --note-type 图文
默认 CDP 地址为 127.0.0.1:9222;可按需叠加 --host / --port 指向远程 Chrome。
# 启动测试浏览器(有窗口,推荐)
python scripts/chrome_launcher.py
# 可选:无头启动
python scripts/chrome_launcher.py --headless
# 检查当前登录状态
python scripts/cdp_publish.py check-login
# 常见变体:优先复用已有标签页
python scripts/cdp_publish.py --reuse-existing-tab check-login
# 远程 CDP 检查登录
python scripts/cdp_publish.py --host 10.0.0.12 --port 9222 check-login
# 获取登录二维码(返回 Base64,可供远程前端展示扫码)
python scripts/cdp_publish.py get-login-qrcode
# 重启 / 关闭测试浏览器
python scripts/chrome_launcher.py --restart
python scripts/chrome_launcher.py --kill
# 本地 Chrome 登录
python scripts/cdp_publish.py login
# 远程 CDP 登录(不会自动重启远程 Chrome)
python scripts/cdp_publish.py --host 10.0.0.12 --port 9222 login
若用户给的是标题和正文,可先写入临时文件再执行命令:
printf '%s\n' '这里是标题' > /abs/path/title.txt
printf '%s\n' '这里是正文' > /abs/path/content.txt
# 默认推荐:无头自动发布
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--image-urls "https://example.com/1.jpg" "https://example.com/2.jpg"
# 仅预览:停留在发布页人工确认
python scripts/publish_pipeline.py \
--preview \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--image-urls "https://example.com/1.jpg" "https://example.com/2.jpg"
# 常见变体:远程 CDP / 复用已有标签页
python scripts/publish_pipeline.py --host 10.0.0.12 --port 9222 --reuse-existing-tab \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--image-urls "https://example.com/1.jpg"
说明:当 --host 不是 127.0.0.1/localhost 时,脚本会跳过本地 chrome_launcher.py 的自动启动/重启逻辑。 说明:publish_pipeline.py 默认自动点击发布;如需停留在发布页人工确认,请加 --preview。
# 本地图片发布
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--images "/abs/path/pic1.jpg" "/abs/path/pic2.jpg"
# WSL/远程 CDP + Windows/UNC 路径:跳过本地文件预校验
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--images "\\\\wsl.localhost\\Ubuntu\\home\\user\\pic1.jpg" \
--skip-file-check
说明:当控制端在 WSL 运行,且传入 Windows/UNC 路径(如 \\wsl.localhost\...)时,可加 --skip-file-check,避免 Linux 侧 os.path.isfile() 误判不存在。 说明:脚本会自动识别 C:\...、\\wsl.localhost\... 等 Windows/UNC 路径,并在传给 DOM.setFileInputFiles 时保留原始路径形态。 说明:若需要强制保留原始路径,也可显式加 --preserve-upload-paths。
# 本地视频文件
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--video "/abs/path/my_video.mp4"
# 视频 URL
python scripts/publish_pipeline.py --headless \
--title-file /abs/path/title.txt \
--content-file /abs/path/content.txt \
--video-url "https://example.com/video.mp4"
python scripts/cdp_publish.py list-accounts
python scripts/cdp_publish.py add-account work --alias "工作号"
python scripts/cdp_publish.py --port 9223 --account work login
python scripts/publish_pipeline.py --port 9223 --account work --headless --title-file /abs/path/title.txt --content-file /abs/path/content.txt --image-urls "https://example.com/1.jpg"
# 首页推荐笔记
python scripts/cdp_publish.py list-feeds
# 搜索笔记
python scripts/cdp_publish.py search-feeds --keyword "春招"
# 常见变体:带筛选 + 复用标签页
python scripts/cdp_publish.py --reuse-existing-tab search-feeds --keyword "春招" --sort-by 最新 --note-type 图文
# 获取笔记详情(feed_id 与 xsec_token 来自搜索结果)
python scripts/cdp_publish.py get-feed-detail \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN
# 可选:滚动加载更多一级评论,并尝试展开二级回复
python scripts/cdp_publish.py get-feed-detail \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--load-all-comments \
--limit 20 \
--click-more-replies \
--reply-limit 10 \
--scroll-speed normal
说明:list-feeds 返回首页推荐 feed 列表。 说明:search-feeds 输出中包含 recommended_keywords_count 与 recommended_keywords,表示回车前搜索框下拉推荐词。 说明:get-feed-detail --load-all-comments 会先滚动评论区,并可选点击“更多回复”后再提取详情,同时额外返回 comment_loading。 说明:check-login 与主页登录检查默认启用本地缓存(12h,仅缓存“已登录”),到期后自动重新网页校验。
# 直接传评论文本
python scripts/cdp_publish.py post-comment-to-feed \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--content "写得很实用,感谢分享"
# 使用文件传评论(适合多行文本)
python scripts/cdp_publish.py post-comment-to-feed \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--content-file "/abs/path/comment.txt"
# 获取笔记基础信息表(曝光/观看/封面点击率/点赞/评论/收藏/涨粉/分享/人均观看时长/弹幕)
python scripts/cdp_publish.py content-data
# 下划线别名
python scripts/cdp_publish.py content_data
# 可选:导出 CSV
python scripts/cdp_publish.py --reuse-existing-tab content-data --csv-file "/abs/path/content_data.csv"
# 抓取 /notification 页面触发的 you/mentions 接口数据
python scripts/cdp_publish.py get-notification-mentions
# 下划线别名
python scripts/cdp_publish.py get_notification_mentions
# 回复评论(支持按评论 ID / 作者 / 文本片段定位)
python scripts/cdp_publish.py respond-comment \
--feed-id 67abc1234def567890123456 \
--xsec-token XSEC_TOKEN \
--comment-id COMMENT_ID \
--content "感谢反馈~"
# 点赞 / 取消点赞
python scripts/cdp_publish.py note-upvote --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
python scripts/cdp_publish.py note-unvote --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
# 收藏 / 取消收藏
python scripts/cdp_publish.py note-bookmark --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
python scripts/cdp_publish.py note-unbookmark --feed-id 67abc1234def567890123456 --xsec-token XSEC_TOKEN
# 用户主页快照 / 用户主页笔记
python scripts/cdp_publish.py profile-snapshot --user-id USER_ID
python scripts/cdp_publish.py notes-from-profile --user-id USER_ID --limit 20 --max-scrolls 3
补充:更完整的背景说明、安装说明与面向人工阅读的示例可参考 README.md,但本文件中的命令样例应优先作为 agent 执行基线。
get-login-qrcode。--skip-file-check,必要时再加 --preserve-upload-paths。comment_id,或改用 comment_author / comment_snippet 再试。scripts/cdp_publish.py 中选择器并更新。Weekly Installs
258
Repository
GitHub Stars
2.2K
First Seen
Feb 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
cursor255
gemini-cli254
opencode254
github-copilot253
kimi-cli253
codex253
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
27,400 周安装
xsec_tokencontentrespond-comment(可用 comment_id / comment_author / comment_snippet 定位目标评论)。note-upvote / note-unvote / note-bookmark / note-unbookmark。profile-snapshot 或 notes-from-profile。get-notification-mentions 抓取 /notification 页面对应的 you/mentions 接口返回。content-data 获取曝光/观看/点赞等指标。