agentsclimarketplace

Md2wechat lite

Skill geekjourneyx/md2wechat-lite/skills/md2wechat-lite

๐Ÿ“ md2wechat Lite | ่ฝป้‡็‰ˆๅพฎไฟกๅ…ฌไผ—ๅท Markdown ๆŽ’็‰ˆ CLI๏ผŒๅ…่ดนๅผ€ๆบ

Install
npx -y skills add geekjourneyx/md2wechat-lite --skill md2wechat-lite

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Manages md2wx CLI for converting Markdown to WeChat Official Account drafts. Use when working with WeChat article publishing, Markdown to HTML conversion, or WeChat media upload.

SKILL.md

3.5 KB, as published. Nobody here has run it

md2wx - Markdown to WeChat

CLI tool for converting Markdown to WeChat Official Account formatted drafts.

Quick start

Install:

curl -fsSL https://raw.githubusercontent.com/geekjourneyx/md2wechat-lite/main/cli/scripts/install.sh | sh

Configure credentials:

md2wx config set wechat-appid "wx123..."
md2wx config set wechat-appsecret "your_secret"
md2wx config set api-key "wme_your_key"

Commands

CommandPurpose
article-draftCreate article draft from Markdown
newspic-draftCreate Xiaolvshu (image card) draft
batch-uploadUpload images to WeChat CDN
themes listList available themes
configManage settings (set/get/list/path)

Article draft

Convert Markdown to WeChat article:

md2wx article-draft --file article.md --theme bytedance --cover-image "https://cdn.example.com/cover.jpg"

Or pass inline Markdown:

md2wx article-draft --markdown "# Title\n\nContent" --theme elegant-red --cover-image "https://cdn.example.com/cover.jpg"

Note:

  • article-draft does not read from stdin pipe directly.
  • For API compatibility, always provide --cover-image with a public URL.

Newspic draft

Create image-rich card drafts:

md2wx newspic-draft --title "ๆ ‡้ข˜" --content "ๅ†…ๅฎน" --images "https://cdn.example.com/img1.jpg,https://cdn.example.com/img2.png"

Batch upload

Upload images and get WeChat CDN URLs:

md2wx batch-upload --images "https://cdn.example.com/a.jpg,https://cdn.example.com/b.jpg"

Image input constraints:

  • API accepts public image URLs only.
  • Local file paths and glob patterns are not supported.

Themes

Built-in (6): default, bytedance, chinese, apple, sports, cyber

Template (32): {minimal|focus|elegant|bold}-{gold|green|blue|orange|red|navy|gray|sky}

List/search themes:

md2wx themes list [--verbose] [--search query]

For theme descriptions: See cli/pkg/themes/list.go

Configuration

Config file: ~/.md2wx/config.yaml (stored as key=value lines)

Priority: Command args > Environment vars > Config file > Defaults

Environment variables:

  • MD2WX_WECHAT_APPID
  • MD2WX_WECHAT_APPSECRET
  • MD2WX_API_KEY
  • MD2WX_API_BASE_URL
  • MD2WX_DEFAULT_THEME
  • MD2WX_BACKGROUND_TYPE
  • MD2WX_FONT_SIZE

Project structure

cli/
โ”œโ”€โ”€ main.go              # Root command
โ”œโ”€โ”€ article-draft.go     # Article draft
โ”œโ”€โ”€ newspic-draft.go     # Xiaolvshu draft
โ”œโ”€โ”€ batch-upload.go      # Image upload
โ”œโ”€โ”€ config.go            # Config management
โ”œโ”€โ”€ themes.go            # Theme list command
โ””โ”€โ”€ pkg/
    โ”œโ”€โ”€ api/client.go    # HTTP API client
    โ”œโ”€โ”€ config/          # Config file I/O
    โ”œโ”€โ”€ themes/          # Theme definitions
    โ””โ”€โ”€ output/          # JSON formatter

Output format

All commands output JSON:

{
  "success": true,
  "data": { "media_id": "...", "url": "..." }
}

Implementation details

  • Zero dependencies (except cobra): Manual key=value config parsing
  • Go 1.24+ required
  • Single binary distribution

See source files for:

  • API client: cli/pkg/api/client.go
  • Config handling: cli/pkg/config/config.go
  • Theme list: cli/pkg/themes/list.go

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.