aws-wechat-article-formatting
给公众号文章排版,转换为可直接粘贴到微信后台的格式,支持多套主题。当用户提到「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个主题」「转 HTML」「弄好看点」「调整格式」时使用。
Best use case
aws-wechat-article-formatting is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
给公众号文章排版,转换为可直接粘贴到微信后台的格式,支持多套主题。当用户提到「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个主题」「转 HTML」「弄好看点」「调整格式」时使用。
Teams using aws-wechat-article-formatting should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/aws-wechat-article-formatting/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How aws-wechat-article-formatting Compares
| Feature / Agent | aws-wechat-article-formatting | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
给公众号文章排版,转换为可直接粘贴到微信后台的格式,支持多套主题。当用户提到「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个主题」「转 HTML」「弄好看点」「调整格式」时使用。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# 排版
## 路由
一键发文且未明确只要排版 → [aws-wechat-article-main](../aws-wechat-article-main/SKILL.md)。
将 Markdown 文章转换为微信公众号兼容的 HTML,所有样式 inline。
## 脚本目录
**Agent 执行**:确定本 SKILL.md 所在目录为 `{baseDir}`。
| 脚本 | 用途 |
|------|------|
| `scripts/format.py` | Markdown → 微信兼容 HTML |
## 配置检查 ⛔
任何操作执行前,**必须**按 **[首次引导](../aws-wechat-article-main/references/first-time-setup.md)** 执行其中的 **「检测顺序」**。**单独启用本 skill** 时同上。检测通过后才能进行以下操作(或用户明确书面确认「本次不检查」):
## 内置主题
| 主题 | 风格 | 适用场景 |
|------|------|---------|
| `default` | 经典蓝 — 左边框小标题,底部分割线大标题 | 科技、干货、通用 |
| `grace` | 优雅紫 — 圆角色块小标题,文字阴影 | 文艺、生活方式 |
| `modern` | 暖橙 — 胶囊圆角小标题,宽松行高 | 现代感、品牌 |
| `simple` | 极简黑 — 底线小标题,最少装饰 | 极简主义、学术 |
每个主题包含:标题样式、引用块样式、分割线、强调色、段落间距等完整规则。
## 工作流
```
排版进度:
- [ ] 第0步:配置检查(见本节「配置检查」)⛔
- [ ] 第1步:确定主题(与合并配置 / 用户指定)
- [ ] 第2步:转换
- [ ] 第3步:输出 HTML
```
### 第1步:确定主题
主题解析顺序(**`format.py` 行为**与智能体择一):
1. **命令行** `--theme <名称>`:显式指定时**始终优先**。
2. **未传 `--theme`**:`format.py` 读取 **合并后的本篇配置**:先 **`.aws-article/config.yaml`** 顶层(不含 `writing_model` / `image_model`),再叠 **与 `article.md` 同目录的 `article.yaml`**,**同键本篇优先**(**仅** `embeds.related_articles` 单独与全局合并,见下节)。从合并结果取 **`default_format_preset`**(非空则作为主题名);若仍为空,则用内置主题名 **`default`**。
3. 智能体在对话中帮用户选主题时,仍按:用户口述 → 上条合并配置中的预设 → `.aws-article/presets/formatting/` 自定义 → 内置 `default`。
主题名须对应 **内置主题** 或 **`.aws-article/presets/formatting/<名>.yaml`**。字段说明见 [articlescreening-schema.md](../aws-wechat-article-main/references/articlescreening-schema.md)(与仓库 `config.yaml` 顶层字段对齐)。
### 第2步:转换
在**仓库根**执行(路径按实际本篇目录调整):
```bash
# 不传 --theme:使用合并配置中的 default_format_preset,否则 default
python {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md -o drafts/YYYYMMDD-slug/article.html
# 显式指定主题(覆盖配置)
python {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md --theme grace -o drafts/YYYYMMDD-slug/article.html
# 自定义主色 / 字号
python {baseDir}/scripts/format.py article.md --theme modern --color "#A93226"
python {baseDir}/scripts/format.py article.md --font-size 15px
# 列出可用主题
python {baseDir}/scripts/format.py --list-themes
```
### 嵌入元素 `{embed:...}`
- **`format.py`**:**名片 / 小程序** 的 `embeds` 以 **`.aws-article/config.yaml`** 为准;**仅「往期链接」**:本篇 `article.yaml` 可写 **`embeds.related_articles`**,与全局 **`related_articles` 深度合并**(用于每篇不同推荐)。合并结果中非空 **`embeds`** 时解析 `{embed:profile|miniprogram|miniprogram_card|link:名称}`;否则不对嵌入占位符做替换(视为无配置)。
- 与 [writing 结构模板](../aws-wechat-article-writing/references/structure-template.md) 中的占位说明一致。
### 第3步:输出 HTML
输出的 HTML 特性:
- 所有样式 inline(微信编辑器兼容)
- **正文不含文章标题**:Markdown 中第一个 `#`(h1)在转换时被跳过,标题在公众号后台单独填写,正文不重复
- 配图标记 `` 保留为 `<img>` 标签,待 images skill 替换
- 图注自动从标记描述中提取
- 同目录存在 **`closing.md`** 时,`format.py` 会追加到文末(脚本既有行为)
## 选项
| 选项 | 说明 | 默认值 |
|------|------|--------|
| `--theme <名称>` | 主题;**省略则按合并配置 → default** | 见上文 |
| `--color <hex>` | 自定义主色 | 主题默认 |
| `--font-size <px>` | 字号 | 16px |
| `-o <路径>` | 输出路径 | 同名 .html |
| `--list-themes` | 列出可用主题 | |
## 自定义主题
在 `.aws-article/presets/formatting/` 下新建主题文件即可。
主题文件格式和扩展方式详见:[references/presets/README.md](references/presets/README.md)
## 过程文件
| 读取 | 产出 |
|------|------|
| `article.md`、**`.aws-article/config.yaml` + 同目录 `article.yaml`**(默认主题与 `embeds`)、`closing.md`(可选) | `article.html` |Related Skills
name: welight-wechat-layout-publish
description: Welight standalone skill for turning an article into WeChat Official Accounts compatible Markdown/HTML, presenting built-in theme choices, and publishing to WeChat as a draft or formal post when publishing prerequisites are already configured.
wechat-publisher
一键发布 Markdown 到微信公众号草稿箱。基于 wenyan-cli,支持多主题、代码高亮、图片自动上传。
wechat-report
Generate a structured comparison report for multiple WeChat Official Account articles under one topic. Use this when the user wants several公众号文章 collected into one local report with article metadata, engagement status, content structure tables,爆款写法标签, and a later optional Feishu sync step.
wechat-collect
Fetch a public WeChat article URL, archive the raw HTML, and convert the article into a stage-1 compatible brief in `content-production/inbox/`. Use when Codex needs to collect公众号文章素材 or start the Stage 2 collect-to-create pipeline from a public `mp.weixin.qq.com` URL.
wechat-studio
Launch a local WeChat article workbench for Markdown import, WeChat HTML preview, theme tuning, image selection, and optional draft push. Use when Codex needs a browser-based preview and manual QA layer before publishing.
wechat-formatter
Render article markdown into WeChat-style HTML as an independent executor. Use when Codex needs公众号排版预览, WeChat HTML output, or a publishable HTML artifact generated from an article markdown draft.
wechat-article-extractor
Extract metadata and content from WeChat Official Account articles. Use when user needs to parse WeChat article URLs (mp.weixin.qq.com), extract article info (title, author, content, publish time, cover image), or convert WeChat articles to structured data. Supports various article types including posts, videos, images, voice messages, and reposts.
wechat-monitor
微信公众号调研 + 监控 + 报告推送。每个产品独立目录,互不影响。
wechat-auto-publishing-complete
Use this skill to fully reproduce and operate a local end-to-end WeChat Official Account publishing workflow: prepare the environment, validate dependencies, configure non-sensitive placeholders for credentials, gather source material, draft articles, prepare cover and body images, assemble a WeChat-ready Markdown package, publish to draft, optionally submit for formal publication, poll status, archive outputs, and attach scheduling or alerting. Use whenever the user wants a complete reproducible公众号自动发文 skill with environment setup, templates, runbooks, and execution scaffolding, while keeping all secrets and personal account details outside the skill package. Key real-world findings: freepublish does not always behave like manual platform publishing for homepage visibility, production mode should often default to draft-only, image files must be validated by real format rather than extension alone, and multi-account deployments should use isolated directories.
aws-wechat-article-review
审核公众号文章,检查敏感词、错别字、合规性和写作规范,输出修改清单。当用户提到「审稿」「审核」「检查一下」「校对」「合规」「敏感词」「错别字」「帮我看看」「写完了」「检查下有没有问题」「能不能发」时使用。
aws-wechat-article-publish
将文章发布到微信公众号(API 写入草稿箱或提交发布),含发布前检查。当用户提到「发布」「提交」「群发」「推送」「发出去」「上传到公众号」「发到公众号」「可以发了吗」「发布前检查」时使用。
aws-wechat-article-main
管理微信公众号从选题到发布的完整内容的固定流程,路由到各子能力。任何新任务执行时必须严格按这个流程顺序推进,选题 → 写稿 → 审稿(内容审) → 排版 → 配图 → 审稿(终审) →发布 ,且每一步完成是进入下一步的前提。当用户提到「公众号运营」「自动运营」「发篇文章」「内容规划」「怎么运营」「一条龙」「完整流程」「从头做」「帮我发一篇」「今天发什么」或需要了解整体流程时使用。