Mmcp.market

baoyu-post-to-wechat skill

by anbeime·anbeime/skill·7.3k stars

自媒体创作者与运营专员在需要将 Markdown 或 HTML 内容发布至微信公众号时,一键通过 API 或浏览器自动化完成文章与图文的排版及发布,彻底告别繁琐的手动排版与多步上传操作,大幅提升公众号日常发文与运营效率。

A100/100content scan

Is the baoyu-post-to-wechat skill safe?

Clean: nothing in its files matched our rules. We read 29 files in the folder on 2026-09-28.

No findings.

Install the baoyu-post-to-wechat skill

A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.

git clone --depth 1 https://github.com/anbeime/skill.git /tmp/skill
mkdir -p ~/.claude/skills
cp -r /tmp/skill/skills/content-creation-publisher/baoyu-post-to-wechat ~/.claude/skills/baoyu-post-to-wechat
available in every project

In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub

The instructions your agent would load

SKILL.md as published, without the frontmatter. Read it on GitHub

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 SKILLDIR, then use ${SKILLDIR}/scripts/.ts.

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

# Check project-level first
test -f .baoyu-skills/baoyu-post-to-wechat/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && echo "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 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):

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

Image-Text Posting (图文)

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 --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 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

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_author
  • needopencomment (default 1)
  • onlyfanscan_comment (default 0)

Step 1: Determine Input Type

Plain Text Handling:

  1. Generate slug from content (first 2-4 meaningful words, kebab-case)
  2. 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
  1. Continue processing as markdown file

Slug Examples:

  • "Understanding AI Models" → understanding-ai-models
  • "人工智能的未来" → ai-future (translate to English for slug)

Step 2: Check Markdown-to-HTML Skill

Skip if: Input is .html file

Skill Discovery:

# Check if baoyu-markdown-to-html exists
test -f skills/baoyu-markdown-to-html/SKILL.md && echo "found"

When Not Found:

No markdown-to-html skill found.

Suggested installation:
https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-markdown-to-html/SKILL.md

Options:
A) Cancel - install the skill first
B) Continue - provide HTML file manually

Step 3: Convert Markdown to HTML

Skip if: Input is .html file

  1. Ask theme preference (unless specified in EXTEND.md or CLI):
  1. Execute conversion (using the discovered skill):
npx -y bun ${MD_TO_HTML_SKILL_DIR}/scripts/main.ts <markdown_file> --theme <theme>
  1. Parse JSON output to get: htmlPath, title, author, summary, contentImages

Step 4: Validate Metadata

Check extracted metadata from Step 3 (or HTML meta tags if direct HTML input).

Auto-Generation Logic:

  • Title: First H1/H2 heading, or first sentence
  • Summary: First paragraph, truncated to 120 characters

Cover Image Check (required for article_type=news):

  1. Use CLI --cover if provided.
  2. Else use frontmatter (featureImage, coverImage, cover, image).
  3. Else check article directory default path: imgs/cover.png.
  4. Else fallback to first inline content image.
  5. If still missing, stop and request a cover image before publishing.

Step 5: Select Publishing Method and Configure

Ask publishing method (unless specified in EXTEND.md or CLI):

If API Selected - Check Credentials:

# Check project-level
test -f .baoyu-skills/.env && grep -q "WECHAT_APP_ID" .baoyu-skills/.env && echo "project"

# Check user-level
test -f "$HOME/.baoyu-skills/.env" && grep -q "WECHAT_APP_ID" "$HOME/.baoyu-skills/.env" && echo "user"

If Credentials Missing - Guide Setup:

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)

More skills from anbeime/skill

  • APDF Processing Pro综合办公文员与软件开发工程师当需要批量处理PDF表单、提取表格或进行OCR识别时,使用内置脚本一键完成自动化提取与数据校验,彻底告别繁琐的手动录入,让复杂文档工作流高效、稳健落地。
  • Aagent-team产品经理与项目管理专家在应对复杂项目时,使用此技能可动态组建包含“执行、指挥、评审”的专属AI团队。实时查看多智能体辩论与决策全过程,共享统一上下文记忆,一键完成从会议决策到系统构建的全流程高效协同!
  • Aagentkit-multimedia-shopping电商运营与内容创作者在需要制作带货短视频时,用此技能一键生成9:16竖屏数字人成片。自动编排AI绘画、语音合成与视频生成,快速产出“小省导购员”专属形象与专业配音,让多模态视频制作省时省力。
  • Aantinet-doc-parse软件开发工程师与数据科学家在构建RAG系统时,当需处理PDF/Word/Excel等多格式复杂文档,用此技能可自动触发三级解析降级,一键输出高置信度结构化Markdown与元数据,免去繁琐清洗,直接夯实企业知识库数据底座!
  • Aantinet-four-color-cards财务和投资分析师、律师助理与法律助手在撰写金融研报或分析法律文档时,必用此技能!基于解析文档一键生成事实蓝卡、解释绿卡、风险黄卡与行动红卡。自动完成深度剖析与风险排查,产出100%可溯源的结构化四色报告,让复杂分析高效且严谨。
  • Aantinet-provenance软件开发工程师与信息安全分析师在构建多智能体系统时,当需全链路可观测与安全审计,请用此技能。它自动收集操作日志,生成可追溯证据链与向量索引,开箱即用实现系统审计与精准回放,让Agent运行安全透明。
  • Aantinet-security-scan信息安全分析师与软件开发工程师在搭建文档处理流水线时,当需要拦截违规文件或外部URL,请挂载此技能作为强制前置安检,自动输出 pass/reject 判定与详细合规扫描报告,一键守住零信任安全底线。
  • AarchifyCreate polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, optional trace motion, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements or pasted Mermaid flowchart, sequenceDiagram, and stateDiagram input; inspect repository evidence when the diagram must reflect real code. Use when the user asks to visualize system architecture, infrastructure, cloud/security/network topology, technical workflows, API call sequences, request lifecycles, data pipelines, ETL/ELT, data lineage, state machines, or to convert/beautify Mermaid.
  • Aarticle-illustrator内容创作者与自媒体创作者在撰写长文缺乏视觉辅助时,当需要给文章配图或生成插图请使用。自动分析文章结构,精准识别位置并生成插画插入段落,将抽象概念具象化。一键完成智能图文排版,省去手动找图时间,大幅提升阅读体验!
  • Aarticle-illustrator内容创作者和自媒体创作者在撰写长文时,当需要“给文章配图”或“添加插图”时使用。自动分析文章结构,精准识别需要视觉辅助的位置,生成并插入契合语境的插画,将抽象概念具象化,一键完成高质量图文排版,大幅提升阅读体验。
  • Aatutun-xhs-cover阿囤囤风格小红书封面提示词生成。用于AI工具、效率方法、产品测评、教程部署、个人经验、播客推荐、职场认知类内容的爆款竖版封面设计。特点是真人出镜、超大柔和浅黄(#FDFFA7)/白色中文标题、粗黑描边、人物抠图描边、绿色勾选清单、emoji贴纸、箭头标注、高对比高密度构图。关键词:小红书封面、爆款封面、阿囤囤风格、AI教程封面、产品测评封面、封面提示词。
  • Abaoyu-format-markdown技术写作员与内容创作者在处理纯文本或 Markdown 稿件时,若需优化文章结构、添加 frontmatter 或自动修正中英文排版间距,使用此技能可一键生成专业美观的 {filename}-formatted.md 文件,让文档排版更完美。

All agent skills → · MCP servers