Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

post-to-xhs

Skill by xpzouying

Publishes image-and-text posts and long articles to Xiaohongshu (小红书). It is for users who want to share content on the platform from an AI assistant, using either their own content or a web page URL.

  • Score 94
  • 17k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install post-to-xhs

Built from the published package, never by AI.

git clone --depth 1 https://github.com/xpzouying/xiaohongshu-mcp /tmp/xiaohongshu-mcp && mkdir -p ~/.claude/skills && cp -r /tmp/xiaohongshu-mcp/skills/post-to-xhs ~/.claude/skills/post-to-xhs

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install post-to-xhs in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

post-to-xhs is an agent skill for publishing content to Xiaohongshu. It supports two modes: image-text posts (images plus a short text, the default) and long articles (a long text with a layout template). A post is made from either complete content the user supplies with images, or a web page URL from which the skill extracts the title, text and images. Saying "发长文" selects long article mode.

Before publishing, the skill shows the title, body and images to the user and waits for confirmation. It checks that the title stays within the length limit and can shorten the body for long articles. Publishing runs either in headless mode in the background or in a visible browser window, and the skill supports several accounts, each with its own Chrome profile. The source is written for users of Xiaohongshu who publish from Windows with Python.

Written from the project's SKILL.md and checked against it.

What it can do

  • Image-text publishingPublishes a post made of images and a short text, which is the default mode.
  • Long article publishingFills in a long article, applies a layout template chosen by the user, and publishes it.
  • Web page extractionUses WebFetch to pull the title, text and image URLs from a web page and summarises the text.
  • Title length checkEnforces a title length of 38 or less, counting Chinese characters as 2 and ASCII characters as 1.
  • Headless or window modePublishes in the background without a browser window, or shows a window so the user can preview first.
  • Multi-account managementLists, adds, logs in to, switches and sets a default among several accounts, each with its own Chrome profile.

What you need

  • Python
  • Chrome browser
  • A Xiaohongshu account
  • Login by scanning a QR code

Try asking

  • Publish this article and these images to Xiaohongshu as an image-text post.
  • Post this web page to Xiaohongshu as a long article, and let me pick a template.
  • List my Xiaohongshu accounts and switch to the one I want to use.

Good to know

  • Never publishes automatically, so the user must confirm the content first.
  • Image-text posts require at least one image.
  • Long article body text over 1000 characters is shortened to about 800 characters.
  • Selectors may stop working if the Xiaohongshu page structure changes.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/post-to-xhs/SKILL.md, skills/post-to-xhs/scripts/account_manager.py, skills/post-to-xhs/scripts/cdp_publish.py, skills/post-to-xhs/scripts/chrome_launcher.py, skills/post-to-xhs/scripts/image_downloader.py, skills/post-to-xhs/scripts/publish_pipeline.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md8 KB
  • config/accounts.json238 B
  • references/publish-workflow.md11 KB
  • scripts/account_manager.py9 KB
  • scripts/cdp_publish.py41 KB
Show all 10 files
  • scripts/chrome_launcher.py10 KB
  • scripts/content.txt319 B
  • scripts/image_downloader.py5 KB
  • scripts/publish_pipeline.py8 KB
  • scripts/title.txt36 B

Alternatives to post-to-xhs

All alternatives →
video-shortformnexu-io
94

Generates 3 to 10 second short-form video clips for product reveals, motion teasers and ambient loops. It defaults to Seedance 2 and also works with Kling 3 and 4, Veo 3 and Sora 2, saving one MP4 to the project folder.

AAA Skill 110k
seo-plansickn33
94

Builds a strategic SEO plan for new or existing websites, covering competitors, architecture, content, technical setup and a 12-month roadmap. It is aimed at people who need an SEO strategy rather than a one-time audit.

AAA Skill 50k
linkedin-profilealirezarezvani
94

Audits and rewrites a LinkedIn profile for people who want their headline, About section and other parts improved. It scores the headline, audits the whole profile from 0 to 100 and drafts an About section that works above the fold.

AAA Skill 31k
linkedin-strategyalirezarezvani
94

Builds a LinkedIn plan covering content pillars, positioning, posting cadence and whether to start a newsletter. Aimed at people pursuing a career change, consulting, thought leadership or similar goals on LinkedIn.

AAA Skill 31k
landing-pageMengTo
94

Guides an AI assistant to design or rewrite a single-offer landing page for SaaS, apps and services. It covers structure, layout, copywriting, conversion tactics, and SEO/AEO.

AAA Skill 8.5k
linkedin-analyticsalirezarezvani
94

Analyzes your own exported LinkedIn post data to show which posts worked, test whether a pattern is real, and plan posting experiments. Built for people who want to understand their own LinkedIn numbers. It refuses to draw conclusions from fewer than 10 posts.

AAA Skill 31k

Compare with video-shortform, seo-plan or linkedin-profile

post-to-xhs: common questions

How do I publish a long article to Xiaohongshu with this skill?

Say "发长文" to use long article mode. The user then chooses a layout template before the post is published.

What happens if the skill cannot find images on a web page?

It tells the user the extraction failed, gives the original page link, and asks the user to supply the images manually before publishing.

Can I run the publishing without a visible browser window?

Yes. Headless mode runs in the background and is recommended in the source. If login is needed, the skill switches to window mode.

How do I install post-to-xhs?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is post-to-xhs free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is post-to-xhs safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to post-to-xhs?

Similar skills: video-shortform, seo-plan, linkedin-profile, linkedin-strategy.

post-to-xhs Install

Add to stack

Loading.