Design & UX · Conversion & formats
wechat-theme-extractor-cn
/wechat-theme-extractor-cn
当用户需要从微信公众号文章提取视觉样式,并生成 markdown-wechat-converter 主题时使用。
- Author
- YangsonHung ↗
- Repository
- awesome-agent-skills ↗
- Licence
- MIT
- Last repository change
- 08.08.2026
Assessment and security
96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 3
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 1
Deprecation
No signals detected. Repository changed on 08.08.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What to check before installing
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/extract.py
What it does and when to use it
当用户需要从微信公众号文章提取视觉样式,并生成 markdown-wechat-converter 主题时使用。
Original author description
当用户需要从微信公众号文章提取视觉样式,并生成 markdown-wechat-converter 主题时使用。
How it works
- Overview
- 何时使用
- 不要使用
- 使用说明
- 执行流程
- 运行脚本
- 脚本职责边界
- 写入 markdown-to-wechat.html 规则
- 示例主题片段
- 输出文件
Original SKILL.md headings · 144 lines, 263 words
SKILL.md preview
---
name: wechat-theme-extractor-cn
description: 当用户需要从微信公众号文章提取视觉样式,并生成 markdown-wechat-converter 主题时使用。
---
# 微信文章主题提取器
## Overview
从微信公众号文章中提取正文样式,生成可用于 `markdown-wechat-converter` 的主题配置,并在目标工具文件中自动落盘。流程会从文章中分析字体、颜色、间距和区块样式,把新主题写入 `markdown-to-wechat.html`,并支持写入后的预览。
## 何时使用
当用户有以下需求时使用本技能:
- 提供微信公众号文章链接,要求提取排版和样式
- 希望基于现有微信文章生成新的主题配置
- 需要把主题自动写入 `markdown-to-wechat.html`
- 需要在写入完成后直接打开目标 HTML 预览
## 不要使用
以下场景不应使用本技能:
- 非微信公众号文章链接
- 用户只要提取纯文本内容,不需要分析主题样式
- 目标项目中不存在 `markdown-wechat-converter` 或对应 HTML 配置文件
## 使用说明
1. 先运行 `scripts/extract.py`,只负责抓取文章 HTML、提取标题和 `js_content`。
2. 读取生成的 `.extracted_content.html`,由 AI 自行分析颜色、字号、间距、标题层级、引用块、分隔元素等样式特征。
3. 基于分析结果生成适配 `markdown-wechat-converter` 的主题配置。
4. 在当前工作区内定位并修改 `markdown-to-wechat.html`,将新主题追加到已有主题配置中,避免破坏现有结构。
5. 修改后再次检查目标文件,确认主题配置已成功写入。
6. 如果写入成功,使用系统浏览器打开 `markdown-to-wechat.html` 进行预览。
## 执行流程
```text
用户提供链接
-> 运行提取脚本
-> 生成 .extracted_content.html
-> AI 分析样式
-> 生成主题配置
-> 写入 markdown-to-wechat.html
-> 校验写入结果
-> 打开 HTML 预览
```
## 运行脚本
```bash
python3 scripts/extract.py "https://mp.weixin.qq.com/s/xxxxx"
```
## 脚本职责边界
Python 脚本只做以下事情:
- 获取微信文章 HTML
- 提取文章标题
- 提取 `js_content` 正文片段
- 保存为 `.extracted_content.html`
以下工作由 AI 完成:
- 样式特征分析
- 主题结构生成
- 写入目标工具配置
- 写入结果校验
- 预览打开
## 写入 `markdown-to-wechat.html` 规则
更新 `markdown-to-wechat.html` 时,必须遵守以下规则:
1. 先定位真实主题配置区域。
- 先搜索主题相关的对象、数组、映射或 `const` 定义,再决定修改位置。
- 不要假设固定变量名,必须以文件现有结构为准。
2. 保持原有代码风格。
- 延续文件当前的缩进、引号风格、逗号风格和对象结构。
- 不要顺手重排或格式化无关代码。
3. 优先追加或定点更新。
- 如果主题名不存在,在现有主题集合中追加新条目。
- 如果同名主题已存在,只更新该主题条目,不重复插入。
4. 限制修改范围。
- 只修改主题定义区域,以及让主题可被选择所必须的最小注册代码。
- 除非文件结构强制要求,否则不要改动渲染逻辑、事件处理或其他 UI 代码。
5. 写入后必须复检。
- 重新读取修改后的片段,确认主题键名、显示名和核心样式字段都已存在。
- 如果无法安全定位主题区块,停止自动写入并明确说明需要人工确认目标结构。
## 示例主题片段
生成主题时,优先产出与目标文件现有结构一致的对象。下面是一个可参考的最小示例:
```js
{
id: "wechat-clean-blue",
name: "微信清爽蓝",
styles: {
body: {
fontFamily: "\"PingFang SC\", \"Helvetica Neue\", sans-serif",
fontSize: "16px",
color: "#2b2b2b",
lineHeight: "1.75",
backgroundColor: "#ffffff"
},
h1: {
fontSize: "24px",
fontWeight: "700",
textAlign: "center",
color: "#1f3a5f"
},
h2: {
fontSize: "20px",
fontWeight: "700",
color: "#1f3a5f",
borderBottom: "2px solid #9ec1ff"
},
blockquote: {
color: "#4a5568",
backgroundColor: "#f7fbff",
borderLeft: "4px solid #7fb3ff",
padding: "12px 16px"
}
}
}
```
实际写入时:
- 字段名必须以 `markdown-to-wechat.html` 现有主题结构为准
- 如果目标文件使用数组项、映射值或嵌套注册格式,应按原结构改写此示例
- 至少包含主题标识、显示名和核心排版样式
## 输出文件
- `scripts/.extracted_content.html`:提取出的正文 HTML,首部包含标题和原始 URL 注释
## 校验清单
- 能成功抓取文章 HTML
- `.extracted_content.html` 已生成且内容非空
- 已提取到标题和 `js_content`
- 新主题已写入 `markdown-to-wechat.html`
- `markdown-to-wechat.html` 打开后可正常预览
Files in this package (3)
- SKILL.md 5 KB
- agents/openai.yaml 1 KB
- scripts/extract.py 2 KB
Versions
The database has no other skills named wechat-theme-extractor-cn.
Database snapshot: 13.11.2026 · package version 1ff9fc785fd2 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100wechat-theme-extractor
Use when extracting visual styles from a WeChat article and generating a markdown-wechat-converter theme. - 100wechat-publishing-workflow
Use when extracting WeChat articles, rendering Markdown for official-account drafts, generating covers, or publishing Feishu/Markdown content into WeChat workflows. - 96wechat-article-generator
交互式生成公众号文章。当用户需要创作公众号推文时调用,通过步骤化引导收集文章要素,生成符合公众号风格的文章。 - 100wechat-article-to-markdown
将微信公众号文章转换为整洁的 Markdown 文件,自动去除广告、赞赏、推广等无关内容,处理代码块格式,支持图片和视频处理。当用户提供微信公众号链接或要求保存微信文章时使用此技能。 - 100wechat-article-compose
把一个已确认的选题写成微信公众号长文。锁定复刻锚与用户价值、写出 article.md / wechat.yml / _review.md,并通过公众号通用合规检查和人工预览前自检。准备、改写或核验公众号文章时使用;不负责发布,也不产出小红书卡片。 - 95wechat-article
生成可直接发布的微信公众号软文。当用户要求写公众号推文、软文、绩效文章(如"写本月公众号推文""写一篇XX主题的软文")时使用。覆盖账号建档、选题对齐、场景化写作、严谨性审查、文风去 AI 化、配图、标题打磨的完整七阶段流程,产出可直接排版发布的 .md 文件与配图。