Skip to content

aiworkskills/wechat-article-skills / skills/aws-wechat-article-formatting

aws-wechat-article-formatting

Verified

公众号排版|Markdown 转 HTML|排版主题|段落样式 — 公众号一键排版工具,Markdown 文稿转微信后台可粘贴 HTML,多主题、多字号、段落样式切换,所见即所得。面向公众号编辑、独立作者、排版岗。触发词:「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个排版主题」「换个版式」「转 HTML」「弄好看点」「调整格式」。换预设包/品牌包/整套主题配色请走 aws-wechat-article-assets;需要多环节串联(写+审+排+配图+发)请走 aws-wechat-article-main。

FileKindSize
SKILL.mdskill md9.7 KB
references/branches.mdmarkdown6.6 KB
references/components/bao/article-end.yamlconfig149 B
references/components/bao/checklist.yamlconfig1.0 KB
references/components/bao/lead.yamlconfig211 B
references/components/bao/li-label.yamlconfig200 B
references/components/bao/quote-card.yamlconfig379 B
references/components/cai/article-end.yamlconfig200 B
references/components/cai/checklist.yamlconfig1.0 KB
references/components/cai/h2-deco.yamlconfig160 B
references/components/cai/img-deco.yamlconfig223 B
references/components/cai/lead.yamlconfig317 B
references/components/cai/li-label.yamlconfig202 B
references/components/cai/quote-card.yamlconfig392 B
references/components/checklist.yamlconfig2.1 KB
references/components/closing.yamlconfig1.7 KB
references/components/compare.yamlconfig2.0 KB
references/components/gou/article-end.yamlconfig512 B
references/components/gou/checklist.yamlconfig1012 B
references/components/gou/h2-deco.yamlconfig459 B
references/components/gou/hr-deco.yamlconfig353 B
references/components/gou/img-deco.yamlconfig298 B
references/components/gou/lead.yamlconfig589 B
references/components/gou/li-label.yamlconfig196 B
references/components/gou/quote-card.yamlconfig727 B
references/components/kuai/article-end.yamlconfig270 B
references/components/kuai/checklist.yamlconfig1.0 KB
references/components/kuai/lead.yamlconfig218 B
references/components/kuai/li-label.yamlconfig202 B
references/components/kuai/quote-card.yamlconfig332 B
references/components/layers.yamlconfig1.5 KB
references/components/lead.yamlconfig1.4 KB
references/components/ma/article-end.yamlconfig307 B
references/components/ma/checklist.yamlconfig1.0 KB
references/components/ma/h2-deco.yamlconfig322 B
references/components/ma/lead.yamlconfig426 B
references/components/ma/li-label.yamlconfig197 B
references/components/ma/quote-card.yamlconfig422 B
references/components/quote-card.yamlconfig1.5 KB
references/components/section-title.yamlconfig1.5 KB
references/components/shou/article-end.yamlconfig488 B
references/components/shou/checklist.yamlconfig1.0 KB
references/components/shou/h2-deco.yamlconfig526 B
references/components/shou/hr-deco.yamlconfig678 B
references/components/shou/img-deco.yamlconfig508 B
references/components/shou/lead.yamlconfig313 B
references/components/shou/li-label.yamlconfig265 B
references/components/shou/quote-card.yamlconfig559 B
references/components/shu/article-end.yamlconfig188 B
references/components/shu/checklist.yamlconfig1.0 KB
references/components/shu/h2-deco.yamlconfig360 B
references/components/shu/hr-deco.yamlconfig183 B
references/components/shu/img-deco.yamlconfig265 B
references/components/shu/lead.yamlconfig301 B
references/components/shu/li-label.yamlconfig195 B
references/components/shu/quote-card.yamlconfig609 B
references/components/stat.yamlconfig2.0 KB
references/components/steps.yamlconfig2.2 KB
references/components/yi/article-end.yamlconfig403 B
references/components/yi/checklist.yamlconfig1.0 KB
references/components/yi/h2-deco.yamlconfig377 B
references/components/yi/hr-deco.yamlconfig281 B
references/components/yi/lead.yamlconfig631 B
references/components/yi/li-label.yamlconfig200 B
references/components/yi/quote-card.yamlconfig491 B
references/presets/README.mdmarkdown5.6 KB
references/presets/_sample-image-2.svgother1.0 KB
references/presets/_sample-image.svgother1.6 KB
references/presets/_sample.mdmarkdown2.7 KB
references/presets/templates/README.mdmarkdown1.3 KB
references/presets/templates/手账.yamlconfig2.9 KB
references/presets/templates/技术.yamlconfig3.8 KB
references/presets/templates/活力.yamlconfig3.3 KB
references/presets/templates/硬朗.yamlconfig3.1 KB
references/presets/themes/书卷.yamlconfig3.7 KB
references/presets/themes/亲和.yamlconfig3.2 KB
references/presets/themes/杂志.yamlconfig2.9 KB
references/presets/themes/资讯.yamlconfig3.1 KB
references/wechat-html-constraints.mdmarkdown20.8 KB
scripts/brush_svg.pyscript7.4 KB
scripts/format.pyscript92.8 KB
skill.jsonconfig475 B

