Skip to content
Back to skills

Md2wechat Lite

CSecurity

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.

  • 87 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
toolsgobashgitapi

Works with

  • cli
  • api

Security analysis

C71/100
  • criticalPipes output to a shell interpreter
  • mediumUses curl or wget to download content
  • criticalDownloads and executes remote scripts — classic supply chain attack

Pro shows the line behind each finding and how to fix it

Scanned May 27, 2026

npx -y skills add geekjourneyx/md2wechat-lite --skill md2wechat-lite --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Md2wechat Lite?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Md2wechat Lite
[![Security: C — Skills Directory](https://www.skillsdirectory.com/api/skills/geekjourneyx-md2wechat-lite/badge)](https://www.skillsdirectory.com/skills/geekjourneyx-md2wechat-lite)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: md2wechat-lite
description: 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.
---

# md2wx - Markdown to WeChat

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

## Quick start

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

**Configure credentials**:
```bash
md2wx config set wechat-appid "wx123..."
md2wx config set wechat-appsecret "your_secret"
md2wx config set api-key "wme_your_key"
```

## Commands

| Command | Purpose |
|---------|---------|
| `article-draft` | Create article draft from Markdown |
| `newspic-draft` | Create Xiaolvshu (image card) draft |
| `batch-upload` | Upload images to WeChat CDN |
| `themes list` | List available themes |
| `config` | Manage settings (set/get/list/path) |

## Article draft

Convert Markdown to WeChat article:

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

Or pass inline Markdown:
```bash
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:

```bash
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:

```bash
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:
```bash
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:
```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`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.