MCPInstall

wechat-theme-extractor

Use when extracting visual styles from a WeChat article and generating a markdown-wechat-converter theme.

Installs
51
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/yangsonhung/awesome-agent-skills --skill wechat-theme-extractor
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads wechat-theme-extractor automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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.com article 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.html and 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-converter or markdown-to-wechat.html

Instructions

  1. Run scripts/extract.py to fetch the article HTML and extract the title and js_content.
  2. Read .extracted_content.html and analyze style traits directly from the HTML.
  3. Generate a theme object compatible with markdown-wechat-converter.
  4. Locate markdown-to-wechat.html in the current workspace and inject the new theme without breaking existing theme definitions.
  5. Re-open the file and verify the theme entry was actually written.
  6. If verification succeeds, open markdown-to-wechat.html in 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 preview

Run 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_content body 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:

  1. Find the real theme source first.

    • Search for theme-related objects, arrays, maps, or const assignments before editing.
    • Do not assume a fixed variable name unless it exists in the file.
  2. Preserve the existing structure.

    • Match the file's current object style, quote style, indentation, and trailing comma convention.
    • Do not reformat unrelated sections.
  3. 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.
  4. 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.
  5. 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.html exists and is not empty
  • The title and js_content were extracted
  • The new theme entry exists in markdown-to-wechat.html
  • The preview page opens successfully

FAQ

What does the wechat-theme-extractor skill do?

Use when extracting visual styles from a WeChat article and generating a markdown-wechat-converter theme.

How do I install wechat-theme-extractor?

Run npx skills add https://github.com/yangsonhung/awesome-agent-skills --skill wechat-theme-extractor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/wechat-theme-extractor/ (personal) or .claude/skills/wechat-theme-extractor/ (project).

Which AI agents can use wechat-theme-extractor?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is wechat-theme-extractor safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains wechat-theme-extractor?

It is published by yangsonhung in yangsonhung/awesome-agent-skills. It has 51 recorded installs.

More from yangsonhung/awesome-agent-skills

View all →

novel-writer-cn

yangsonhung/awesome-agent-skills

当用户需要创作、续写、修改小说,或设计角色和世界观时使用。

Docs & Writing2.3K installs

novel-writer

yangsonhung/awesome-agent-skills

Use when writing, continuing, revising, or planning novels, characters, and fictional worlds.

Docs & Writing605 installs

topic-bookmarks-reorganizer-cn

yangsonhung/awesome-agent-skills

当用户需要按主题整理浏览器书签导出、URL 去重并生成可导入 HTML 时使用。

mac-software-storage-cleanup

yangsonhung/awesome-agent-skills

Use when auditing macOS app storage, cleaning priority caches, or recommending reclaimable disk space.

AI & Agents68 installs

conversation-json-to-md

yangsonhung/awesome-agent-skills

Use when converting chat export JSON into per-conversation Markdown files with preserved user-assistant Q/A and normalized headings.

AI & Agents64 installs

topic-bookmarks-reorganizer

yangsonhung/awesome-agent-skills

Use when reorganizing a browser bookmarks export by topic, deduplicating URLs, and producing an importable HTML file.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs