
Baoyu Post To Wechat
Publish content posts to WeChat (official account) automatically.
Install
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-post-to-wechatWhat is this skill?
- WeChat publishing
- Content distribution
- Auto-posting
Adoption & trust: 28.7k installs on skills.sh; 20.9k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Agent Browservercel-labs/agent-browser
Lark Imlarksuite/cli
Lark Calendarlarksuite/cli
Lark Sheetslarksuite/cli
Lark Vclarksuite/cli
Lark Contactlarksuite/cli
Journey fit
Common Questions / FAQ
Is Baoyu Post To Wechat safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Baoyu Post To Wechat
# API Credential Setup Guided setup when `WECHAT_APP_ID` / `WECHAT_APP_SECRET` are missing. Invoked by Step 2 of the article-posting workflow. ## Detection Look for the credentials in this order: 1. Env vars `WECHAT_APP_ID` / `WECHAT_APP_SECRET` 2. `<cwd>/.baoyu-skills/.env` with `WECHAT_APP_ID=...` 3. `$HOME/.baoyu-skills/.env` with `WECHAT_APP_ID=...` If none are present, run the guided setup below. ## Guided Setup Show this message to the user and ask where to save: ``` WeChat API credentials not found. To obtain credentials: 1. Visit https://mp.weixin.qq.com 2. Go to: 开发 → 基本配置 3. Copy AppID and AppSecret Where to save? A) Project-level: .baoyu-skills/.env (this project only) B) User-level: ~/.baoyu-skills/.env (all projects) ``` After they choose a location, collect the values (prefer a user-input tool, fall back to a numbered prompt per the User Input Tools rule in SKILL.md) and append: ``` WECHAT_APP_ID=<user_input> WECHAT_APP_SECRET=<user_input> ``` ## Multi-Account Variant If the user has multiple accounts configured (`accounts:` block in EXTEND.md), use prefixed keys instead — see `multi-account.md` → "Credential Resolution". # Article Posting (文章发表) Post markdown articles to WeChat Official Account with full formatting support. ## Usage ```bash # Post markdown article ${BUN_X} ./scripts/wechat-article.ts --markdown article.md # With theme ${BUN_X} ./scripts/wechat-article.ts --markdown article.md --theme grace # Disable bottom citations for ordinary external links ${BUN_X} ./scripts/wechat-article.ts --markdown article.md --no-cite # With explicit options ${BUN_X} ./scripts/wechat-article.ts --markdown article.md --author "作者名" --summary "摘要" ``` ## Parameters | Parameter | Description | |-----------|-------------| | `--markdown <path>` | Markdown file to convert and post | | `--theme <name>` | Theme: default, grace, simple, modern | | `--no-cite` | Keep ordinary external links inline instead of converting them to bottom citations | | `--title <text>` | Override title (auto-extracted from markdown) | | `--author <name>` | Author name | | `--summary <text>` | Article summary | | `--html <path>` | Pre-rendered HTML file (alternative to markdown) | | `--profile <dir>` | Chrome profile directory | ## Markdown Format ```markdown --- title: Article Title author: Author Name --- # Title (becomes article title) Regular paragraph with **bold** and *italic*. ## Section Header  - List item 1 - List item 2 > Blockquote text [Link text](https://example.com) ``` Markdown mode converts ordinary external links into bottom citations by default for WeChat-friendly output. Use `--no-cite` to disable that behavior. ## Image Handling 1. **Parse**: Images in markdown are replaced with `WECHATIMGPH_N` 2. **Render**: HTML is generated with placeholders in text 3. **Paste**: HTML content is pasted into WeChat editor 4. **Replace**: For each placeholder: - Find and select the placeholder text - Scroll into view - Press Backspace to delete the placeholder - Paste the image from clipboard ## Scripts | Script | Purpose | |--------|---------| | `wechat-article.ts` | Main article publishing script | | `md-to-wechat.ts` | Markdown to HTML with placeholders | | `md/render.ts` | Markdown rendering with themes | ## Example Session ``` User: /post-to-wechat --markdown ./article.md Claude: 1. Parses markdown, finds 5 images 2. Generates HTML with placeholders 3. Opens Chrome, navigates to WeChat editor 4. Pastes HTML content 5. For each image: - Selects WECHATIMGPH_1 - Scrolls into view - Presses Backspace to delete - Pastes image 6. Reports: "Article composed with 5 images." ``` --- name: first-time-setup description: First-time setup flow for baoyu-post-to-wechat preferences --- # First-Time Setup ## Overview When no EXTEND.md is found, guide user through preference setup. **BLOCKING OPERATION**: This setup MUST complete before ANY other workflow s