wechat-official-draftlisted
Install: claude install-skill yinjialu/ai-frontier-daily
# WeChat Official Draft
## Overview
Use this skill to turn Markdown articles into WeChat Official Account drafts with a simple, stable layout. The default formatter favors compatibility over visual complexity: inline styles, readable headings, clean paragraphs, blockquotes, code blocks, local image upload, and a cover image.
The bundled script uses official WeChat APIs directly:
- `cgi-bin/token`
- `cgi-bin/media/uploadimg` for inline article images
- `cgi-bin/material/add_material` for the cover
- `cgi-bin/draft/add` for draft creation
## Credentials
Default config source:
```text
~/.config/wechat-official-draft/config.yaml
```
Read only:
```yaml
wechat:
appid: ...
secret: ...
```
Do not print or echo `secret`. It is acceptable to mention that credentials are present or missing.
Alternative credentials can be passed through environment variables:
```bash
WECHAT_APPID=...
WECHAT_SECRET=...
```
Initialize config:
```bash
node "$HOME/.codex/skills/wechat-official-draft/scripts/push_draft.mjs" \
init \
--appid "your_wechat_appid" \
--secret "your_wechat_appsecret"
```
The init command creates `~/.config/wechat-official-draft/config.yaml` with file mode `600`.
## Quick Start
Create a draft:
```bash
node "$HOME/.codex/skills/wechat-official-draft/scripts/push_draft.mjs" \
--file article.md \
--title "文章标题" \
--digest "128 字以内摘要" \
--cover cover.png
```
Generate local preview HTML without calling WeChat:
```bash
node "$HOME/.codex/skills/wechat