WeChat Styler converts Markdown into paste-ready WeChat HTML with inline styles, eight crafted themes, and a deterministic compatibility validation gate.

Stars

23

7-day growth

No data

Forks

1

Open issues

0

License

MIT

Last updated

2026-07-17

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It solves the fragile Markdown-to-WeChat conversion problem by enforcing WeChat compatibility via script (not guesswork), providing thematic YAML-based theming that doesn't require code changes, and offering optional structured components without relying on tables.

Who it is for

  • WeChat official account editors who write in Markdown
  • Technical writers publishing articles to WeChat
  • Developers building automated WeChat content pipelines
  • Content teams needing consistent, branded WeChat layouts

Use cases

  • Converting a finished Markdown article to WeChat HTML with a theme like magazine-ink
  • Batch converting multiple Markdown files into WeChat-compatible HTML
  • Validating an existing HTML file against WeChat's editor restrictions
  • Creating a custom brand theme by copying and modifying a YAML theme file

Strengths

  • All styles are inlined and backgrounds are solid hex for zero format loss when pasting
  • Eight distinct themes with real typographic personality, not just color swaps
  • Deterministic validation script (`validate.mjs`) that catches everything WeChat strips, with line-numbered reports
  • Themes are YAML files that can be added or customized without modifying code

Considerations

  • Requires Node.js 18+ and the `marked`, `js-yaml`, `glob` dependencies
  • Repository is a generated mirror; contributions and issues are in the canonical source repo
  • The built-in brand theme is included as a worked example, not a product recommendation, so users must create their own branding

README quick start

[!IMPORTANT] This repository is a generated compatibility mirror. The editable source, Issues, and contributions live in zjp1997720/zhijian-skills.

WeChat Styler

Turn Markdown into paste-ready WeChat HTML with crafted themes, deterministic validation, and zero external CSS.

简体中文 · Canonical source · Standalone mirror

Use it when an article is finished in Markdown and needs a stable, branded, paste-ready WeChat layout.

Agent Install

npx skills add zjp1997720/wechat-styler -g -a codex --skill wechat-styler -y

Works with any agent runtime that loads SKILL.md (Codex, Claude Code, OpenCode, etc.).

Requirements

  • Node.js 18+
  • marked, js-yaml, glob (auto-installed by the skill runtime or npm install)

What It Does

  • Markdown → WeChat HTML in one step. All styles inlined, all backgrounds solid hex, paste straight into the editor — no format loss.
  • 8 themes with real typographic personality. Not color swaps. magazine-ink is a classic editorial layout; magazine-indigo is a research column with uppercase headings; magazine-forest is a field note with centered kaishu titles. Each theme has its own heading structure, quote style, list marker, and code block.
  • Optional component layer (--components). 6 structured components (keyquote, callout, warning, steps, flow cards, compare cards) for visualizing comparisons, flows, and key points. Off by default — pure markdown rendering for 90% of cases; opt in when you need structured presentation. All components use section + flex, no tables (WeChat editor adds grey borders to tables).
  • Deterministic compatibility gate. validate.mjs scans the output for everything WeChat strips (``, class, rgba(), position:fixed, @media…) and prints a line-numbered report. The rules are enforced by script, not by the model remembering them.
  • Placeholder mechanism. Write 【插入:screenshot】 on its own line while images aren't ready; it renders as a dashed placeholder box. Replace it with a normal Markdown image link when the asset lands.

How It Works

Three pieces, each with one job:

  1. scripts/convert.mjs — parses Markdown via marked, applies a theme-specific renderer (6 renderer presets backing 8 themes), emits fully inlined HTML.
  2. scripts/components.mjs

Description

Turn Markdown into paste-ready, inline-styled HTML for WeChat Official Account. 10 themes, deterministic validation, placeholder support.

Related repositories

Similar projects matched by category, topics, and programming language.

7-e1even
Featured
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI & Machine LearningLarge Language Models
218
makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
S40911120
Featured
S40911120 GitHub avatar

recensa

Recensa is a self-hosted web viewer that indexes Claude Code session transcripts into a local SQLite database, enabling full-text search, replay, and audit of all past agent conversations without uploading data anywhere.

AI & Machine LearningLarge Language Models
67