From yangsonhung-awesome-agent-skills
Extracts visual styles from WeChat public account articles and generates themes for markdown-wechat-converter, automatically writing to the target HTML file and opening preview.
How this skill is triggered — by the user, by Claude, or both
Slash command
/yangsonhung-awesome-agent-skills:wechat-theme-extractor-cnThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
从微信公众号文章中提取正文样式,生成可用于 `markdown-wechat-converter` 的主题配置,并在目标工具文件中自动落盘。流程会从文章中分析字体、颜色、间距和区块样式,把新主题写入 `markdown-to-wechat.html`,并支持写入后的预览。
从微信公众号文章中提取正文样式,生成可用于 markdown-wechat-converter 的主题配置,并在目标工具文件中自动落盘。流程会从文章中分析字体、颜色、间距和区块样式,把新主题写入 markdown-to-wechat.html,并支持写入后的预览。
当用户有以下需求时使用本技能:
markdown-to-wechat.html以下场景不应使用本技能:
markdown-wechat-converter 或对应 HTML 配置文件scripts/extract.py,只负责抓取文章 HTML、提取标题和 js_content。.extracted_content.html,由 AI 自行分析颜色、字号、间距、标题层级、引用块、分隔元素等样式特征。markdown-wechat-converter 的主题配置。markdown-to-wechat.html,将新主题追加到已有主题配置中,避免破坏现有结构。markdown-to-wechat.html 进行预览。用户提供链接
-> 运行提取脚本
-> 生成 .extracted_content.html
-> AI 分析样式
-> 生成主题配置
-> 写入 markdown-to-wechat.html
-> 校验写入结果
-> 打开 HTML 预览
python3 scripts/extract.py "https://mp.weixin.qq.com/s/xxxxx"
Python 脚本只做以下事情:
js_content 正文片段.extracted_content.html以下工作由 AI 完成:
markdown-to-wechat.html 规则更新 markdown-to-wechat.html 时,必须遵守以下规则:
先定位真实主题配置区域。
const 定义,再决定修改位置。保持原有代码风格。
优先追加或定点更新。
限制修改范围。
写入后必须复检。
生成主题时,优先产出与目标文件现有结构一致的对象。下面是一个可参考的最小示例:
{
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 注释.extracted_content.html 已生成且内容非空js_contentmarkdown-to-wechat.htmlmarkdown-to-wechat.html 打开后可正常预览npx claudepluginhub yangsonhung/awesome-agent-skillsExtracts visual styles from a WeChat Official Account article and generates a reusable theme for markdown-wechat-converter, then injects it into markdown-to-wechat.html.
Converts Markdown to WeChat Official Account HTML, inspects metadata and capabilities, generates cover images, and creates drafts. Also supports image posts (小绿书) and removing AI writing traces.
Converts Markdown to WeChat Official Account-ready HTML with 15 built-in publishing styles. Supports style selection, preview, and batch generation.