xhs-publisher

xhs-publisher is a skill for Claude Code, Codex from AlanSong2077/Amplipost. It costs 106 tokens per session (1,811 once invoked), scanned A, original, MIT.

An automation tool for publishing, searching, and interacting on Xiaohongshu, a Chinese lifestyle and social-media platform. It connects to a local service that controls a Chromium browser and stores login cookies after the first sign-in.

In plain words
What is it for?
Use it to publish Xiaohongshu notes, search content, perform supported interactions, check login status, and operate the local Xiaohongshu service.
Why use it?
It handles routine Xiaohongshu actions through a reusable local browser session, so you do not need to repeat the same manual steps each time.

Skill for Claude CodeCodex

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/xxx/img.jpg.

Good fit Use it to publish Xiaohongshu notes, search content, perform supported interactions, check login status, and operate the local Xiaohongshu service.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alansong2077/amplipost/xhs-publisher"><img src="https://agentmods.dev/badge/skills/alansong2077/amplipost/xhs-publisher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,811 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00106 $0.01811
Opus 5 $0.00053 $0.00905
Sonnet 5 $0.00021 $0.00362
Haiku 4.5 $0.00011 $0.00181

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

Security

Grade A, and why

xhs-publisher scanned grade A with 2 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/xhs_publish_scrapling.py, scripts/xhs_publish.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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -X POST http://localhost:18060/mcp \

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
publishers/xhs-publisher/SKILL.md · 225 lines

How it starts

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

小红书发布 Skill(xiaohongshu-mcp 版)

架构说明

本 Skill 不再使用 Playwright Python 脚本,改为调用 xiaohongshu-mcp MCP Server(Go + go-rod + CDP)。

content-coordinator Agent
        │
        │  HTTP POST http://localhost:18060/mcp
        ▼
xiaohongshu-mcp MCP Server(本地 Go 进程,端口 18060)
        │
        │  Chrome DevTools Protocol
        ▼
Chromium 浏览器(无头模式)
        │
        ▼
小红书网页端

为什么换掉 Playwright:

  • Playwright 走 WebDriver 协议,navigator.webdriver=true 特征被小红书风控识别
  • xiaohongshu-mcp 走 CDP 直连,无 WebDriver 特征,行为模拟更接近真人
  • 原作者自用一年无封号,已有大量用户验证

前置:启动 xiaohongshu-mcp 服务

首次登录(只需一次)

# macOS Apple Silicon
cd $XHS_MCP_DIR
./xiaohongshu-login-darwin-arm64

# 或从源码运行
go run cmd/login/main.go

扫码登录后,Cookie 自动保存到 cookies.json,后续无需重复登录。

启动 MCP 服务

cd $XHS_MCP_DIR

# 无头模式(生产推荐)
go run .

# 有界面模式(调试用)
go run . -headless=false

服务启动后监听 http://localhost:18060,保持运行。

验证服务状态

curl -s -X POST http://localhost:18060/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"check_login_status","arguments":{}},"id":1}'

MCP 工具完整列表(共 13 个)

工具名 说明 必填参数
check_login_status 检查登录状态
get_login_qrcode 获取登录二维码(Base64)
delete_cookies 重置登录状态
publish_content 发布图文笔记 title, content, images
publish_with_video 发布视频笔记 title, content, video
list_feeds 获取首页推荐列表
search_feeds 搜索笔记 keyword
get_feed_detail 获取笔记详情+评论 feed_id, xsec_token
post_comment_to_feed 发表评论 feed_id, xsec_token, content
reply_comment_in_feed 回复评论 feed_id, xsec_token, content
like_feed 点赞/取消点赞 feed_id, xsec_token
favorite_feed 收藏/取消收藏 feed_id, xsec_token
user_profile 获取用户主页 user_id, xsec_token

发布图文(核心调用)

HTTP 直接调用

curl -s -X POST http://localhost:18060/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "publish_content",
      "arguments": {
        "title": "笔记标题(≤20字)",
        "content": "正文内容(200-300字)",
        "images": ["/absolute/path/to/image.jpg"],
        "tags": ["标签1", "标签2"]
      }
    },
    "id": 1
  }'

Read the full file on GitHub · 225 lines

Files

What ships with it

4 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 · 225 lines · 106 tokens per session scan A cb01e11c6767

Subscribe to this mod's changes

xhs-publisher is a skill published in the GitHub repository AlanSong2077/Amplipost (45 stars, last pushed 4mo ago), licensed MIT. It adds 106 tokens to every session and 1,811 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). 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

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens