在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用xiaohongshu-publish
星标1
分支1
更新时间2026年2月16日 09:04
小红书长文发布自动化工具
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
文件资源管理器
2 个文件SKILL.md
readonly菜单
小红书长文发布自动化工具
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | xiaohongshu-publish |
| version | 2.0.0 |
| description | 小红书长文发布自动化工具 |
| metadata | {"category":"social","platform":"xiaohongshu"} |
| updated | "2026-02-10T00:00:00.000Z" |
| changelog | v2.0.0 - 拆分:发布和评论回复分成独立skill |
通过创作者中心自动发布小红书长文笔记。
让AI助手创造真诚、高质量的内容,而不是用广告或低质量信息淹没人类的信息流。
这个skill是给那些希望AI助手能真正创造价值的人用的。请用它发布有意义、有质量的内容,而不是spam。
~/.openclaw/secrets/xiaohongshu.json)https://creator.xiaohongshu.com/publish/publishpublished=trueimport json
import os
# 使用通用路径,适配所有用户
cookie_path = os.path.expanduser('~/.openclaw/secrets/xiaohongshu.json')
with open(cookie_path, 'r') as f:
raw = json.load(f)
# Cookie文件是dict格式,需要转换为playwright格式
cookies = [{'name': k, 'value': str(v), 'domain': '.xiaohongshu.com', 'path': '/'} for k, v in raw.items()]
from time import sleep
from playwright.sync_api import sync_playwright
def publish_xhs_long_text(title, content, cookies):
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=True)
context = browser.new_context()
# stealth.min.js已内置于项目中
stealth_path = os.path.join(os.path.dirname(__file__), '..', 'stealth.min.js')
context.add_init_script(path=stealth_path)
context.add_cookies(cookies)
page = context.new_page()
page.set_default_timeout(60000)
page.goto('https://creator.xiaohongshu.com/publish/publish')
sleep(3)
page.click('text=写长文')
sleep(2)
page.click('text=新的创作')
sleep(4)
page.fill('textarea[placeholder="输入标题"]', title)
editor = page.locator('[contenteditable="true"]').first
editor.click()
editor.fill(content)
sleep(2)
page.click('text=一键排版')
sleep(3)
page.click('button:has-text("下一步")')
sleep(8)
page.locator('button:has-text("发布")').last.click()
sleep(5)
success = 'published=true' in page.url
browser.close()
return success
~/.openclaw/secrets/xiaohongshu.jsonstealth.min.js ✅ 已内置于项目根目录./publish_long_text.py../xiaohongshu-reply/SKILL.md