release-skills
Universal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic…
Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".
$ npx -y skills add freestylefly/canghe-skills --skill canghe-post-to-wechat --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/canghe-post-to-wechatContext preview
The summary Claude sees to decide when to auto-load this skill.
Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".
name: canghe-post-to-wechat description: Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".
**Match user's language**: Respond in the same language the user uses. If user writes in Chinese, respond in Chinese. If user writes in English, respond in English.
**Agent Execution**: Determine this SKILL.md directory as `SKILL_DIR`, then use `${SKILL_DIR}/scripts/<name>.ts`.
| Script | Purpose | |--------|---------| | `scripts/wechat-browser.ts` | Image-text posts (图文) | | `scripts/wechat-article.ts` | Article posting via browser (文章) | | `scripts/wechat-api.ts` | Article posting via API (文章) | | `scripts/check-permissions.ts` | Verify environment & permissions |
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first test -f .canghe-skills/canghe-post-to-wechat/EXTEND.md && echo "project" # Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.canghe-skills/canghe-post-to-wechat/EXTEND.md" && echo "user"
┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .canghe-skills/canghe-post-to-wechat/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.canghe-skills/canghe-post-to-wechat/EXTEND.md │ User home │ └────────────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Run first-time setup ([references/config/first-time-setup.md](references/config/first-time-setup.md)) → Save → Continue │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
**EXTEND.md Supports**: Default theme | Default publishing method (api/browser) | Default author | Default open-comment switch | Default fans-only-comment switch | Chrome profile path
First-time setup: [references/config/first-time-setup.md](references/config/first-time-setup.md)
**Minimum supported keys** (case-insensitive, accept `1/0` or `true/false`):
| Key | Default | Mapping | |-----|---------|---------| | `default_author` | empty | Fallback for `author` when CLI/frontmatter not provided | | `need_open_comment` | `1` | `articles[].need_open_comment` in `draft/add` request | | `only_fans_can_comment` | `0` | `articles[].only_fans_can_comment` in `draft/add` request |
**Recommended EXTEND.md example**:
default_theme: default default_publish_method: api default_author: 苍何 need_open_comment: 1 only_fans_can_comment: 0 chrome_profile_path: /path/to/chrome/profile
**Value priority**: 1. CLI arguments 2. Frontmatter 3. EXTEND.md 4. Skill defaults
Before first use, suggest running the environment check. User can skip if they prefer.
npx -y bun ${SKILL_DIR}/scripts/check-permissions.tsChecks: Chrome, profile isolation, Bun, Accessibility, clipboard, paste keystroke, API credentials, Chrome conflicts.
**If any check fails**, provide fix guidance per item:
| Check | Fix | |-------|-----| | Chrome | Install Chrome or set `WECHAT_BROWSER_CHROME_PATH` env var | | Profile dir | Ensure `~/.local/share/wechat-browser-profile` is writable | | Bun runtime | `curl -fsSL https://bun.sh/install \| bash` | | Accessibility (macOS) | System Settings → Privacy & Security → Accessibility → enable terminal app | | Clipboard copy | Ensure Swift/AppKit available (macOS Xcode CLI tools: `xcode-select --install`) | | Paste keystroke (macOS) | Same as Accessibility fix above | | Paste keystroke (Linux) | Install `xdotool` (X11) or `ydotool` (Wayland) | | API credentials | Follow guided setup in Step 5, or manually set in `.canghe-skills/.env` |
For short posts with multiple images (up to 9):
npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --markdown article.md --images ./images/
npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --title "标题" --content "内容" --image img.png --submitSee [references/image-text-posting.md](references/image-text-posting.md) for details.
Copy this checklist and check off items as you complete them:
Publishing Progress: - [ ] Step 0: Load preferences (EXTEND.md) - [ ] Step 1: Determine input type - [ ] Step 2: Check markdown-to-html skill - [ ] Step 3: Convert to HTML - [ ] Step 4: Validate metadata (title, summary, cover) - [ ] Step 5: Select method and configure credentials - [ ] Step 6: Publish to WeChat - [ ] Step 7: Report completion
Check and load EXTEND.md settings (see Preferences section above).
**CRITICAL**: If not found, complete first-time setup BEFORE any other steps or questions.
Resolve and store these defaults for later steps:
| Input Type | Detection | Action | |------------|-----------|--------| | HTML file | Path ends with `.html`, file exists | Skip to Step 4 | | Markdown file | Path ends with `.md`, file exists | Continue to Step 2 | | Plain text | N
Skills shared by Canghe for improving daily work efficiency with Claude Code.
Universal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic…
Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style two-dimension…
Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts…
Compresses images to WebP (default) or PNG with automatic tool selection. Use when user asks to "compress image", "optimize…
Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 9 color palettes and 6…
Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts,…