Create draft-only WeChat Official Account sticker/image-message posts using the official API.
scripts/publish_sticker.py.newspic draft in the WeChat draft box.Keep this skill limited to draft creation.
Do not modify the existing daily article publishing workflow unless explicitly requested.
Require absolute local image paths.
Support up to 20 images; the first image becomes the cover image.
Send JSON request bodies explicitly as UTF-8 ( application/json; charset=utf-8).
The script reads credentials from environment variables:
WECHAT_APP_IDWECHAT_APP_SECRETIt can also load a local wechat.env file placed in the skill root.
Use wechat.env.example as the starting template.
If packaging/publishing this skill publicly, do not include any real secrets or local credential files.
bash
python3 scripts/publish_sticker.py \
--image /abs/path/to/image.jpg \
--title "标题 / Title" \
--text "配文 / Caption"
bash
python3 scripts/publish_sticker.py \
--image /abs/1.jpg \
--image /abs/2.jpg \
--title "多图贴图测试" \
--text "这是一个多图图片消息草稿。"
Each run writes a JSON record to outputs/ containing:
Use those files for debugging and verification.
scripts/publish_sticker.py — main deterministic implementationreferences/api-notes.md — concise implementation notes and known behaviorREADME.md — bilingual human-facing overview for repository/ClawHub readersLICENSE — MIT licenseRead references/api-notes.md if you need:
add_material + draft/add)news and newspic