Source profileQuality 85/100

JimLiu/baoyu-skills/skills/baoyu-post-to-wechat/SKILL.md

baoyu-post-to-wechat

Use it for engineering and operations tasks; the detail page covers purpose, installation, and practical steps.

Source repository stars
24,555
Declared platforms
0
Static risk flags
2
Last source update
2026-07-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

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.

Best for

  • Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/JimLiu/baoyu-skills --skill "skills/baoyu-post-to-wechat"
Safe inspection promptEditorial

Inspect the Agent Skill "baoyu-post-to-wechat" from https://github.com/JimLiu/baoyu-skills/blob/6b7a2e417500561a5ecdd0b168332f4142584617/skills/baoyu-post-to-wechat/SKILL.md at commit 6b7a2e417500561a5ecdd0b168332f4142584617. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Article Posting Workflow (文章)

    Check and load EXTEND.md (see "Preferences" above). If not found, complete first-time setup before any other questions. Resolve and cache for later steps: defaulttheme, defaultcolor, defaultauthor, needopencomment, onlyfanscancomment.

    Generate slug (first 2-4 meaningful words, kebab-case; translate Chinese to English for the slug).Save to post-to-wechat/YYYY-MM-DD/.md (create directory if needed).Continue as a markdown file.
  2. 02

    Step 0: Load Preferences

    Check and load EXTEND.md (see "Preferences" above). If not found, complete first-time setup before any other questions. Resolve and cache for later steps: defaulttheme, defaultcolor, defaultauthor, needopencomment, onlyfanscancomment.

    Check and load EXTEND.md (see "Preferences" above). If not found, complete first-time setup before any other questions. Resolve and cache for later steps: defaulttheme, defaultcolor, defaultauthor, needopencomment, only…
  3. 03

    Step 1: Determine Input Type

    1. Generate slug (first 2-4 meaningful words, kebab-case; translate Chinese to English for the slug). 2. Save to post-to-wechat/YYYY-MM-DD/.md (create directory if needed). 3. Continue as a markdown file.

    Generate slug (first 2-4 meaningful words, kebab-case; translate Chinese to English for the slug).Save to post-to-wechat/YYYY-MM-DD/.md (create directory if needed).Continue as a markdown file.
  4. 04

    Step 2: Select Publishing Method and Configure

    Ask method unless specified in EXTEND.md or CLI:

    Ask method unless specified in EXTEND.md or CLI:API selected + missing credentials → run guided setup per references/api-setup.md (writes to .baoyu-skills/.env).remote-api method: WeChat's "公众号设置 → IP 白名单" often limits API access to one or two fixed IPs. If your local machine's IP is not on that list but a cloud server's is, use remote-api: all markdown rendering, image process…
  5. 05

    Step 3: Resolve Theme/Color and Validate Metadata

    1. Theme: CLI --theme → EXTEND.md defaulttheme → default (first match wins; do NOT ask if resolved). 2. Color: CLI --color → EXTEND.md defaultcolor → omit (theme default applies). 3. Validate metadata (frontmatter for markdown, meta tags for HTML):

    Theme: CLI --theme → EXTEND.md defaulttheme → default (first match wins; do NOT ask if resolved).Color: CLI --color → EXTEND.md defaultcolor → omit (theme default applies).Validate metadata (frontmatter for markdown, meta tags for HTML):

Permission review

Static risk signals and limitations

Writes files

medium · line 143

The documentation asks the agent to create, modify, or delete local files.

Save to `post-to-wechat/YYYY-MM-DD/<slug>.md` (create directory if needed).

Network access

medium · line 233

The documentation includes network, browsing, or remote request actions.

→ Manage drafts: https://mp.weixin.qq.com (登录后进入「内容管理」→「草稿箱」)

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score85/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars24,555SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
JimLiu/baoyu-skills
Skill path
skills/baoyu-post-to-wechat/SKILL.md
Commit
6b7a2e417500561a5ecdd0b168332f4142584617
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Post to WeChat Official Account

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
  3. Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.

