Skip to content
AI & Agents
Skill

/baoyu-post-to-wechat

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

BOOST
From plugin
anbeime-skill
7.4k78 skills
Install
$ npx -y skills add anbeime/skill --skill baoyu-post-to-wechat --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/baoyu-post-to-wechat

Context preview

The summary Claude sees to decide when to auto-load this skill.

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

SKILL.md

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

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 `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 (文章) |

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

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](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`
  • `need_open_comment` (default `1`)
  • `only_fans_can_comment` (default `0`)

Step 1: Determine Input Type

| 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 | Not a file path, or file doesn't exist | Save to markdown, then Step 2 |

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

3. 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"

| Result | Action | |--------|--------| | Found | Read its SKILL.md, continue to Step 3 | | Multiple skills | AskUserQuestion to choose | | Not found | Show installation suggestion |

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

Read more
Ships withanbeime-skill

收录最全、更新最快的AI Agent技能库,涵盖文档处理、内容创作、编程开发、机器学习、自动化工作流等多个领域的精选技能包。 🧠 知易智能基座 :20+模型自由切换,知识永远留在你手里 —一个对话框调度所有模型,240+技能即插即用,四色卡片让AI真正记住你。 👉 申请体验

Get the whole plugin
Stats
7,502
Stars
683
Forks
Active
Maintenance
Python
Language
6h ago
Last commit
8mo ago
Created
3h ago
Added

Repo: anbeime/skill

Other skills on anbeime-skill.

agent-team
Skill

agent-team

产品经理与项目管理专家在应对复杂项目时,使用此技能可动态组建包含“执行、指挥、评审”的专属AI团队。实时查看多智能体辩论与决策全过程,共享统一上下文记忆,一键完成从会议决策到系统构建的全流…

agentkit-multimedia-shopping
Skill

agentkit-multimedia-sh…

电商运营与内容创作者在需要制作带货短视频时,用此技能一键生成9:16竖屏数字人成片。自动编排AI绘画、语音合成与视频生成,快速产出“小省导购员”专属形象与专业配音,让多模态视频制作省时省力…