wechat-studio

chouheiwa/wechat-studio · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/chouheiwa/wechat-studio --skill wechat-studio
0 commentsdiscussion
summary

微信公众号内容创作全流程工具:Markdown 排版、写作助手、AI 去痕、图片上传、草稿发布。

skill.md

WeChat Studio

微信公众号内容创作全流程工具:Markdown 排版、写作助手、AI 去痕、图片上传、草稿发布。

路径解析(重要)

本 skill 的脚本位于 SKILL.md 所在目录下。执行任何脚本之前,必须先确定本文件的实际路径,并以此推导脚本目录。

规则: 以下文档中所有 $SKILL_DIR 占位符应替换为本 SKILL.md 文件所在的目录路径。

例如:如果本文件位于 /Users/xxx/Desktop/AI/skills/wechat-studio/SKILL.md,则 $SKILL_DIR = /Users/xxx/Desktop/AI/skills/wechat-studio

SKILL_DIR="<本 SKILL.md 文件所在目录的绝对路径>"

功能一:Markdown → 微信 HTML

convert.mjs 直接将 Markdown 渲染为带主题样式的微信公众号 HTML,无需 AI 参与。

# 输出到文件
node "$SKILL_DIR/scripts/convert.mjs" -i article.md -t autumn-warm -o article.html

# 输出到 stdout
node "$SKILL_DIR/scripts/convert.mjs" -i article.md -t spring-fresh

图片会自动替换为 <!-- IMG:0 --><!-- IMG:1 --> 占位符,按 Markdown 中出现顺序编号。

可用主题:

主题 说明
autumn-warm 秋日暖光,橙色调,温暖治愈(默认)
spring-fresh 春日清新,绿色调,清爽明快
ocean-calm 海洋静谧,蓝色调,沉稳专业
custom 自定义主题,使用 AI 提示词渲染(type: ai

功能二:风格写作(Dan Koe)

触发条件: 用户提到"用 Dan Koe 风格写"、"帮我写一篇文章"、"写一篇关于…的文章"

读取 $SKILL_DIR/references/dan-koe-writing.md 获取完整写作规范,按其中的结构和语气要求生成文章。更详细的模板和金句库见 $SKILL_DIR/writers/dan-koe.yaml


功能三:图片上传

上传本地图片

# 单张
node "$SKILL_DIR/scripts/upload-image.mjs" /path/to/image.jpg

# 批量(JSON 文件,内容为路径字符串数组)
node "$SKILL_DIR/scripts/upload-image.mjs" --json images.json

# 批量并将结果写入文件(供 replace-images.mjs / publish.mjs 使用)
node "$SKILL_DIR/scripts/upload-image.mjs" --json images.json --output upload-result.json

# 强制重新上传(跳过缓存)
node "$SKILL_DIR/scripts/upload-image.mjs" --json images.json --no-cache

batch JSON 格式(images.json):

["images/photo1.jpg", "images/photo2.png", "images/photo3.webp"]

选项:

  • --json <file>:从 JSON 文件读取路径列表进行批量上传
  • --output <file>:将批量上传结果写入 JSON 文件(可供后续 replace-images.mjs 使用)
  • --no-cache:跳过缓存,强制重新上传

单张输出:

{ "success": true, "media_id": "xxx", "wechat_url": "https://mmbiz..." }

批量输出(JSON 数组):

[
  { "file": "img1.jpg", "success": true, "media_id": "xxx", "wechat_url": "https://mmbiz..." },
  { "file": "img2.png", "success": true, "media_id": "yyy", "wechat_url": "https://mmbiz..." }
]

下载在线图片并上传

# 单张
node "$SKILL_DIR/scripts/download-upload.mjs" "https://example.com/image.png"

# 批量(JSON 文件,内容为 URL 字符串数组)
node "$SKILL_DIR/scripts/download-upload.mjs" --json urls.json

# 批量并将结果写入文件
node "$SKILL_DIR/scripts/download-upload.mjs" --json urls.json --output upload-result.json

# 强制重新上传
node "$SKILL_DIR/scripts/download-upload.mjs" --json urls.json --no-cache

图片会自动压缩(超过 5MB 时)再上传。相同内容的图片会命中本地缓存,跳过重复上传。

缓存文件位于 ~/.config/wechat-studio/upload-cache.json,以文件 MD5 为 key。

替换 HTML 占位符

上传完成后,用 replace-images.mjs 将 HTML 中的 <!-- IMG:N --> 自动替换为对应的微信图片 <img> 标签:

node "$SKILL_DIR/scripts/replace-images.mjs" \
  --html article.html \
  --result upload-result.json \
  --output article-final.html

选项:

  • --html:输入 HTML 文件路径
  • --result:上传结果 JSON 文件(由 --output 参数生成)
  • --output:输出 HTML 文件路径(不指定则输出到 stdout)

占位符 <!-- IMG:0 --> 对应结果数组第 0 项,<!-- IMG:1 --> 对应第 1 项,以此类推。


功能四:创建图文草稿

Step 1: 准备草稿 JSON 文件draft.json

{
  "articles": [{
    "title": "文章标题",
    "content": "<p>完整 HTML 内容(已替换图片 URL)</p>",
    "thumb_media_id": "封面图的素材 ID",
    "author": "作者名",
    "digest": "文章摘要,最多 120 字",
    "need_open_comment": 0,
    "only_fans_can_comment": 0
  }]
}

Step 2: 创建草稿

node "$SKILL_DIR/scripts/create-draft.mjs" draft.json

输出:

{ "success": true, "media_id": "草稿的 media_id" }

功能五:创建小绿书(图片帖)

# 指定本地图片
node "$SKILL_DIR/scripts/create-image-post.mjs" \
  -t "标题" -c "描述文字" --images photo1.jpg,photo2.jpg

# 从 Markdown 文件提取图片
node "$SKILL_DIR/scripts/create-image-post.mjs" \
  -t "标题" -m article.md

# 预览(不实际创建)
node "$SKILL_DIR/scripts/create-image-post.mjs" \
  -t "标题" --images photo1.jpg --dry-run

输出:

{ "success": true, "media_id": "xxx", "image_count": 2, "uploaded_ids": ["id1", "id2"] }

功能六:AI 去痕(Humanizer-zh)

触发条件: 用户提到"去除 AI 痕迹"、"让文章更自然"、"humanize"

读取 $SKILL_DIR/references/humanizer-zh.md 获取完整的 22 种 AI 写作模式和 5 条核心去痕规则,按其中的规范处理文本并输出质量评分。


功能七:Server Mode(远程代理)

当本地机器无法直连微信 API(如没有固定 IP 白名单)时,可以在远程服务器上部署 proxy-server.mjs,本地客户端通过 HTTP 调用远程服务器的 API。

服务端部署

# 在有微信 API 白名单的服务器上启动
node "$SKILL_DIR/scripts/proxy-server.mjs" --port 8080 --secret your-proxy-secret

# 或通过环境变量
PROXY_PORT=8080 PROXY_SECRET=your-proxy-secret node "$SKILL_DIR/scripts/proxy-server.mjs"

服务端暴露以下接口(均为 POST,需 X-Proxy-Secret 请求头认证):

  • /api/access-token — 获取 Access Token
  • /api/upload-material — 上传图片素材(multipart/form-data)
  • /api/create-draft — 创建图文草稿(JSON)

客户端配置

配置 proxy 后,所有上传/草稿脚本自动走远程服务器,无需修改调用方式。

环境变量:

export WECHAT_PROXY_URL=http://your-server:8080
export WECHAT_PROXY_SECRET=your-proxy-secret

配置文件:

proxy:
  url: http://your-server:8080
  secret: your-proxy-secret

配置

需要微信凭证才能使用上传/草稿功能(convert、写作、去痕无需凭证)。

方式一:环境变量

export WECHAT_APP_ID=your_appid
export WECHAT_SECRET=your_secret

方式二:配置文件(按优先级从高到低)

./wechat-studio.yaml                    # 项目本地(最高优先级)
~/.wechat-studio.yaml                   # 用户目录
~/.config/wechat-studio/config.yaml    # 全局配置
wechat:
  appid: your_appid
  secret: your_secret

# 图片压缩选项(可选)
compress_images: true       # 是否自动压缩,默认 true
max_image_width: 1920       # 最大宽度(px),默认 1920
max_image_size: 5242880     # 最大文件大小(字节),默认 5MB
http_timeout: 30            # HTTP 超时(秒),默认 30

# 远程代理(可选,见功能七)
proxy:
  url: http://your-server:8080
  secret: your-proxy-secret

典型工作流

发布一篇 Markdown 文章

方式一:一键发布(推荐)

# 1. 批量上传文章图片,结果写入 JSON
node "$SKILL_DIR/scripts/upload-image.mjs" --json images.json --output upload-result.json
# 2. 一键:Markdown → 渲染 → 替换图片 → 最终 HTML
node "$SKILL_DIR/scripts/publish.mjs" -i article.md -r upload-result.json -t autumn-warm -o article-final.html
# 3. 上传封面图
node "$SKILL_DIR/scripts/upload-image.mjs" cover.jpg
# 4. 创建草稿(准备 draft.json,填入 article-final.html 内容和封面 media_id)
node "$SKILL_DIR/scripts/create-draft.mjs" draft.json

方式二:分步操作

# 1. Markdown → HTML(直接渲染,无需 AI)
node "$SKILL_DIR/scripts/convert.mjs" 
how to use wechat-studio

How to use wechat-studio on Cursor

AI-first code editor with Composer

1

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 wechat-studio
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/chouheiwa/wechat-studio --skill wechat-studio

The skills CLI fetches wechat-studio from GitHub repository chouheiwa/wechat-studio and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/wechat-studio

Reload or restart Cursor to activate wechat-studio. Access the skill through slash commands (e.g., /wechat-studio) 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

GET_STARTED →

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. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 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

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.662 reviews
  • Min Jackson· Dec 28, 2024

    Keeps context tight: wechat-studio is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Anika Khan· Dec 28, 2024

    Solid pick for teams standardizing on skills: wechat-studio is focused, and the summary matches what you get after install.

  • Min Singh· Dec 24, 2024

    wechat-studio is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Chen Rahman· Dec 12, 2024

    We added wechat-studio from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Pratham Ware· Dec 8, 2024

    wechat-studio has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Nikhil Haddad· Dec 4, 2024

    wechat-studio reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Xiao Harris· Dec 4, 2024

    I recommend wechat-studio for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Sakshi Patil· Nov 27, 2024

    Solid pick for teams standardizing on skills: wechat-studio is focused, and the summary matches what you get after install.

  • Kabir Thompson· Nov 19, 2024

    wechat-studio is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Amina Iyer· Nov 19, 2024

    wechat-studio has been reliable in day-to-day use. Documentation quality is above average for community skills.

showing 1-10 of 62

1 / 7