xiaohongshu-publisher

xiaohongshu-publisher is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 18 tokens per session (708 once invoked), scanned A, original, Apache-2.0.

An automation client for Xiaohongshu, a Chinese social platform for short lifestyle and interest-based posts, using the website's internal interfaces. It can save drafts, publish, edit, and delete notes.

In plain words
What is it for?
Use it to manage Xiaohongshu notes from scripts, including drafts, publishing, editing, deleting, tags, and image-based posts.
Why use it?
It removes repetitive manual post management while dry-run mode lets you inspect write actions before sending them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to manage Xiaohongshu notes from scripts, including drafts, publishing, editing, deleting, tags, and image-based posts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/xiaohongshu-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 Morningstar202604/awesome-skillkit --skill xiaohongshu-publisher
Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit

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 xiaohongshu-publisher

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/xiaohongshu-publisher/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/xiaohongshu-publisher)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/xiaohongshu-publisher"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/xiaohongshu-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 xiaohongshu-publisher

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/xiaohongshu-publisher"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/xiaohongshu-publisher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 708 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.
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.00018 $0.00708
Opus 5 $0.00009 $0.00354
Sonnet 5 $0.00004 $0.00142
Haiku 4.5 $0.00002 $0.00071

Measured 12d ago against content hash 022da2d7d5a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

xiaohongshu-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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/xiaohongshu_publisher.py, tests/test_xiaohongshu_publisher.py), 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.

skills/writing/social/xiaohongshu-publisher/SKILL.md · 83 lines

What it actually says

小红书 Publisher

小红书发布客户端,基于小红书 Web 内部接口(无公开 API)。

功能

  • draft-save —— 保存草稿,返回 note_id
  • publish —— 发布笔记
  • edit —— 编辑已发布笔记
  • delete —— 删除笔记

安全设计

  • 默认 dry-run:所有写操作默认只打印请求计划,不联网;加 --execute 才真正发送。
  • 凭据隔离XHS_COOKIE 环境变量或 --cookie-file

使用示例

export XHS_COOKIE="xhs_track=xxx; a1=xxx; web_session=xxx; ..."
python xiaohongshu_publisher.py draft-save --execute \
  --title "我的笔记" \
  --content "正文内容..." \
  --tags "Python,AI" \
  --images "https://example.com/img1.png,https://example.com/img2.png" \
  --cover-image "https://example.com/cover.png"

python xiaohongshu_publisher.py publish --execute <note_id>

python xiaohongshu_publisher.py edit --execute <note_id> \
  --title "更新标题" \
  --content "更新内容..."

端点核对(首次使用必做)

小红书无公开 API,端点可能随时变更。首次使用前请在浏览器 DevTools 核对。

当前端点(需核对):

  • 草稿保存: POST https://www.xiaohongshu.com/api/sns/web/v1/note/create
  • 发布: POST https://www.xiaohongshu.com/api/sns/web/v1/note/publish
  • 编辑: POST https://www.xiaohongshu.com/api/sns/web/v1/note/update
  • 删除: POST https://www.xiaohongshu.com/api/sns/web/v1/note/delete

认证

XHS_COOKIE — 包含 xhs_tracka1web_session 等字段

export XHS_COOKIE="xhs_track=xxx; a1=xxx; web_session=xxx; ..."

退出码

  • 0 成功
  • 1 API 错误或参数错误

依赖

  • Python 3.8+
  • 标准库
  • publish_common

相关技能

  • weibo-publisher — 微博发布
  • bilibili-publisher — B 站发布
  • toutiao-publisher — 今日头条发布
  • cross-post-orchestrator — 多平台编排
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 83 lines · 18 tokens per session scan A 022da2d7d5a5

Subscribe to this mod's changes

xiaohongshu-publisher is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (1 stars, last pushed 2d ago), licensed Apache-2.0. It adds 18 tokens to every session and 708 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other skills, from other repositories

yao-geo-tracking

Build a company-specific GEO backend tracking plan from a company name plus optional supporting information, using authoritative retrieval anchored on the official website, business-feature recognition, and market-aware GEO monitoring methods, then deliver a direct-vs-indirect attribution design, data model, roadmap…

yaojingang/yao-geo-skills · 158 tokens

yao-geo-comparison-builder

A tool for creating evidence-based Chinese brand comparison content for AI search and answer platforms. It compares a target brand with competitors, traditional approaches, or self-built solutions.

yaojingang/yao-geo-skills · 105 tokens

yao-geo-explainer-builder

A tool for creating detailed, evidence-based educational articles about a topic for Chinese AI search and answer platforms. It can include explanations, how-to steps, selection guidance, common mistakes, FAQs, and a glossary.

yaojingang/yao-geo-skills · 153 tokens

yao-geo-page-audit

Diagnose a website page or small page set for GEO readiness with authoritative public evidence, systematic page analysis, code/content/schema fixes, and four-format Chinese report delivery.

yaojingang/yao-geo-skills · 41 tokens

yao-geo-brand-graph

A method for building a brand entity knowledge graph from company information, websites, products, customers, people, places, evidence sources, and use cases. A knowledge graph records entities and the supported relationships between them.

yaojingang/yao-geo-skills · 67 tokens

yao-deepseek-crawler

Use when a user provides DeepSeek web AI-search keywords, repeat count, target entity, and entity type, then needs repeated fresh-window crawls aggregated into JSON plus a Kami HTML GEO report. Not for generic website crawling, DeepSeek API chat, SEO writing, or one-off answer generation.

yaojingang/yao-geo-skills · 67 tokens