tentacle-pro/skills

baoyu-post-to-wechat

Posts content to WeChat Official Account draft box via official API. Supports HTML/Markdown input, cover image upload, inline image upload, and draft saving. Use when user asks to publish article draft to WeChat.

First seen Mar 6, 2026

Installation

$ npx skills add tentacle-pro/skills --skill baoyu-post-to-wechat

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from tentacle-pro/skills · top by installs.

npx skills add tentacle-pro/skills

Browse all from tentacle-pro/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 4
License LICENSE
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,556 B
  • docs SUMMARY.md 240 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 94 installs

SKILL.md

baoyu-post-to-wechat (Community Edition)

Community edition posts directly to WeChat Official Account API from local machine.

Runtime

  • Entry script: scripts/wechat-api.ts
  • Run command:
bun .agents/skills/baoyu-post-to-wechat/scripts/wechat-api.ts <file> [options]

Credentials

Put credentials in shared .agents/skills/.env:

WECHAT_APP_ID=...
WECHAT_APP_SECRET=...

Resolution order:

  1. Process env
  2. .agents/skills/.env

Scope

This skill only targets draft box saving (draft/add), not mass-send.

Publishing Rules

  1. Cover image uses permanent material API (material/addmaterial, type=image), obtains thumbmedia_id.
  2. Inline images in article HTML use media/uploadimg, obtains public url.
  3. Save draft through draft/add with article payload.
  4. needopencomment=1, onlyfanscan_comment=0 by default.

Official API Mapping

  • draft/add (article_type=news):

- thumbmediaid must be a permanent media_id. - content image URLs must come from media/uploadimg.

  • material/add_material?type=image: cover and other permanent image assets.
  • media/uploadimg: inline images for article HTML content.

Recommended Operation Order

  1. Normalize Obsidian image syntax (including ![[...]]) to standard markdown image form.
  2. Render markdown to HTML.
  3. Upload inline images with uploadimg and replace <img src> with returned URLs.
  4. Upload cover with permanent material API and get thumbmediaid.
  5. Call draft/add.

Input

  • .md or .html
  • If input is markdown, script converts markdown first, then uploads inline images and publishes.

Examples

# Basic markdown draft publish
bun .agents/skills/baoyu-post-to-wechat/scripts/wechat-api.ts article.md

# Explicit cover and metadata
bun .agents/skills/baoyu-post-to-wechat/scripts/wechat-api.ts article.md \
  --cover Assets/Cover-Images/my-topic/cover.jpg \
  --title "标题" \
  --author "作者" \
  --summary "摘要"

# HTML input
bun .agents/skills/baoyu-post-to-wechat/scripts/wechat-api.ts article.html --cover Assets/cover.jpg

Notes

  • WeChat requires inline article images to come from uploadimg URLs.
  • Cover and inline image APIs are different and both are required for stable draft publishing.