wechat-theme-extractor
Skill18 starsChanged 5 days agoMITView on GitHub
Use when extracting visual styles from a WeChat article and generating a markdown-wechat-converter theme.
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ax-extract-workflowSkill
- conversation-json-to-mdSkill
- feature-doc-splitterSkill
- frontend-quality-guardrailsSkill
- git-commit-onlySkill
- git-pushing-fastSkill
- git-push-secondary-merge-primarySkill
- git-stepwise-commitSkill
- git-weekly-reportSkill
- linkedinSkill
- logo-design-boardSkill
- mac-software-storage-cleanupSkill
- multi-lang-readmeSkill
- novel-writerSkill
- react-component-hook-guidelinesSkill
- routerbase-api-integrationSkill
- routerbase-media-generationSkill
- routerbase-model-routingSkill
- topic-bookmarks-reorganizerSkill
- tree-ring-memorySkill
- tweetclaw-twitter-automationSkill
- ui-layout-analyzerSkill
- weixin-article-to-obsidianSkill
- xquik-dataSkill
- x-twitter-scraperSkill
- yuque-lakebook-exportSkill
- ax-extract-workflow-cnSkill
- conversation-json-to-md-cnSkill
- feature-doc-splitter-cnSkill
- frontend-quality-guardrails-cnSkill
- git-commit-only-cnSkill
- git-pushing-fast-cnSkill
- git-push-secondary-merge-primary-cnSkill
- git-stepwise-commit-cnSkill
- git-weekly-report-cnSkill
- linkedin-cnSkill
- logo-design-board-cnSkill
- mac-software-storage-cleanup-cnSkill
- multi-lang-readme-cnSkill
- novel-writer-cnSkill
- react-component-hook-guidelines-cnSkill
- routerbase-api-integration-cnSkill
- routerbase-media-generation-cnSkill
- routerbase-model-routing-cnSkill
- topic-bookmarks-reorganizer-cnSkill
- tree-ring-memory-cnSkill
- tweetclaw-twitter-automation-cnSkill
- ui-layout-analyzer-cnSkill
- wechat-theme-extractor-cnSkill
- weixin-article-to-obsidian-cnSkill
- xquik-data-cnSkill
- x-twitter-scraper-cnSkill
- yuque-lakebook-export-cnSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill when the user:
- Distinctive: line 22
Do not use this skill when:
- Very specific: line 29
Run scripts/extract.py to fetch the article HTML and extract the title and js_content.
- Very specific: line 30
Read .extracted_content.html and analyze style traits directly from the HTML.
- Very specific: line 34
If verification succeeds, open markdown-to-wechat.html in the browser for preview.
- Very specific: line 72
When updating markdown-to-wechat.html, follow these rules:
- Very specific: line 75
Search for theme-related objects, arrays, maps, or const assignments before editing.
- Distinctive: line 76
Do not assume a fixed variable name unless it exists in the file.
- Distinctive: line 80
Do not reformat unrelated sections.
- Distinctive: line 82
Add, do not overwrite blindly.
- Distinctive: line 83
If the new theme name does not exist, append a new entry in the existing theme collection.
- Distinctive: line 84
If the same theme name already exists, update only that entry instead of duplicating it.
- Distinctive: line 86
Keep the change scoped.
- Distinctive: line 87
Only touch the theme definition block and any minimal registration hook required to make the theme selectable.
- Distinctive: line 88
Do not modify renderer logic, event handlers, or unrelated UI code unless the file structure requires a minimal wiring change.
- Distinctive: line 92
If the theme block cannot be located safely, stop and report that the target file structure needs manual confirmation.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WeChat Theme Extractor
Overview
Extract layout and style signals from a WeChat Official Account article, then generate a reusable theme for markdown-wechat-converter. The workflow derives typography, colors, spacing, and block styles from the article, writes the generated theme into markdown-to-wechat.html, and supports previewing the result.
When to Use
Use this skill when the user:
- Provides a
mp.weixin.qq.comarticle URL - Wants to extract typography, color, spacing, and block styles from a WeChat article
- Wants a new theme generated for
markdown-wechat-converter - Wants the theme written into
markdown-to-wechat.htmland previewed
Do not use
Do not use this skill when:
- The URL is not a WeChat Official Account article
- The user only wants article text extraction without theme analysis
- The target project does not contain
markdown-wechat-converterormarkdown-to-wechat.html
Instructions
- Run
scripts/extract.pyto fetch the article HTML and extract the title andjs_content. - Read
.extracted_content.htmland analyze style traits directly from the HTML. - Generate a theme object compatible with
markdown-wechat-converter. - Locate
markdown-to-wechat.htmlin the current workspace and inject the new theme without breaking existing theme definitions. - Re-open the file and verify the theme entry was actually written.
- If verification succeeds, open
markdown-to-wechat.htmlin the browser for preview.
Workflow
User provides URL
-> run extractor script
-> produce .extracted_content.html
-> analyze styles
-> generate theme config
-> write into markdown-to-wechat.html
-> verify write result
-> open previewRun the script
python3 scripts/extract.py "https://mp.weixin.qq.com/s/xxxxx"Script responsibilities
The Python script only:
- Fetches article HTML
- Extracts the article title
- Extracts the
js_contentbody fragment - Saves the result to
.extracted_content.html
The AI handles:
- Style analysis
- Theme generation
- Config injection
- Post-write verification
- Preview opening
Injection rules for markdown-to-wechat.html
When updating markdown-to-wechat.html, follow these rules:
- Find the real theme source first.
- Search for theme-related objects, arrays, maps, or
constassignments before editing. - Do not assume a fixed variable name unless it exists in the file.
- Search for theme-related objects, arrays, maps, or
- Preserve the existing structure.
- Match the file's current object style, quote style, indentation, and trailing comma convention.
- Do not reformat unrelated sections.
- Add, do not overwrite blindly.
- If the new theme name does not exist, append a new entry in the existing theme collection.
- If the same theme name already exists, update only that entry instead of duplicating it.
- Keep the change scoped.
- Only touch the theme definition block and any minimal registration hook required to make the theme selectable.
- Do not modify renderer logic, event handlers, or unrelated UI code unless the file structure requires a minimal wiring change.
- Verify after writing.
- Re-read the edited section and confirm the theme key, title, and core style properties are present.
- If the theme block cannot be located safely, stop and report that the target file structure needs manual confirmation.
Example theme snippet
Generate a theme object that matches the target file's existing structure. Use this as a minimal reference shape:
{
id: "wechat-clean-blue",
name: "WeChat Clean Blue",
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"
}
}
}When writing:
- Match the real field names used in
markdown-to-wechat.html - Convert this shape if the target file uses arrays, maps, or nested registration
- Include at minimum the theme key, display name, and core typography styles
Output file
scripts/.extracted_content.html: extracted article body HTML with title and source URL comments at the top
Validation checklist
- The article HTML was fetched successfully
.extracted_content.htmlexists and is not empty- The title and
js_contentwere extracted - The new theme entry exists in
markdown-to-wechat.html - The preview page opens successfully
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