Language

Respond in the user's language. If they write in Chinese, reply in Chinese; if English, English. Keep technical tokens (paths, flags, field names) in English.

Script Directory

{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: prefer bun; else npx -y bun; else suggest brew install oven-sh/bun/bun.

ScriptPurpose
scripts/wechat-browser.tsImage-text posts (图文)
scripts/wechat-article.tsArticle posting via browser (文章)
scripts/wechat-api.tsArticle posting via API (文章)
scripts/md-to-wechat.tsMarkdown → WeChat-ready HTML with image placeholders
scripts/check-permissions.tsVerify environment & permissions

Preferences (EXTEND.md)

Check these paths in order; first hit wins:

PathScope
.baoyu-skills/baoyu-post-to-wechat/EXTEND.mdProject
${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-wechat/EXTEND.mdXDG
$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.mdUser home

Found → read, parse, apply. Not found → run first-time setup (references/config/first-time-setup.md) before anything else.

Minimum keys (case-insensitive, accept 1/0 or true/false):

KeyDefaultMapping
default_authoremptyFallback for author when CLI/frontmatter not provided
need_open_comment1articles[].need_open_comment in draft/add
only_fans_can_comment0articles[].only_fans_can_comment in draft/add

Recommended EXTEND.md:

default_theme: default
default_color: blue
default_publish_method: browser
default_author: 宝玉
need_open_comment: 1
only_fans_can_comment: 0
chrome_profile_path: /path/to/chrome/profile

# Remote API publishing (optional) — only set if WeChat's IP allowlist
# excludes your local machine. See "Remote API Method" below.
# remote_publish_host: server.example.com
# remote_publish_user: deploy
# remote_publish_port: 22
# remote_publish_identity_file: ~/.ssh/id_ed25519
# remote_publish_known_hosts_file: ~/.ssh/known_hosts
# remote_publish_strict_host_key_checking: accept-new
# remote_publish_connect_timeout: 10
# remote_publish_proxy_jump: bastion.example.com

Raw ssh / scp options are intentionally not supported; only the typed keys above are honored. Authentication is SSH key only (no passwords).

Theme options: default, grace, simple, modern. Color presets: blue, green, vermilion, yellow, purple, sky, rose, olive, black, gray, pink, red, orange (or hex).

Value priority: CLI args → frontmatter → EXTEND.md (account-level → global) → skill defaults.

Multi-Account Support

EXTEND.md supports an accounts: block for managing multiple Official Accounts. With 2+ entries, the workflow inserts a Step 0.5 to prompt for account selection (or auto-selects based on default: true or --account <alias>).

Full details — compatibility rules, per-account keys, credential resolution, per-account Chrome profiles, CLI usage — in references/multi-account.md.

Pre-flight Check (Optional)

Before first use, suggest the environment check (user can skip):

${BUN_X} {baseDir}/scripts/check-permissions.ts

Checks: Chrome, profile isolation, Bun, Accessibility, clipboard, paste keystroke, API credentials, Chrome conflicts.

Check failsFix
ChromeInstall Chrome or set WECHAT_BROWSER_CHROME_PATH
Profile dirShared profile at baoyu-skills/chrome-profile
Bun runtimebrew install oven-sh/bun/bun or npm install -g bun
Accessibility (macOS)System Settings → Privacy & Security → Accessibility → enable terminal app
Clipboard copyEnsure Swift/AppKit (macOS: xcode-select --install)
Paste keystroke (Linux)Install xdotool (X11) or ydotool (Wayland)
API credentialsFollow guided setup in Step 2, or set in .baoyu-skills/.env

Image-Text Posting (图文)

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

Details: references/image-text-posting.md.

Article Posting Workflow (文章)

- [ ] Step 0: Load preferences (EXTEND.md)
- [ ] Step 0.5: Resolve account (multi-account only — see references/multi-account.md)
- [ ] 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 (see "Preferences" above). If not found, complete first-time setup before any other questions. Resolve and cache for later steps: default_theme, default_color, default_author, need_open_comment, only_fans_can_comment.

Step 1: Determine Input Type

InputDetectionNext
HTML filePath ends .html, file existsSkip to Step 3
Markdown filePath ends .md, file existsStep 2
Plain textNot a file path, or file doesn't existSave to markdown, then Step 2

Plain-text handling:

  1. Generate slug (first 2-4 meaningful words, kebab-case; translate Chinese to English for the slug).
  2. Save to post-to-wechat/YYYY-MM-DD/<slug>.md (create directory if needed).
  3. Continue as a markdown file.

Step 2: Select Publishing Method and Configure

Ask method unless specified in EXTEND.md or CLI:

MethodSpeedRequires
api (Recommended)FastAPI credentials (local IP allowlisted)
browserSlowChrome + logged-in session
remote-apiFastAPI credentials + an SSH-reachable server whose IP is on the WeChat allowlist

API selected + missing credentials → run guided setup per references/api-setup.md (writes to .baoyu-skills/.env).

remote-api method: WeChat's "公众号设置 → IP 白名单" often limits API access to one or two fixed IPs. If your local machine's IP is not on that list but a cloud server's is, use remote-api: all markdown rendering, image processing, draft assembly, and HTML rewriting still happen locally, and only the outbound HTTPS calls to api.weixin.qq.com (token, uploadimg, add_material, draft/add) are tunneled through an SSH SOCKS5 dynamic port forward (ssh -N -D) so that WeChat sees the remote server as the source IP. No files are written to the remote host; AppSecret never leaves the local process. Requires only sshd and outbound network on the remote host — no Python, no agent process. See "Remote API Method" below.

Step 3: Resolve Theme/Color and Validate Metadata

  1. Theme: CLI --theme → EXTEND.md default_themedefault (first match wins; do NOT ask if resolved).
  2. Color: CLI --color → EXTEND.md default_color → omit (theme default applies).
  3. Validate metadata (frontmatter for markdown, meta tags for HTML):
FieldMissing →
TitleAsk, or press Enter to auto-generate from content
SummaryFrontmatter descriptionsummary → ask or auto-generate
AuthorCLI --author → frontmatter author → EXTEND.md default_author
Source URLCLI --source-url → frontmatter sourceUrl/contentSourceUrl/content_source_url

Auto-generation: title = first H1/H2 or first sentence; summary = first paragraph, truncated to 120 chars.

  1. Cover image (required for API article_type=news): CLI --cover → frontmatter (coverImage / featureImage / cover / image) → imgs/cover.png → first inline image → stop and request one if still missing.

Step 4: Publish

Important — never pre-convert markdown to HTML. Publishing scripts handle the conversion internally and the two methods render images differently: API renders <img> tags for upload, browser uses placeholders for paste-and-replace. Passing a pre-converted HTML breaks one or the other.

Markdown citation default: for markdown input, ordinary external links are converted to bottom citations by default. Use --no-cite only if the user explicitly wants to keep inline links. Existing HTML input is left as-is.

API method (accepts .md or .html):

${BUN_X} {baseDir}/scripts/wechat-api.ts <file> --theme <theme> [--color <color>] [--title <title>] [--summary <summary>] [--author <author>] [--cover <cover_path>] [--source-url <url>] [--no-cite]

Always pass --theme even if it's default. Only pass --color when explicitly set by the user or EXTEND.md.

Remote API method (same script, adds --remote):

${BUN_X} {baseDir}/scripts/wechat-api.ts <file> --theme <theme> --remote [--remote-host <host>] [--remote-user <user>] [--remote-port <port>] [--remote-identity-file <path>] [--remote-known-hosts-file <path>] [--remote-strict-host-key-checking yes|no|accept-new] [--remote-connect-timeout <s>] [--remote-proxy-jump <spec>]

Any --remote-* flag implies --remote. CLI values override account-level then global remote_publish_* keys from EXTEND.md. Setting default_publish_method: remote-api also enables remote mode without --remote.

draft/add payload rules:

  • Endpoint: POST https://api.weixin.qq.com/cgi-bin/draft/add?access_token=ACCESS_TOKEN
  • article_type: news (default) or newspic
  • For news, include thumb_media_id (cover required)
  • Always include need_open_comment (default 1) and only_fans_can_comment (default 0) in the request body, even if the CLI doesn't expose them
  • For news, optionally include content_source_url (original article URL, shown as "阅读原文" link, max 1KB). Provide via --source-url CLI flag or frontmatter sourceUrl/contentSourceUrl/content_source_url

Browser method (accepts --markdown or --html):

${BUN_X} {baseDir}/scripts/wechat-article.ts --markdown <markdown_file> --theme <theme> [--color <color>] [--no-cite]
${BUN_X} {baseDir}/scripts/wechat-article.ts --html <html_file>

Step 5: Completion Report

WeChat Publishing Complete!

Input: [type] - [path]
Method: [API | Browser]
Theme: [theme] [color if set]

Article:
• Title: [title]
• Summary: [summary]
• Images: [N] inline
• Comments: [open/closed], [fans-only/all]    ← API method only

Result:
✓ Draft saved to WeChat Official Account
• media_id: [media_id]                         ← API method only

Next Steps (API):
→ Manage drafts: https://mp.weixin.qq.com (登录后进入「内容管理」→「草稿箱」)

Files created:
[• post-to-wechat/YYYY-MM-DD/slug.md (if plain text input)]
[• slug.html (converted)]

Feature Comparison

FeatureImage-TextArticle (API)Article (Remote API)Article (Browser)
Plain text input
HTML input
Markdown inputTitle/content
Multiple images✓ (up to 9)✓ (inline)✓ (inline)✓ (inline)
Themes
Auto-generate metadata
Default cover fallback (imgs/cover.png)
Comment control
Requires Chrome
Requires API credentials
Requires SSH-reachable server with allowlisted IP
SpeedMediumFastFastSlow

Troubleshooting

IssueFix
Missing API credentialsFollow guided setup in Step 2
Access token errorVerify credentials valid and not expired
Not logged in (browser)First run opens browser — scan QR to log in. Set TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID to receive the QR image via Telegram
Chrome not foundSet WECHAT_BROWSER_CHROME_PATH
Title/summary missingUse auto-generation or provide manually
No cover imageAdd frontmatter cover or place imgs/cover.png in article directory
Wrong comment defaultsCheck need_open_comment / only_fans_can_comment in EXTEND.md
Paste failsCheck system clipboard permissions
Remote publish host is requiredSet --remote-host or remote_publish_host in EXTEND.md
SOCKS proxy on 127.0.0.1:… not readySSH could not start the tunnel — check key, host, StrictHostKeyChecking, or use --remote-connect-timeout
ssh exited early during remote publishVerify the user can ssh non-interactively to the server; raise --remote-connect-timeout if the link is slow
Remote API call returns errcode 40164 (invalid IP)The remote server's egress IP is not on WeChat's allowlist; add it in 公众号设置 → IP 白名单

References

FileContent
references/image-text-posting.mdImage-text parameters, auto-compression
references/article-posting.mdArticle themes, image handling
references/multi-account.mdMulti-account compatibility, credentials, Chrome profiles, CLI
references/api-setup.mdGuided credential setup
references/config/first-time-setup.mdFirst-time EXTEND.md setup

Extension Support

Custom configurations via EXTEND.md. See "Preferences" for paths and supported options.

Alternatives

Compare before choosing

Computed 10023,781

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1004,922

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 9929,558

HKUDS/Vibe-Trading

strategy-generate

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

Computed 9832,606

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.