xhs-auto-publisher

xhs-auto-publisher is a skill for Claude Code, Codex from DjangoPeng/agentic-ai. It costs 74 tokens per session (1,069 once invoked), scanned A, original, MIT.

A cloud-server workflow for preparing and publishing image-and-text posts on Xiaohongshu, a Chinese social-media platform. It uses browser automation while allowing a person to scan a login QR code.

In plain words
What is it for?
Use it to create or publish Xiaohongshu drafts, handle manual QR-code login, send login prompts through a Feishu group, and retain run evidence.
Why use it?
It keeps login state, screenshots, browser records, and execution logs in one deployment workflow, so cloud-based publishing can be checked afterward.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to create or publish Xiaohongshu drafts, handle manual QR-code login, send login prompts through a Feishu group, and retain run evidence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/djangopeng/agentic-ai/xhs-auto-publisher
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add DjangoPeng/agentic-ai --skill xhs-auto-publisher
Clone the repo
git clone --depth 1 https://github.com/DjangoPeng/agentic-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xhs-auto-publisher

README.md
[![agentmods](https://agentmods.dev/badge/skills/djangopeng/agentic-ai/xhs-auto-publisher/github.svg)](https://agentmods.dev/skills/djangopeng/agentic-ai/xhs-auto-publisher)
Your own site
<a href="https://agentmods.dev/skills/djangopeng/agentic-ai/xhs-auto-publisher"><img src="https://agentmods.dev/badge/skills/djangopeng/agentic-ai/xhs-auto-publisher/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xhs-auto-publisher

Your own site · 80×15
<a href="https://agentmods.dev/skills/djangopeng/agentic-ai/xhs-auto-publisher"><img src="https://agentmods.dev/badge/skills/djangopeng/agentic-ai/xhs-auto-publisher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,069 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.01069
Opus 5.5 $0.00030 $0.00428
Sonnet 5.5 $0.00015 $0.00214
Haiku 4.5 $0.00007 $0.00107

Measured 1mo ago against content hash 64c6448faaac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

xhs-auto-publisher scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 14 executable files (deploy/bootstrap_project.sh, deploy/install_system_ubuntu.sh, deploy/run_with_xvfb.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

xhs-auto-publisher/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

XHS Auto Publisher Cloud

这个 Skill 是云端执行版,不是本机版替代品。

它主要解决四件事:

  • 在 Linux 云服务器上跑浏览器自动化
  • 把登录二维码交给人扫码
  • 把登录状态缓存起来
  • 把执行结果留痕

默认链路

当前项目只保留一条默认链路:

  1. Agent 打开小红书登录页
  2. Agent 截出二维码图片
  3. 项目生成 login_qr.payload.json
  4. 龙虾读取 payload
  5. 龙虾把二维码图片直接发到飞书群
  6. 用户扫码
  7. Agent 继续执行

不依赖公网二维码链接,不依赖 XHS_PUBLIC_RUNTIME_BASE_URL。

适用场景

适合:

  • 在云服务器上跑小红书图文草稿/发布
  • 需要人工扫码接管登录
  • 需要持久化浏览器 profile
  • 需要截图、日志、DOM 快照
  • 需要把标准化部署交给龙虾执行

不适合:

  • 绕过验证码、滑块、人机验证
  • 批量互动、批量点赞、批量评论
  • 操作未授权账号

项目结构

  • config/:平台配置与选择器
  • src/:发布逻辑、登录检测、通知模块
  • scripts/:CLI 入口
  • deploy/:部署脚本与 systemd 示例
  • docs/:部署说明和龙虾执行文档
  • runtime/:浏览器 profile、截图、运行结果

部署分层

系统级

这部分影响整台机器:

  • python3
  • python3-venv
  • python3-pip
  • xvfb
  • 浏览器运行依赖

项目级

这部分只属于当前目录:

  • .venv
  • Python 依赖
  • Playwright Chromium
  • runtime/

推荐目录

~/projects/xhs-auto-publisher
~/projects/xhs-auto-publisher/runtime
~/projects/xhs-auto-publisher/runtime/browser-profile
~/projects/xhs-auto-publisher/runtime/runs
~/projects/xhs-auto-publisher/runtime/lobster-notify

输入格式

发布内容使用 JSON 文件,例如:

{
  "title": "OpenClaw 能帮业务团队做什么?",
  "body": "很多团队不是缺 AI 聊天工具,而是缺一个能把业务流程真正跑起来的数字员工。",
  "topics": ["OpenClaw", "AI工具", "浏览器自动化"],
  "images": ["assets/cover.jpg"],
  "mode": "publish"
}

环境变量

当前只保留最常用的两个:

MODE=publish
LOGIN_TIMEOUT=300

运行方式

手动运行:

cd ~/projects/xhs-auto-publisher
bash deploy/run_with_xvfb.sh

执行流程

  1. 校验内容和图片
  2. 检查重复发布保护
  3. 启动持久化 Chromium profile
  4. 读取登录缓存,默认 12 小时
  5. 检查是否已登录
  6. 如未登录,生成二维码截图并写出龙虾通知 payload
  7. 龙虾把二维码图片发到飞书群
  8. 用户扫码后继续
  9. 上传图片、填写内容、触发发布
  10. 保存截图、日志、DOM 快照和结果 JSON

运行产物

每次执行都会写入:

runtime/runs/<timestamp>/

包含:

  • actions.jsonl
  • result.json
  • content.normalized.json
  • screenshots/*.png
  • dom/*.html

通知文件会写入:

runtime/lobster-notify/<run_id>/login_qr.payload.json

文档入口

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 170 lines · 74 tokens per session scan A 64c6448faaac

Subscribe to this mod's changes

xhs-auto-publisher is a skill published in the GitHub repository DjangoPeng/agentic-ai (153 stars, last pushed 3mo ago), licensed MIT. It adds 74 tokens to every session and 1,069 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

browser-automation

Drive the PenguinHarness agent browser — the desktop app's built-in browser or the user's own Chrome — from the shell with penguin browser: open pages, read them as simplified HTML or text, act with JavaScript and trusted clicks and typing, and pull structured data out of them (orders, search results, tables), signed…

Prism-Shadow/penguin-harness · 103 tokens

firecrawl

Search the web and scrape pages into clean markdown with the Firecrawl API — query-based discovery, single-URL extraction including public PDFs, driven by curl with a vault-stored API key.

Prism-Shadow/penguin-harness · 41 tokens

browser-workflow-skill-builder

Create robust browser automation skills for sites like LinkedIn, X/Twitter, YouTube, Stripe, or other logged-in web apps by saving page context, analyzing HTML/CSS, writing skill-local JS extract/verify scripts, and using CSS selector actions with screenshot verification.

openonion/connectonion · 61 tokens

co-browser

Drive one persistent, logged-in browser from the shell with co browser. Use when the user asks to open a page, log into a site, scrape/extract page content, fill forms, upload files, take screenshots, or automate any browser task — solo or with multiple agents sharing the browser.

openonion/connectonion · 63 tokens

co-tiktok

Prepare a local TikTok post plan and check, with saved browser evidence, whether a co browser tab is logged in to TikTok Studio. TikTok upload and publish are not implemented; YouTube lives in co-google.

openonion/connectonion · 48 tokens

computer-use

Choose Memmy browser, desktop Computer Use, or a structured connector for a live task on macOS or Windows 11; keep Computer History retrieval separate from UI actions.

MemTensor/memmy-agent · 37 tokens