跪拜 Guibai
← All articles
Agent · Frontend · Full Stack

AI Agent Writes and Publishes to WeChat Official Account: A Full Walkthrough with Zhiyu and baoyu-skills

By 双越AI_club ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

This walkthrough shows that AI Agents are moving beyond chat into real production workflows — writing, image generation, and CMS publishing — all orchestrated from a single prompt. For Western developers, it signals that open-source skill ecosystems like baoyu-skills are becoming platform-agnostic building blocks, lowering the barrier to building autonomous content pipelines.

Summary

The open-source AI Agent Zhiyu (zhitalk.chat), combined with the baoyu-skills writing toolkit, now handles the entire content pipeline for WeChat Official Accounts: writing, image generation, and draft publishing. A developer demonstrates the full flow by installing Zhiyu globally via npm, configuring it with a Kimi model, and adding baoyu-skills as a skill set.

The test starts simple: feeding a local text file and image, then asking the agent to publish. The agent loads the baoyu-post-to-wechat skill, reads the files, and runs a Bun script to push a draft to WeChat. Next, image generation is added via Alibaba Cloud's DASHSCOPE API — the agent prompts the user for confirmation, then calls baoyu-image-gen to produce a cover image.

In the final end-to-end test, the developer asks for a 2000-word article on "Which industries will AI Agents change?" with 2-3 inline images and a cover. The agent writes the article, generates images, and publishes. The first attempt misses inline images — but a follow-up command "check again" triggers the agent to fix the issue and re-publish successfully. The entire workflow runs on standard, reusable skills that work across multiple AI Agent platforms.

Takeaways
Zhiyu is an open-source AI Agent personal assistant, installable globally via npm i zhitalk -g, with first-run initialization creating a database and installing base skills.
baoyu-skills is a writing skill set compatible with multiple AI Agents (Claude Code, Codex, Openclaw, Zhiyu), installed via npx skills add jimliu/baoyu-skills.
The agent can publish to WeChat Official Account by loading the baoyu-post-to-wechat skill, which reads local files and runs a Bun script.
Image generation uses Alibaba Cloud's DASHSCOPE API (free tier available) via the baoyu-cover-image and baoyu-image-gen skills.
In a full end-to-end test, the agent wrote a 2000-word article, generated a cover image, and published a draft — but initially missed inline images.
A follow-up command to "check again" triggered the agent to fix the missing inline images and re-publish successfully.
The entire workflow uses standard, reusable skills stored in ~/.agents/skills, following the Openclaw directory structure.
WeChat API credentials (AppID, AppSecret) must be stored in a local .env file and the machine IP added to the API whitelist.
Conclusions

The ability to fix a publishing bug (missing inline images) by simply saying "check again" demonstrates how conversational debugging can replace manual code fixes in agent-driven workflows.

baoyu-skills being platform-agnostic (works with Claude Code, Codex, Openclaw, Zhiyu) points toward a future where skill marketplaces are the new package registries for AI agents.

The reliance on Alibaba Cloud's DASHSCOPE for image generation highlights the China-specific infrastructure choices developers must navigate — a reminder that AI tooling is not globally uniform.

The developer's choice to test with a classic Chinese poem (Su Shi's "Prelude to Water Melody") before moving to AI-generated content shows a pragmatic, incremental testing strategy that reduces debugging surface area.

Bun being used as the runtime for the publishing script suggests a modern JavaScript toolchain preference in the Chinese AI agent ecosystem.

Concepts & terms
Zhiyu (智语)
An open-source AI Agent personal assistant built with Node.js, supporting tools, skills, memory, context, permissions, subagents, sessions, commands, hooks, and MCP servers. Designed as a general-purpose agent similar to Openclaw.
baoyu-skills
A collection of standardized writing skills for AI Agents, including article writing, image generation, and publishing to WeChat Official Account. Compatible with multiple agent platforms like Claude Code, Codex, and Openclaw.
WeChat Official Account (公众号)
A content publishing platform within WeChat (China's dominant messaging app) where creators can publish articles, images, and media to subscribers. It has its own API for programmatic content management.
DASHSCOPE (阿里百炼)
Alibaba Cloud's AI model platform that provides access to large language models and image generation APIs. It is accessible from Chinese domestic networks and offers free trial quotas.
Openclaw (小龙虾)
An open-source AI Agent framework that defines a standard directory structure for skills. Zhiyu and baoyu-skills follow this structure for compatibility.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