From yangsonhung-awesome-agent-skills
从微信公众号文章中提取样式,AI 智能分析并生成主题配置。当用户提供微信公众号文章链接,希望提取文章视觉风格、生成 markdown-wechat-converter 可用主题,或自动写入 markdown-to-wechat.html 时使用。
npx claudepluginhub joshuarweaver/cascade-content-creation-misc-1 --plugin yangsonhung-awesome-agent-skillsThis skill uses the workspace's default tool permissions.
从微信公众号文章中提取正文样式,生成可用于 `markdown-wechat-converter` 的主题配置,并在目标工具文件中自动落盘。
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
从微信公众号文章中提取正文样式,生成可用于 markdown-wechat-converter 的主题配置,并在目标工具文件中自动落盘。
当用户有以下需求时使用本技能:
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 打开后可正常预览