wechat-publish SKILL.md skillA

wechat-publish from simonwong/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add simonwong/skills/wechat-publish@v0.1.0

Pins v0.1.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
simonwong/skills
Path
in-progress/wechat-publish/SKILL.md
Versions recorded
1
Latest version
v0.1.0, committed Sep 30, 2026
Size
5,432 bytes
Repository stars
9
License
none declared

本地预览 Markdown 文章的公众号排版(含微信暗色模式),一键上传图片和封面并同步到公众号草稿箱。用于“预览公众号排版”“发到公众号草稿”“同步草稿箱”“调公众号样式”。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# WeChat Publish

把一篇 Markdown 文章转成公众号正文 HTML:本地预览排版,并同步到公众号草稿箱。脚本在 `scripts/`,唯一一套正文样式在 `assets/theme.css`。命令都在 `scripts/` 目录下运行。

## 准备

1. `scripts/node_modules` 不存在时,先在 `scripts/` 运行 `bun install`。
2. 发布需要凭证:环境变量 `WECHAT_APP_ID`、`WECHAT_APP_SECRET`,可选 `WECHAT_AUTHOR`(草稿作者)、`WECHAT_OPEN_COMMENT=0`(账号没有留言权限时关掉留言);也可以写进 `~/.config/wechat-publish/.env`,环境变量优先。只预览时不需要凭证。
3. 第一次发布前运行 `bun cli.ts check`,确认凭证、IP 白名单、素材和草稿接口权限。失败时把错误提示原样转告用户。

## 按请求选模式

- **预览**:在后台运行 `bun cli.ts preview <文章.md>`,把输出的地址告诉用户。
  - 没有浏览器可打开时(Linux、远程环境)加 `--no-open`。
  - 默认端口 4321。端口上已经在预览同一篇文章时,沿用原来的服务,命令直接退出;端口被别的程序占用时,会自动换一个端口,以输出的地址为准。
  - 页面左栏是原文,右栏默认显示 375px 宽的正文,可切换亮色和微信暗色,也可切到消息卡片视图。
  - 原文上方列出写法提示,比如标题超长、一级标题和文章标题重复、公众号会删掉的 `<video>`、mermaid 图、无意义的图注。提示只提醒、不改正文,要不要改写由用户决定。
  - 用户保存 md 或 `theme.css` 后页面自动刷新。md 改名或移动后,用新路径重新运行 preview。
  - 页面上的「发布到草稿」按钮执行的就是发布模式。
- **发布**:运行 `bun cli.ts publish <文章.md>`,按输出的 JSON 告诉用户:新建还是更新了草稿,上传了几张图片,封面是否重传。`warnings` 不为空时一并转告(比如没有设置作者)。
- **调样式**:运行 `bun cli.ts preview`(不带文章)打开样例 `assets/sample.md`,样例预览不能发布。
  - 样式只改 `assets/theme.css`。改之前先读文件头的注释:写了哪些 CSS 能生效,以及暗色下颜色怎么选。颜色、字号、间距优先改 `:root` 里的变量。
  - 样例覆盖不到的元素,补进 `sample.md`。
  - 改完让用户在亮色和暗色下都看一遍效果。

## 发布会改什么
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add simonwong/skills/wechat-publish@sha256:7c16ca6d8451b054

The line at the top of this page pins the label v0.1.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_j3x4aghtccml3egu.svg)](https://markdownregistry.com/a/art_j3x4aghtccml3egu)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Sep 30, 2026.

versioncommittedcommitsizeaudit
v0.1.0 latest2026-09-30 4e73ed5 5,432 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (5432 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

simonwong/skills · 9 stars · license none declared · pushed 2026-10-28 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_j3x4aghtccml3egu
GET https://markdownregistry.com/api/v1/resolve?ref=simonwong/skills/wechat-publish
GET https://markdownregistry.com/api/v1/blob/7c16ca6d8451b05402dc74ad7feda50d1d415069df4ca55ab3b5330eb66ada30

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from simonwong/skills

AGENTS.md AGENTS.md file
simonwong/skills · AGENTS.md
git:20260923.a187f06 · audit A · 9 stars
CLAUDE.md CLAUDE.md file
simonwong/skills · CLAUDE.md
git:20260914.95c2646 · audit A · 9 stars
AGENTS.md@in-progress AGENTS.md file
simonwong/skills · in-progress/AGENTS.md
git:20260930.4e73ed5 · audit A · 9 stars
compose SKILL.md skill
simonwong/skills · in-progress/compose/SKILL.md · 基于主题或参考文章进行中文创作。自动检索素材库、加载主力风格档案,产出符合个人风格的文章。支持公众号、Twitter、小红书、博客等多种场景。当用户说"写一篇关于XX的文章""围绕XX创作""基于这篇文章写一篇""参考这篇英文写个中文版""…
v1.1.0 · audit A · 9 stars
material-ingest SKILL.md skill
simonwong/skills · in-progress/material-ingest/SKILL.md · 拆解文章,提取可复用的素材(观点、数据、案例、金句、类比、方法论),分类标注后存入素材库。当用户说"拆解素材""入库""收集这篇文章""提取素材""分析这篇文章的要点"或投喂文章希望留存有价值内容时使用此技能。即使用户只是分享文章并表达"这…
v1.2.0 · audit A · 9 stars
material-retrieve SKILL.md skill
simonwong/skills · in-progress/material-retrieve/SKILL.md · 从素材库中按主题、标签、类型检索可复用的写作素材。当用户说"找素材""查素材""关于XX的素材""检索素材库""有没有关于XX的东西""翻翻素材库"时使用此技能。当用户在写作过程中需要支撑材料时也应主动建议使用。
v1.1.0 · audit A · 9 stars
rewrite SKILL.md skill
simonwong/skills · in-progress/rewrite/SKILL.md · 润色和改写文章,去除 AI 感,按主力风格档案调整文风。当用户说"润色""改稿""去 AI 感""打磨一下""修改文风""帮我改改""这篇读起来太像 AI…
v1.0.0 · audit A · 9 stars
style-extract SKILL.md skill
simonwong/skills · in-progress/style-extract/SKILL.md · 分析文章的写作风格特征,提取风格维度存入风格素材库。可融合多篇风格素材生成或更新主力风格档案(my_style.json)。当用户说"分析风格""提取写作风格""学习这个语气""分析我的文风""吸收这个风格""更新我的风格"时使用此技能。即…
v1.2.0 · audit A · 9 stars
title-gen SKILL.md skill
simonwong/skills · in-progress/title-gen/SKILL.md · 为文章生成多个候选标题,覆盖不同策略类型,标注适用平台。当用户说"帮我起个标题""生成标题""取标题""想个标题""这个标题不好,换几个"时使用此技能。当用户刚完成创作并需要标题时也应主动建议使用。
v1.0.0 · audit A · 9 stars
code-simplifier SKILL.md skill
simonwong/skills · skills/engineering/code-simplifier/SKILL.md · Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses…
v1.0.0 · audit A · 9 stars
ship-pr SKILL.md skill
simonwong/skills · skills/engineering/ship-pr/SKILL.md · Commit outstanding work in batches, then open, merge, and clean up a pull request.
git:20260910.ff19eb3 · audit A · 9 stars
claude-dispatch SKILL.md skill
simonwong/skills · skills/misc/claude-dispatch/SKILL.md · Keep coordination and verification in the main thread; dispatch tasks to Sonnet or Opus subagents by difficulty.
git:20261028.cecb393 · audit A · 9 stars

Every file in simonwong/skills

Browse by kind, by grade A, or by owner.