references/presets/README.md

View on GitHub
# 排版主题说明

## 使用主题

不传 `--theme` 时,**`format.py`** 只读取与 `article.md` 同目录 **`article.yaml`** 的 **`default_format_preset`**(不直接读 `.aws-article/config.yaml`;全局 `custom_format_preset` / `default_format_preset` 候选池由 main 在本篇准备阶段收敛后写回 `article.yaml`)。该键**须为 YAML 字符串列表**:`[]` 或单元素 `[主题名]`;为空则用内置默认模版 `亲和`;多候选会报错,须先改为单元素列表。

```bash
{python} format.py article.md --theme <主题名>
{python} format.py --list-themes              # 列出可用主题
```

## 内置主题

`themes/` 下四套模版随 skill 内置,每套带三种配色(YAML 里的 `schemes:`,第一项即默认色):

| 模版 | 骨架 | 适合 | 配色 |
|------|------|------|------|
| `亲和` | kuai | 教程、职场、面向新手 | 黛紫 / 松绿 / 靛蓝 |
| `资讯` | bao | 快讯、评测、行业观察 | 墨绿 / 绛红 / 藏青 |
| `书卷` | shu | 人文、读书、深度长文 | 朱砂 / 黛蓝 / 苍绿 |
| `杂志` | yi | 品牌、访谈、生活方式 | 石青 / 驼褐 / 铁锈 |

`templates/` 下另外四套(活力 / 手账 / 硬朗 / 技术)不进内置搜索路径,经网站 `.aws` 预设包下发到
`.aws-article/presets/formatting/`。两处 YAML 是网站系统预设的**唯一真源**——网站仓库
`backend/scripts/build_formatting_presets.py` 从这里生成 fixture 与预览页。

模版 YAML 的形状:`skeleton`(对应 `references/components/<skeleton>/` 的装饰组件)、
`variables`(默认色)、`schemes`(配色列表,每项只是一组 variables 覆盖)、`styles`。
换配色:`--scheme <名>`;派生色(fill / ink / 淡底 / 高亮笔)由主色自动算,不用手填。

## 自定义主题

在 `.aws-article/presets/formatting/` 下创建 `.yaml` 文件即可:

