Publishing to Xiaohongshu and WeChat Official Accounts from Claude Code: connect, publish, know where it stuck
A step-by-step guide to letting Claude Code publish one piece to Xiaohongshu and a WeChat Official Account through OmniPost. One line to connect, automatic publishing on Xiaohongshu, drafts on WeChat that a human sends, and the things that actually block you, such as sessions, length limits, external links and duplicate titles.
This guide covers two platforms only: Xiaohongshu and WeChat Official Accounts. They are the two that people publishing with agents ask about most and get stuck on most, for different reasons. Xiaohongshu can be published automatically but has fine-grained rules; WeChat cannot be published at all, only drafted. Three steps: connect, publish, know where it stuck.
Connect: one line, or one folder
Prerequisite: install OmniPost, open it, and scan the QR code once each for Xiaohongshu and your Official Account under Accounts. Sessions stay in isolated browser partitions on this machine; nothing goes through a cloud.
Then pick one.
MCP, one line:
claude mcp add --transport sse omnipost http://127.0.0.1:8787/sse
Skill, no MCP config: copy skills/omnipost/ from the omnipost-skill repo into ~/.claude/skills/omnipost/. Besides telling Claude Code how to find the local OmniPost and call the CLI, it ships rules/xiaohongshu.md and rules/weixin.md, which the agent reads before publishing.
Before the first agent-driven publish, claim the 7-day Pro trial inside the app. The free tier allows agents read-only calls; writes return LICENSE_REQUIRED.
Publish: Xiaohongshu
Tell Claude Code:
Publish
D:\notes\today.mdto Xiaohongshu with 1.jpg to 4.jpg from the same folder as images, topics "Claude Code" and "productivity", and write a title under 20 characters.
It calls publish_post (the CLI equivalent is omnipost publish --doc today.md --targets xiaohongshu:default --mode publish --cover 1.jpg …). OmniPost uploads and publishes inside Xiaohongshu's own page context and returns stage: published. Video notes work the same way with a local file path.
The four things that actually block you on Xiaohongshu:
- 20 characters for the title, 1,000 for the body are hard limits; the platform rejects anything over. Say the numbers when you ask Claude Code for a title.
- Topics must be real. OmniPost matches
tagsto topics that exist on the platform and does not force in ones that do not. - Avoid duplicate titles. The web editor does not return a note ID after publishing, so OmniPost's status check matches by title; two notes with the same title cannot be told apart.
- External links, QR codes and contact details are written red lines;
rules/xiaohongshu.mdcites the clauses. Remove them before publishing.
Publish: WeChat Official Account
Tell Claude Code:
Publish the same piece to the Official Account, cover from cover.png, and write a summary under 100 characters.
The result is stage: draft, code: MANUAL_PUBLISH. That is not a failure. WeChat separates "publish" from "mass send": the API reaches the draft box, and the mass-send click must be made by a person in the backend. OmniPost has already filled in the body, cover and summary; open the backend and click once.
The three things that actually block you on WeChat:
- Sessions drop every 3 to 4 days. This is an absolute expiry on the platform side; keeping the app open and probing every 10 minutes does not prevent it. OmniPost warns once, 12 hours before expiry; anything published after the drop is not lost but queued, and goes out automatically within 48 hours of scanning again. Have Claude Code call
list_alertsfirst and it sees which account is about to lapse. - Only allow-listed external links survive. Links in the body are stripped or made unclickable; use the "read original" link instead.
rules/weixin.mdlists what is allowed. - Cover and formatting. OmniPost uploads the cover automatically, and bold, highlight, colour and underline from Markdown are preserved on WeChat, one of the few platforms that keeps inline styles.
Know where it stuck
Each target returns one structured result that Claude Code can read without you digging through logs:
published: it went out, with a link.draft+MANUAL_PUBLISH: in the draft box, waiting for a human. WeChat is always this.NEED_LOGIN: the session lapsed; the item is in the retry queue.VALIDATION_FAILED: length, images or a required field broke a rule; the message says which.QUOTA_EXCEEDED: you hit your own daily cap or a policy (quiet hours, duplicate title).
One call can carry both targets, targets: [xiaohongshu:default, weixin:default], and each target can have its own title and summary: a 20-character title for Xiaohongshu and a normal one for WeChat in the same request.
The honest part
There is no "ban protection". Cloud-server IPs are banned almost on sight, fixed-interval schedules are a signature in themselves, and the same structure repeated gets judged at the content level. OmniPost's policy layer adds daily caps, duplicate-title blocking, a failure circuit breaker, quiet hours and minimum spacing between targets, enforced server-side for agent calls. It does not guarantee anything; it keeps the most machine-like behaviour out. Automated comments, DMs and human simulation: not offered.
To talk, open an issue titled with "chat" at github.com/OmniGoAI/omnipost-skill; 20 minutes gets you 3 months of Pro.