baoyu-post-to-wechat▌
jimliu/baoyu-skills · updated Apr 9, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Publish articles and image-text posts to WeChat Official Accounts via API or browser automation.
- ›Supports three input formats: plain text, markdown, and HTML, with automatic metadata generation (title, summary, cover image)
- ›Two publishing methods: fast API-based drafts (requires credentials) and browser-based posting (requires Chrome login)
- ›Multi-account management with per-account credentials, Chrome profiles, and publishing preferences via EXTEND.md configuration
- ›Markdown articl
Post to WeChat Official Account
Language
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.
Script Directory
Agent Execution: Determine this SKILL.md directory as {baseDir}, then use {baseDir}/scripts/<name>.ts. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun.
| 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/md-to-wechat.ts |
Markdown → WeChat-ready HTML with image placeholders |
scripts/check-permissions.ts |
Verify environment & permissions |
Preferences (EXTEND.md)
Check EXTEND.md existence (priority order):
# macOS, Linux, WSL, Git Bash
test -f .baoyu-skills/baoyu-post-to-wechat/EXTEND.md && echo "project"
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && echo "xdg"
test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && echo "user"
# PowerShell (Windows)
if (Test-Path .baoyu-skills/baoyu-post-to-wechat/EXTEND.md) { "project" }
$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { "$HOME/.config" }
if (Test-Path "$xdg/baoyu-skills/baoyu-post-to-wechat/EXTEND.md") { "xdg" }
if (Test-Path "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md") { "user" }
┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-post-to-wechat/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-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) → Save → Continue │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports: Default theme | Default color | 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
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_color: blue
default_publish_method: api
default_author: 宝玉
need_open_comment: 1
only_fans_can_comment: 0
chrome_profile_path: /path/to/chrome/profile
Theme options: default, grace, simple, modern
Color presets: blue, green, vermilion, yellow, purple, sky, rose, olive, black, gray, pink, red, orange (or hex value)
Value priority:
- CLI arguments
- Frontmatter
- EXTEND.md (account-level → global-level)
- Skill defaults
Multi-Account Support
EXTEND.md supports managing multiple WeChat Official Accounts. When accounts: block is present, each account can have its own credentials, Chrome profile, and default settings.
Compatibility rules:
| Condition | Mode | Behavior |
|---|---|---|
No accounts block |
Single-account | Current behavior, unchanged |
accounts with 1 entry |
Single-account | Auto-select, no prompt |
accounts with 2+ entries |
Multi-account | Prompt to select before publishing |
accounts with default: true |
Multi-account | Pre-select default, user can switch |
Multi-account EXTEND.md example:
default_theme: default
default_color: blue
accounts:
- name: 宝玉的技术分享
alias: baoyu
default: true
default_publish_method: api
default_author: 宝玉
need_open_comment: 1
only_fans_can_comment: 0
app_id: your_wechat_app_id
app_secret: your_wechat_app_secret
- name: AI工具集
alias: ai-tools
default_publish_method: browser
default_author: AI工具集
need_open_comment: 1
only_fans_can_comment: 0
Per-account keys (can be set per-account or globally as fallback):
default_publish_method, default_author, need_open_comment, only_fans_can_comment, app_id, app_secret, chrome_profile_path
Global-only keys (always shared across accounts):
default_theme, default_color
Account Selection (Step 0.5)
Insert between Step 0 and Step 1 in the Article Posting Workflow:
if no accounts block:
→ single-account mode (current behavior)
elif accounts.length == 1:
→ auto-select the only account
elif --account <alias> CLI arg:
→ select matching account
elif one account has default: true:
→ pre-select, show: "Using account: <name> (--account to switch)"
else:
→ prompt user:
"Multiple WeChat accounts configured:
1) <name1> (<alias1>)
2) <name2> (<alias2>)
Select account [1-N]:"
Credential Resolution (API Method)
For a selected account with alias {alias}:
app_id/app_secretinline in EXTEND.md account block- Env var
WECHAT_{ALIAS}_APP_ID/WECHAT_{ALIAS}_APP_SECRET(alias uppercased, hyphens → underscores) .baoyu-skills/.envwith prefixed keyWECHAT_{ALIAS}_APP_ID~/.baoyu-skills/.envwith prefixed key- Fallback to unprefixed
WECHAT_APP_ID/WECHAT_APP_SECRET
.env multi-account example:
# Account: baoyu
WECHAT_BAOYU_APP_ID=your_wechat_app_id
WECHAT_BAOYU_APP_SECRET=your_wechat_app_secret
# Account: ai-tools
WECHAT_AI_TOOLS_APP_ID=your_ai_tools_wechat_app_id
WECHAT_AI_TOOLS_APP_SECRET=your_ai_tools_wechat_app_secret
Chrome Profile (Browser Method)
Each account uses an isolated Chrome profile for independent login sessions:
| Source | Path |
|---|---|
Account chrome_profile_path in EXTEND.md |
Use as-is |
| Auto-generated from alias | {shared_profile_parent}/wechat-{alias}/ |
| Single-account fallback | Shared default profile (current behavior) |
CLI --account Argument
All publishing scripts accept --account <alias>:
${BUN_X} {baseDir}/scripts/wechat-api.ts <file> --theme default --account ai-tools
${BUN_X} {baseDir}/scripts/wechat-article.ts --markdown <file> --theme default --account baoyu
${BUN_X} {baseDir}/scripts/wechat-browser.ts --markdown <file> --images ./photos/ --account baoyu
Pre-flight Check (Optional)
Before first use, suggest running the environment check. User can skip if they prefer.
${BUN_X} {baseDir}/scripts/check-permissions.ts
Checks: 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 | Shared profile at baoyu-skills/chrome-profile (see CLAUDE.md Chrome Profile section) |
| Bun runtime | brew install oven-sh/bun/bun (macOS) or npm install -g bun |
| 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 2, or manually set in .baoyu-skills/.env |
Image-Text Posting (图文)
For short posts with multiple images (up to 9):
${BUN_X} {baseDir}/scripts/wechat-browser.ts --markdown article.md --images ./images/
${BUN_X} {baseDir}/scripts/wechat-browser.ts --title "标题" --content "内容" --image img.png --submit
See references/image-text-posting.md for details.
Article Posting Workflow (文章)
Copy this checklist and check off items as you complete them:
Publishing Progress:
- [ ] Step 0: Load preferences (EXTEND.md)
- [ ] Step 0.5: Resolve account (multi-account only)
- [ ] Step 1: Determine input type
- [ ] Step 2: Select method and configure credentials
- [ ] Step 3: Resolve theme/color and validate metadata
- [ ] Step 4: Publish to WeChat
- [ ] Step 5: Report completion
Step 0: Load Preferences
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:
default_theme(defaultdefault)default_color(omit if not set — theme default applies)default_authorneed_open_comment(default1)only_fans_can_comment(default0)
Step 1: Determine Input Type
| Input Type | Detection | Action |
|---|---|---|
| HTML file | Path ends with .html, file exists |
Skip to Step 3 |
| Markdown file | Path ends with .md, file exists |
Continue to Step 2 |
| Plain text | Not a file path, or file doesn't exist | Save to markdown, continue to Step 2 |
Plain Text Handling:
- Generate slug from content (first 2-4 meaningful words, kebab-case)
- Create directory and save file:
mkdir -p "$(pwd)/post-to-wechat/$(date +%Y-%m-%d)"
# Save content to: post-to-wechat/yyyy-MM-dd/[slug].md
- Continue processing as markdown file
Slug Examples:
- "Understanding AI Models" →
understanding-ai-models - "人工智能的未来" →
ai-future(translate to English for slug)
Step 2: Select Publishing Method and Configure
Ask publishing method (unless specified in EXTEND.md or CLI):
| Method | Speed | Requirements |
|---|---|---|
api (Recommended) |
Fast | API credentials |
browser |
Slow | Chrome, login session |
If API Selected - Check Credentials:
# macOS, Linux, WSL, Git Bash
test -f .baoyu-skills/.env && grep -q "WECHAT_APP_ID" .baoyu-skills/.env && echo "project"
test -f "$HOME/.baoyu-skills/.env" && grep -q "WECHAT_APP_ID" "$HOME/.baoyu-skills/.env" && echo "user"
# PowerShell (Windows)
if ((Test-Path .baoyu-skills/.env) -and (Select-String -Quiet -Pattern How to use baoyu-post-to-wechat on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add baoyu-post-to-wechat
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches baoyu-post-to-wechat from GitHub repository jimliu/baoyu-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate baoyu-post-to-wechat. Access the skill through slash commands (e.g., /baoyu-post-to-wechat) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.8★★★★★40 reviews- ★★★★★Zaid Zhang· Dec 12, 2024
Solid pick for teams standardizing on skills: baoyu-post-to-wechat is focused, and the summary matches what you get after install.
- ★★★★★Tariq Park· Dec 8, 2024
We added baoyu-post-to-wechat from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Tariq Sanchez· Nov 27, 2024
baoyu-post-to-wechat fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Aditi Chen· Nov 27, 2024
Registry listing for baoyu-post-to-wechat matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Rahul Santra· Nov 11, 2024
Useful defaults in baoyu-post-to-wechat — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Aditi Diallo· Nov 3, 2024
I recommend baoyu-post-to-wechat for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Fatima Gonzalez· Oct 22, 2024
Keeps context tight: baoyu-post-to-wechat is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Isabella Wang· Oct 18, 2024
baoyu-post-to-wechat has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Liam Sethi· Oct 18, 2024
Useful defaults in baoyu-post-to-wechat — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Pratham Ware· Oct 2, 2024
Registry listing for baoyu-post-to-wechat matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 40