```yaml
# .aws-article/presets/formatting/my-brand.yaml

name: 我的品牌                 # 显示名称
description: 品牌专用排版       # 说明

variables:                     # 变量(可选,覆盖默认值)
  primary-color: "#A93226"
  bg-accent-color: "#FFF5F5"
  text-color: "#333333"
  bg-light: "#FFF5F5"
  font-size: "16px"
  line-height: "1.8"
  paragraph-spacing: "1.5em"

styles:                        # 样式规则(可用 {变量名} 引用变量)
  h1: "text-align:center; font-size:22px; font-weight:bold; color:{primary-color};"
  h2: "font-size:18px; background:{primary-color}; color:#FFF; padding:6px 14px; border-radius:4px;"
  h3: "font-size:16px; font-weight:bold; color:{primary-color};"
  h4: "font-size:15px; font-weight:bold; color:#444;"
  p: "font-size:{font-size}; line-height:1.8; color:#3a3a3a; margin:10px 0;"   # 用 {font-size} 变量,--font-size 才能覆盖
  strong: "color:{primary-color}; font-weight:bold;"
  em: "font-style:italic; color:#555;"
  a: "color:{primary-color}; text-decoration:none; border-bottom:1px solid {primary-color};"
  blockquote: "border-left:3px solid {primary-color}; background:{bg-light}; padding:12px 16px;"
  ul: "padding-left:20px; margin:0.6em 0;"
  ol: "padding-left:20px; margin:0.6em 0;"
  li: "margin-bottom:6px; line-height:1.75; color:#3a3a3a;"
  hr: "border:none; border-top:1px solid #EEE; width:60%; margin:2em auto;"
  img: "max-width:100%; border-radius:5px; display:block; margin:0 auto;"
  figcaption: "text-align:center; font-size:12px; color:#999; margin-top:6px;"
  code: "color:{primary-color}; background:{bg-accent-color}; padding:2px 6px; border-radius:3px; font-size:90%;"
  pre: "background:#1a1a2e; color:#e0e0e0; padding:16px; border-radius:10px; font-size:13px; line-height:1.8; overflow-x:auto;"
  strong-color: "{primary-color}"
```

保存后 `--theme my-brand` 立即可用。与内置主题同名则覆盖内置。

## 快速创建自定义主题

基于内置主题导出 YAML,再修改:

```bash
{python} format.py --export-theme default > .aws-article/presets/formatting/my-brand.yaml
# 编辑 my-brand.yaml,修改颜色和样式
```

导出内容包含全部默认变量与样式键,`{变量}` 引用保持原样,可直接改色改样式。

## 可用变量

| 变量 | 说明 | 默认值 |
|------|------|--------|
| `primary-color` | 主色 | #0F4C81 |
| `bg-accent-color` | 强调背景色 | #F0F4F8 |
| `text-color` | 正文颜色 | #333333 |
| `text-light` | 次要文字 | #666666 |
| `text-muted` | 弱化文字 | #999999 |
| `bg-light` | 浅色背景 | #F7F7F7 |
| `border-color` | 边框颜色 | #EEEEEE |
| `link-color` | 链接颜色 | #576B95 |
| `font-size` | 正文字号;`--font-size` 覆盖时,主题 p / li 中硬编码的字号也会被一并替换 | 16px |
| `font-family` | 字体 | system fonts |
| `line-height` | 行高 | 1.8 |
| `paragraph-spacing` | 段间距 | 1.5em |

## 可用样式键

| 键 | 控制元素 |
|----|---------|
| `h1` | 一级标题(文章标题) |
| `h2` | 二级标题(小标题) |
| `h3` | 三级标题 |
| `h4` | 四级标题 |
| `p` | 段落(留空则用变量自动拼接) |
| `strong` | 加粗文字(留空则用 `strong-color`) |
| `em` | 斜体文字 |
| `a` | 链接(留空则用 `link-color`) |
| `blockquote` | 引用块 |
| `ul` | 无序列表容器 |
| `ol` | 有序列表容器 |
| `li` | 列表项 |
| `hr` | 分割线 |
| `img` | 图片 |
| `figcaption` | 图片说明 |
| `code` | 行内代码 |
| `pre` | 代码块 |
| `table` / `th` / `td` | 表格、表头、单元格(留空用内置默认) |
| `del` | 删除线 `~~文字~~` |
| `strong-color` | 加粗文字颜色(兼容旧主题) |

样式值为 CSS inline style 格式,可使用 `{变量名}` 引用变量。
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall