post-to-xhs

post-to-xhs is a skill for Claude Code from autoclaw-cc/xiaohongshu-mcp-skills. It costs 113 tokens per session (867 once invoked), scanned A, original, MIT.

A workflow for publishing posts to Xiaohongshu, either as image posts or video posts. It checks the required content and shows a preview before publishing.

In plain words
What is it for?
Use it to publish image or video posts with titles, text, tags, visibility settings, originality declarations, or a scheduled time. It can also extract text and images from a supplied web URL before publishing.
Why use it?
It prevents common publishing errors, such as missing media, overlong titles, invalid video paths, or mixing images and video. It also gives you a chance to review a post before it is published and cannot be withdrawn.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to publish image or video posts with titles, text, tags, visibility settings, originality declarations, or a scheduled time. It can also extract text and images from a supplied web URL before publishing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs
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 autoclaw-cc/xiaohongshu-mcp-skills --skill post-to-xhs
Clone the repo
git clone --depth 1 https://github.com/autoclaw-cc/xiaohongshu-mcp-skills

Made for: Claude Code.

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 post-to-xhs

README.md
[![agentmods](https://agentmods.dev/badge/skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs/github.svg)](https://agentmods.dev/skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs)
Your own site
<a href="https://agentmods.dev/skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs"><img src="https://agentmods.dev/badge/skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs/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 post-to-xhs

Your own site · 80×15
<a href="https://agentmods.dev/skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs"><img src="https://agentmods.dev/badge/skills/autoclaw-cc/xiaohongshu-mcp-skills/post-to-xhs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 867 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.00113 $0.00867
Opus 5.5 $0.00045 $0.00347
Sonnet 5.5 $0.00023 $0.00173
Haiku 4.5 $0.00011 $0.00087

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

Security

Grade A, and why

post-to-xhs 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 2mo ago.

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/post-to-xhs/SKILL.md · 87 lines

What it actually says

输入判断

根据用户提供的素材判断发布类型:

  • 提供了视频文件 → 视频笔记
  • 提供了图片 → 图文笔记
  • 仅提供文本 → 提示用户至少提供图片或视频

约束

  • 标题最多 20 个中文字或英文单词(小红书平台限制,超长会被截断)
  • 图文笔记至少 1 张图片(小红书不允许纯文本笔记)
  • 视频笔记仅支持本地视频文件绝对路径(MCP 服务需要读取本地文件)
  • 图片和视频不能混用,只能二选一(小红书平台限制)
  • 正文中不要包含 # 标签(标签通过 tags 参数单独传递,MCP 服务会自动处理格式)
  • 发布前展示完整内容让用户确认(发布后无法撤回)

执行流程

1. 收集发布信息

确保以下内容齐全:

  • title(必填)— 标题
  • content(必填)— 正文
  • 图片列表或视频路径(必填其一)
  • tags(可选)— 话题标签
  • schedule_at(可选)— 定时发布,ISO8601 格式
  • is_original(可选,仅图文)— 声明原创
  • visibility(可选)— 公开可见 | 仅自己可见 | 仅互关好友可见

信息不完整时,向用户询问缺少的部分。

2. 内容校验

  • 检查标题长度(≤20 中文字)
  • 检查图片/视频文件路径是否为绝对路径
  • 如用户提供 URL 内容,先用 WebFetch 提取文本和图片

3. 确认发布

向用户展示完整的发布内容预览:

  • 标题、正文、标签
  • 图片列表或视频路径
  • 定时时间、可见范围(如有)

等待用户确认后才执行发布。

4. 发布

图文笔记 — 调用 publish_content:

  • title(string,必填)
  • content(string,必填)
  • images(string[],必填)— 图片路径或 URL
  • tags(string[],可选)
  • schedule_at(string,可选)
  • is_original(bool,可选)
  • visibility(string,可选)

视频笔记 — 调用 publish_with_video:

  • title(string,必填)
  • content(string,必填)
  • video(string,必填)— 本地视频绝对路径
  • tags(string[],可选)
  • schedule_at(string,可选)
  • visibility(string,可选)

5. 报告结果

发布成功后,告知用户笔记 ID 和发布状态。

失败处理

场景 处理
未登录 引导使用 xhs-login
标题超长 提示用户缩短标题
图片路径无效 提示检查路径是否正确
视频使用了相对路径 提示改为绝对路径
发布失败 展示错误信息,建议检查内容或重试
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. 2mo ago First seen · 87 lines · 113 tokens per session scan A 2c4988e26130

Subscribe to this mod's changes

post-to-xhs is a skill published in the GitHub repository autoclaw-cc/xiaohongshu-mcp-skills (277 stars, last pushed 8mo ago), licensed MIT. It adds 113 tokens to every session and 867 once invoked, about $0.0005 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

post-to-xhs compared with skills from other repositories

post-to-xhs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
post-to-xhsautoclaw-cc/xiaohongshu-mcp-skillsSkill2778mo agoMITA113Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code