用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/YangsonHung/awesome-agent-skills --skill wechat-theme-extractor-cn命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | wechat-theme-extractor-cn |
| description | 当用户需要从微信公众号文章提取视觉样式,并生成 markdown-wechat-converter 主题时使用。 |
从微信公众号文章中提取正文样式,生成可用于 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 打开后可正常预览基于 SOC 职业分类