搜索

PythonReactSEOPDF
OpenClaw

xhs-kit-publisher

使用xhs-kit Python库高效发布小红书内容,无需浏览器,支持多账号和定时发布

glittering0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install glittering/xhs-kit-publisher

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

xhs-kit 小红书发布技能

使用 xhs-kit Python库实现高效、稳定的小红书内容发布,无需打开浏览器,支持多账号管理和定时发布。

🎯 核心优势

特性 传统浏览器方式 xhs-kit方式
效率 低(3-5分钟) ✅ 高(~60秒)
稳定性 低(浏览器崩溃) ✅ 高
多账号 ❌ 不支持 ✅ 支持
资源占用 高(开浏览器) ✅ 低
定时发布 需要外部调度 ✅ 内置支持

📦 安装

# 1. 创建虚拟环境
python3 -m venv xhs-env
source xhs-env/bin/activate

# 2. 安装xhs-kit
pip install -U xhs-kit

# 3. 安装Playwright浏览器
playwright install chromium

# 4. 安装其他依赖
pip install pillow requests markdown pyyaml

🔑 快速开始

1. 登录小红书账号
# 终端二维码登录(推荐)
xhs-kit login-qrcode --terminal

# 或保存二维码图片
xhs-kit login-qrcode --save qrcode.png
2. 检查登录状态
xhs-kit status
3. 发布内容
# 基本发布
xhs-kit publish \
  --title "标题(不超过20字)" \
  --content "正文内容..." \
  --image /path/to/image.jpg \
  --tag "标签1" \
  --tag "标签2"

# 定时发布
xhs-kit publish \
  --title "标题" \
  --content "内容" \
  --schedule-at "2026-03-08T11:00:00+08:00"

📁 项目结构

xhs-kit-publisher/
├── SKILL.md                    # 本文档
├── publish_xhs.sh              # 发布脚本示例
├── xhs_kit_guide.md            # 完整使用指南
├── config/
│   ├── account1_cookies.json   # 账号1 cookies
│   └── account2_cookies.json   # 账号2 cookies
├── scripts/
│   ├── multi_account_publish.sh # 多账号发布脚本
│   └── schedule_publish.py     # 定时发布脚本
└── examples/
    ├── simple_publish.md       # 简单发布示例
    └── advanced_features.md    # 高级功能示例

🚀 核心功能

1. 多账号管理
# 登录不同账号
xhs-kit login-qrcode --terminal --cookies-file config/account1.json
xhs-kit login-qrcode --terminal --cookies-file config/account2.json

# 使用指定账号发布
xhs-kit publish --title "..." --cookies-file config/account1.j...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/glittering/xhs-kit-publisher
Version
—
Commit
58e3c05b07273aea1ff2c02dde6696c71a0d0a87
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# xhs-kit 小红书发布技能

使用 `xhs-kit` Python库实现高效、稳定的小红书内容发布,无需打开浏览器,支持多账号管理和定时发布。

## 🎯 核心优势

| 特性 | 传统浏览器方式 | xhs-kit方式 |
|------|---------------|------------|
| **效率** | 低(3-5分钟) | ✅ **高(~60秒)** |
| **稳定性** | 低(浏览器崩溃) | ✅ **高** |
| **多账号** | ❌ 不支持 | ✅ **支持** |
| **资源占用** | 高(开浏览器) | ✅ **低** |
| **定时发布** | 需要外部调度 | ✅ **内置支持** |

## 📦 安装

```bash
# 1. 创建虚拟环境
python3 -m venv xhs-env
source xhs-env/bin/activate

# 2. 安装xhs-kit
pip install -U xhs-kit

# 3. 安装Playwright浏览器
playwright install chromium

# 4. 安装其他依赖
pip install pillow requests markdown pyyaml
```

## 🔑 快速开始

### 1. 登录小红书账号
```bash
# 终端二维码登录(推荐)
xhs-kit login-qrcode --terminal

# 或保存二维码图片
xhs-kit login-qrcode --save qrcode.png
```

### 2. 检查登录状态
```bash
xhs-kit status
```

### 3. 发布内容
```bash
# 基本发布
xhs-kit publish \
  --title "标题(不超过20字)" \
  --content "正文内容..." \
  --image /path/to/image.jpg \
  --tag "标签1" \
  --tag "标签2"

# 定时发布
xhs-kit publish \
  --title "标题" \
  --content "内容" \
  --schedule-at "2026-03-08T11:00:00+08:00"
```

## 📁 项目结构

```
xhs-kit-publisher/
├── SKILL.md                    # 本文档
├── publish_xhs.sh              # 发布脚本示例
├── xhs_kit_guide.md            # 完整使用指南
├── config/
│   ├── account1_cookies.json   # 账号1 cookies
│   └── account2_cookies.json   # 账号2 cookies
├── scripts/
│   ├── multi_account_publish.sh # 多账号发布脚本
│   └── schedule_publish.py     # 定时发布脚本
└── examples/
    ├── simple_publish.md       # 简单发布示例
    └── advanced_features.md    # 高级功能示例
```

## 🚀 核心功能

### 1. 多账号管理
```bash
# 登录不同账号
xhs-kit login-qrcode --terminal --cookies-file config/account1.json
xhs-kit login-qrcode --terminal --cookies-file config/account2.json

# 使用指定账号发布
xhs-kit publish --title "..." --cookies-file config/account1.j...

相关技能

OpenClaw

openbotx

openbotx

An open-source platform for orchestrating AI agents — secure, simple, and built for everyone. Multi-agent, real-time task board, web control panel, skills system, browser automation, multi-provider, scheduler,...

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

zsxq-digest

sealiu1997

OpenClaw skill for 知识星球 / ZSXQ digests with token-first auth and browser recovery.

OpenClaw

browser-use-skill

abczsl520

🌐 OpenClaw skill for Browser-Use — AI-powered browser automation for complex multi-step workflows (login, form filling, scraping, posting)