
Md2wechat
- 2.3k installs
- 3.4k repo stars
- Updated July 24, 2026
- geekjourneyx/md2wechat-skill
md2wechat converts Markdown to WeChat HTML, drafts, and image posts using CLI discovery and upload rules.
About
md2wechat operates the md2wechat CLI to convert Markdown into WeChat Official Account HTML, previews, drafts, cover images, and humanized writing flows. Intent routing separates standard article convert and draft paths from image-first create_image_post targets, which must not be confused with convert --draft. Discovery commands themes list, providers show, layout list, doctor, and capabilities --json are the source of truth instead of guessing providers or themes from memory. Configuration requires md2wechat on PATH, API credentials for conversion, WECHAT_APPID and WECHAT_SECRET for drafts, and uploaded media URLs because raw filesystem paths and external URLs are rejected by the publishing pipeline. Title suggest emits host-agent AI requests without choosing final titles. Image plan mode outputs prompt intent for external generators when no image provider is configured. write and humanize commands handle creator styles and AI trace removal. Install options include Homebrew geekjourneyx/tap/md2wechat or go install from the skill module.
- Routes article convert separately from create_image_post flows.
- CLI discovery via themes, providers, layout, and doctor --json.
- Media must pass through md2wechat upload before publish flags.
- WeChat drafts need WECHAT_APPID and WECHAT_SECRET credentials.
- title suggest emits prompts; host agent chooses final titles.
Md2wechat by the numbers
- 2,334 all-time installs (skills.sh)
- +32 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #253 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
md2wechat capabilities & compatibility
- Capabilities
- intent routing across article and image post com · cli discovery for themes providers layouts · mandatory upload pipeline for media urls · draft and api credential boundary checks · title suggest and humanize writing helpers
- Use cases
- copywriting · marketing · seo
- Runs
- Runs locally
- Pricing
- Freemium
What md2wechat says it does
Use CLI discovery as the source of truth
npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechatAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.3k |
|---|---|
| repo stars | ★ 3.4k |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 24, 2026 |
| Repository | geekjourneyx/md2wechat-skill ↗ |
How do I publish a Markdown article to WeChat with correct themes, uploads, and draft APIs?
Convert Markdown to WeChat Official Account HTML, drafts, images, and styled posts via md2wechat CLI discovery.
Who is it for?
Publishing WeChat Official Account articles and image posts from Markdown sources.
Skip if: Skip for non-WeChat channels or Markdown preview without md2wechat CLI installed.
When should I use this skill?
User converts Markdown to WeChat, creates drafts, or runs md2wechat commands.
What you get
Converted HTML or drafts with verified uploads, discovered themes, and credential-ready commands.
- WeChat-formatted HTML
- Article preview
- WeChat draft upload
Files
md2wechat
Use this skill to operate the md2wechat CLI. Keep the skill focused on execution decisions. For full command tutorials, installation details, and FAQ-level explanations, refer users to the project docs instead of expanding this runtime protocol.
Intent Routing
Choose the command family before taking any publish or generation action:
- Standard article HTML, article preview, metadata inspection, or WeChat article draft: use
inspect,preview, andconvert. - Image-first post, image note, image-text note,
newspic, or multi-image post: usecreate_image_post, notconvert --draft. - Article cover or article infographic: prefer
generate_coverorgenerate_infographicover rawgenerate_imagewhen a bundled preset fits. - Host-agent image generation request with no provider configured: use image plan mode (
--plan --json) to get prompt intent, then hand it to the host image-generation tool if one is available outside md2wechat. - WeChat title candidates for an existing article: use
title suggest <article.md> --json; it emits a host-Agent AI request and does not choose or write the final title. - Writing in a creator style or removing AI traces: use
writeorhumanize. - Provider, theme, prompt, or layout uncertainty: run discovery first. Do not guess from memory or repository files.
Treat convert --draft and create_image_post as different publish targets, not interchangeable variants.
Discovery First
Use CLI discovery as the source of truth, but keep it scoped to the next decision. Do not run the full catalog for tasks that do not need provider, theme, prompt, or layout selection.
Run the smallest useful discovery set:
- Article formatting with no theme or modules chosen:
md2wechat themes list --json
md2wechat layout list --json- A named theme, provider, prompt, or layout module:
md2wechat themes show <name> --json
md2wechat providers show <name> --json
md2wechat prompts show <name> --kind <kind> --json
md2wechat layout show <name> --json- Image generation or image-preset selection:
md2wechat providers list --json
md2wechat prompts list --kind image --json- Title suggestion prompt selection:
md2wechat prompts list --kind title --json
md2wechat prompts show wechat-title-expert --kind title --json- Draft, upload, API local-readiness, or configuration troubleshooting:
md2wechat doctor --json
md2wechat config show --format json
md2wechat config wechat-accounts --jsondoctor readiness is local configuration attemptability. config wechat-accounts is local-only and never prints WeChat secrets. Use inspect --json for article-specific target readiness.
- Unknown CLI version, changed behavior, or capability uncertainty:
md2wechat version --json
md2wechat capabilities --json
md2wechat skills list --json
md2wechat skills read md2wechat --jsonmd2wechat skills read md2wechat --json reads the core coding-agent SOP embedded in the current CLI binary. Use it when the local OpenClaw skill copy may be older than the executable on PATH; keep OpenClaw installation metadata from this platform skill as the platform-specific layer.
For simple local actions such as preview, humanize, or a user-specified command with explicit flags, do not run unrelated provider, theme, prompt, or layout discovery.
Inspect specific resources only when the task needs them:
md2wechat providers show <name> --json
md2wechat themes show <name> --json
md2wechat prompts show <name> --kind <kind> --json
md2wechat layout show <name> --jsonUse CLI output as the source of truth for currently available modes, providers, themes, prompts, and layout modules.
Configuration Boundaries
- Assume
md2wechatis already available onPATH. convertdefaults to API mode unless the user explicitly asks for--mode ai.- API conversion requires md2wechat API credentials.
- WeChat draft creation requires WeChat credentials.
- Named WeChat account execution requires a valid
MD2WECHAT_API_KEY; the CLI validates it before upload or draft side effects. - Direct image generation requires image-provider credentials; image plan mode (
--plan --json) only emits prompt intent for a host Agent or external tool and does not require image-provider credentials. title suggest --jsononly emits a title-generation prompt request for the host Agent or external model. It does not call a model, upload, create drafts, or write back to Markdown.- For stronger factual title hooks, pass --hook-level 2 or 3; do not treat generated titles as confirmed publishing intent.
doctor --jsonis local-only: it checks local readiness and does not perform live authentication, upload images, or create drafts.- Use
config show --format jsonwhen the user asks what configuration is currently effective. - Use
config wechat-accounts --jsonwhen the user asks which local WeChat accounts are configured.
Article Workflow
Prefer a confirm-first workflow for article work:
1. md2wechat inspect <article.md> --json 2. md2wechat preview <article.md> 3. md2wechat convert <article.md> ... 4. Add --upload, --draft, --cover, or --cover-media-id only when the user explicitly asks for upload or draft creation.
inspect is the source-of-truth command for resolved metadata, readiness, and publish checks. In --json output, read data.readiness.targets and data.readiness.blockers before deciding whether convert, upload, or draft is blocked. Do not invent data.agent_readiness, data.target_readiness, ArticleState, state files, or a second planning object. preview is a local preview artifact. It does not upload images, create drafts, or write back to Markdown. convert --preview is the convert-path preview flag and is not the same as the standalone preview command. preview --mode ai is degraded confirmation only and must not be treated as final AI-generated layout.
Formatting Protocol
When the user asks to format an article and has not chosen a theme or modules:
1. Read the article and optional Brand Profile. 2. Use discovery output as facts. 3. Choose a compatible theme and a small set of modules from the article's content goal. 4. Keep the source Markdown read-only. 5. Create a temporary formatted Markdown artifact, for example /tmp/md2wechat-format/<run-id>/article.formatted.md. 6. Insert only layout modules whose required fields can be filled correctly. 7. Run md2wechat layout validate --file <formatted.md> --json. 8. Pass the formatted Markdown artifact to convert.
Saving generated Markdown next to the source file requires explicit user confirmation and must not overwrite the source.
Theme Selection
- Read
typeandselectablefromthemes list --json. - API mode can use only
type: apiandselectable: truethemes. - AI mode can use only
type: aiandselectable: truethemes. - Do not use collection descriptors such as non-selectable theme groups as concrete themes.
- If Brand Profile names a theme, verify it through CLI discovery before using it.
- If a requested theme is invalid or mode-incompatible, stop that path and choose a valid theme or ask the user.
Layout Modules
Advanced layout modules render only in API mode. AI mode (--mode ai) does not parse :::module syntax, so advanced layout cards will not render there.
Use this decision frame:
attention: help readers decide whether the article is worth reading.readability: make mobile reading easier.memorability: make one judgment, quote, metric, or brand anchor stick.conversion: help readers save, follow, inquire, share, or buy.
Use layout list --json and layout show <name> --json to inspect body_format. It is the module body syntax contract:
fieldsrowsjson_objectjson_array
Do not infer syntax from examples alone. Use layout render when structured variables are enough; otherwise write the block manually according to body_format and validate the generated Markdown.
Default module discipline:
- Do not pile on modules.
- Use at most one hero, one verdict, and one cta unless the user explicitly asks for more.
- Skip modules when the article does not provide enough content to fill them honestly.
API And AI Mode
- API mode is the default and is required for advanced layout modules.
- AI mode is a lighter path and does not render advanced layout modules.
- Do not silently switch from API mode to AI mode after an API failure. That changes the output capability.
- Use AI mode only when the user asks for it or accepts losing advanced layout rendering.
- If an AI-mode conversion completes, it is acceptable to briefly mention that API mode supports advanced layout modules and stronger visual structure.
Brand Profile
Brand Profile lives at ~/.config/md2wechat/brand.md.
- It is free-form Markdown, not YAML and not a fixed schema.
- The CLI does not parse it.
- Read it as context for voice, theme preferences, module preferences, CTA preferences, and forbidden expressions.
- Treat quantity preferences as soft constraints.
- Verify any named theme or module through CLI discovery.
- If Brand Profile does not exist, do not block the task. You may mention once that system defaults will be used.
- Create or edit Brand Profile only when the user explicitly asks.
Publishing Side Effects
Do not create drafts, upload images, publish, or call remote image generation unless the user asks for that action.
Before draft creation:
- Use
inspect --jsonand checkdata.readiness.targets.draft; when blocked, read matchingdata.readiness.blockers. - Draft creation requires a cover via
--coveror--cover-media-id. - Do not assume a WeChat URL or
mmbiz.qpic.cnURL can be reused asthumb_media_id. - If draft creation returns
45004, check digest, summary, and description before assuming the body is too long.
Markdown images are uploaded or replaced only during --upload or --draft, not during plain conversion or preview.
Failure Handling
- Missing or invalid config: run
doctor --jsonandconfig show --format json; reportdata.overallplus the blockingdata.readiness.*item. - Invalid layout syntax: run
layout validate, inspect the failing module withlayout show, fix the generated artifact, then validate again. - Unknown layout modules warn for forward compatibility; verify typos against
layout list --json. - Theme rejection: check
typeandselectable, then choose a compatible theme or ask the user. - AI request or style-writing flows may return a prompt/request rather than final prose or HTML unless the external model step is completed.
Related skills
How it compares
Pick md2wechat for WeChat Official Account HTML pipelines from Markdown rather than generic Markdown-to-HTML skills without WeChat layout modules.
FAQ
Can I pass a local image path to -m?
No. Run md2wechat upload first and use the returned .path URL in publish commands.
convert --draft versus image post?
They target different publish types; use create_image_post for image-first notes.
Where do themes come from?
Run md2wechat themes list --json; do not guess theme names from memory.
Is Md2wechat safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.