### Install md2wechat CLI and Skill (Install Script alternative) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Alternative commands for installing the md2wechat CLI using the release script, followed by skill installation. ```bash curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install.sh | bash npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat ``` -------------------------------- ### Install md2wechat CLI and Skill (Go alternative) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Alternative commands for installing the md2wechat CLI using Go, followed by skill installation. ```bash go install github.com/geekjourneyx/md2wechat-skill/cmd/md2wechat@v2.4.0 npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat ``` -------------------------------- ### Install md2wechat using installation script (macOS/Linux) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Download and execute the installation script for Linux or macOS to install a specific release version. The script downloads the release asset and verifies checksums. ```bash curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install.sh | bash ``` -------------------------------- ### Install md2wechat CLI and Skill (npm alternative) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Alternative commands for installing the md2wechat CLI using npm, followed by skill installation. ```bash npm install -g @geekjourneyx/md2wechat npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat ``` -------------------------------- ### Install md2wechat using installation script (Windows PowerShell) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Use this PowerShell command to install md2wechat on Windows. It sets the release URL and executes the PowerShell installer script. ```powershell $env:MD2WECHAT_RELEASE_BASE_URL = "https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0" iex ((New-Object System.Net.WebClient).DownloadString("$env:MD2WECHAT_RELEASE_BASE_URL/install.ps1")) ``` -------------------------------- ### Manual Installation of OpenCLAW Skill and CLI Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/OPENCLAW.md Provides step-by-step instructions for manually downloading release assets, extracting the skill package, and installing the CLI to the user's environment path. ```bash # 1. Download fixed version release assets VERSION=2.4.0 # Choose the corresponding binary for your platform, here using Linux amd64 as an example curl -LO https://github.com/geekjourneyx/md2wechat-skill/releases/download/v${VERSION}/md2wechat-openclaw-skill.tar.gz curl -LO https://github.com/geekjourneyx/md2wechat-skill/releases/download/v${VERSION}/md2wechat-linux-amd64 curl -LO https://github.com/geekjourneyx/md2wechat-skill/releases/download/v${VERSION}/checksums.txt sha256sum -c checksums.txt --ignore-missing # 2. Extract and copy the skill directory mkdir -p /tmp/md2wechat-openclaw tar -xzf md2wechat-openclaw-skill.tar.gz -C /tmp/md2wechat-openclaw mkdir -p ~/.openclaw/skills cp -r /tmp/md2wechat-openclaw/skills/md2wechat ~/.openclaw/skills/ # 3. Install CLI to user environment path mkdir -p ~/.local/bin install -m 0755 md2wechat-linux-amd64 ~/.local/bin/md2wechat export PATH="$HOME/.local/bin:$PATH" ``` -------------------------------- ### Minimal md2wechat Configuration Example Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/OPENCLAW.md A minimal example of the md2wechat configuration file, showing the required fields for WeChat public account credentials. ```yaml wechat: appid: "YourAppID" secret: "YourSecret" ``` -------------------------------- ### Install md2wechat via Go install Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Install md2wechat using the Go toolchain if you have a Go environment set up. This is an alternative method for Go developers. ```bash go install github.com/geekjourneyx/md2wechat-skill/cmd/md2wechat@v2.4.0 ``` -------------------------------- ### One-Click Script Installation for OpenCLAW Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/OPENCLAW.md Installs both the OpenCLAW skill package and the md2wechat CLI using a single script. This is suitable for users who haven't installed ClawHub and ensures a fixed version installation. ```bash curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install-openclaw.sh | bash ``` -------------------------------- ### AI Mode vs API Mode Conversion Commands Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md Compares AI mode (free) and API mode (paid) for article conversion and shows example commands for each. ```bash # AI 模式(--mode ai,不需要 API Key) md2wechat convert article.md --mode ai --theme autumn-warm --preview # API 模式(默认,需要 API Key) md2wechat convert article.md --preview ``` -------------------------------- ### Install md2wechat CLI and Skill Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md Instructions for installing the md2wechat command-line interface and its corresponding skill for use in coding agents like Claude Code. ```bash # 安装 CLI(先装这个) brew install geekjourneyx/tap/md2wechat # 安装 skill(Claude Code / Codex / OpenCode) npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat ``` -------------------------------- ### Install md2wechat via Homebrew Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Use this command to install md2wechat on macOS or Linux if you have Homebrew installed. It installs the CLI itself by downloading pre-compiled assets. ```bash brew install geekjourneyx/tap/md2wechat ``` -------------------------------- ### Install OpenCLAW md2wechat Skill Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/OPENCLAW.md Installs the OpenCLAW-specific md2wechat skill package using ClawHub. This method primarily installs the skill shell and may not automatically install the md2wechat CLI. ```bash # Install OpenCLAW-specific md2wechat skill package npx clawhub@latest install md2wechat ``` -------------------------------- ### Verify md2wechat installation Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Run these commands to verify that md2wechat has been installed correctly and is accessible in your PATH. ```bash # 查看帮助 md2wechat version --json md2wechat --help # 查看所有命令 md2wechat help ``` -------------------------------- ### Check npm Registry Configuration Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Verify the current npm registry being used and troubleshoot 404 errors during installation. ```bash npm config get registry ``` -------------------------------- ### Verify md2wechat installation from local path Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md If the md2wechat command is not found in your PATH, you can verify the installation by directly executing the binary from its installation directory. ```bash ~/.local/bin/md2wechat version --json ~/.local/bin/md2wechat --help ``` -------------------------------- ### Install md2wechat via NPM using official registry Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md If your npm registry is set to a mirror that might be temporarily out of sync, use this command to install from the official npm registry. ```bash npm install -g @geekjourneyx/md2wechat --registry=https://registry.npmjs.org/ ``` -------------------------------- ### Install OpenClaw md2wechat Skill and CLI Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md A prompt to send to AI assistants for installing the OpenClaw version of md2wechat, including CLI and skill verification. ```text 请帮我安装 OpenClaw 版 md2wechat,并验证 skill 和 CLI 都可用。 执行: 1. curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install-openclaw.sh | bash 2. 先执行:export PATH="$HOME/.local/bin:$PATH" 3. md2wechat version --json 4. md2wechat config init 5. md2wechat config validate 6. md2wechat capabilities --json 如果失败,请继续排查 ~/.openclaw/skills/md2wechat/ 和 `command -v md2wechat`,不要只给我报错。 ``` -------------------------------- ### Download and install md2wechat binary (Linux/macOS) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Manually download the pre-compiled binary for Linux or macOS, verify its checksum, make it executable, and move it to a directory in your PATH. ```bash VERSION=v2.4.0 ASSET=md2wechat-linux-amd64 # macOS 请改成 md2wechat-darwin-amd64 或 md2wechat-darwin-arm64 curl -LO https://github.com/geekjourneyx/md2wechat-skill/releases/download/${VERSION}/${ASSET} curl -LO https://github.com/geekjourneyx/md2wechat-skill/releases/download/${VERSION}/checksums.txt sha256sum -c checksums.txt --ignore-missing # 2. 添加执行权限 chmod +x "${ASSET}" # 3. 移动到 PATH sudo mv "${ASSET}" /usr/local/bin/md2wechat # 4. 验证 md2wechat version --json ``` -------------------------------- ### Add md2wechat to PATH Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Manually add the local binary directory to your system's PATH environment variable and verify the installation. ```bash export PATH="$HOME/.local/bin:$PATH" md2wechat version --json ``` -------------------------------- ### Show Module Specification Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Retrieve the full specification for a layout module, including its body format, fields, and examples. Use --json for machine-readable output. ```bash md2wechat layout show hero --json ``` ```bash md2wechat layout show callout --json ``` -------------------------------- ### Install md2wechat globally via NPM Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Install md2wechat globally using NPM if you have Node.js and npm installed. This method is suitable for users who manage CLIs with npm and want to avoid local Go compilation. ```bash npm install -g @geekjourneyx/md2wechat ``` -------------------------------- ### Verify OpenClaw md2wechat Installation Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Commands to verify the installation of the md2wechat CLI and its configuration for OpenClaw. ```bash export PATH="$HOME/.local/bin:$PATH" md2wechat version --json md2wechat config init md2wechat config validate md2wechat capabilities --json ``` -------------------------------- ### List Available Providers Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Get a list of all available providers that md2wechat can interact with. Use --json for structured output. ```bash md2wechat providers list --json ``` -------------------------------- ### Install md2wechat CLI and Skill for Claude Code Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md A sequence of commands to install the md2wechat CLI and its corresponding skill for coding agents like Claude Code. ```bash brew install geekjourneyx/tap/md2wechat npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat ``` -------------------------------- ### Full Scenario C: Debugging Typography Issues Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md A step-by-step process for debugging typography-related problems, including validation, inspecting module specifications, rendering examples, and re-validating after fixes. ```bash # 1. 验证语法并查看具体错误 md2wechat layout validate --file article.md --json # 2. 查看失败模块的规范 md2wechat layout show --json # 3. 查看模块渲染示例 md2wechat layout render --var KEY=VALUE # 4. 修复文件中的语法错误 # 5. 重新验证 md2wechat layout validate --file article.md --json # 6. 转换并预览 md2wechat convert article.md --mode api --output output.html md2wechat preview article.md --output preview.html ``` -------------------------------- ### Hello WeChat Function Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/examples/article.md A simple Go function that prints 'Hello, WeChat!' to the console. This is a basic example of Go syntax. ```go func hello() { fmt.Println("Hello, WeChat!") } ``` -------------------------------- ### Agent Dialogue Script for OpenCLAW Installation Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/OPENCLAW.md A script to be sent to an AI agent (OpenCLAW, Claude, GPT) to automate the installation and verification of the OpenCLAW md2wechat skill and CLI. ```text Please help me install the OpenCLAW version of md2wechat and verify that both the skill and CLI are usable. Execute the following commands in order: 1. curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install-openclaw.sh | bash 2. First execute: export PATH="$HOME/.local/bin:$PATH" 3. md2wechat version --json 4. md2wechat config init 5. md2wechat config validate 6. md2wechat capabilities --json 7. If I have previously installed the skill, please also check if ~/.openclaw/skills/md2wechat/ exists and confirm that `command -v md2wechat` produces output. If any step fails, please continue to troubleshoot and provide the next corrective command, do not just return the error message. ``` -------------------------------- ### Instructions for Claude Code/Codex/OpenCode Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md A prompt to send to AI coding assistants to install md2wechat CLI and skill, including verification steps. ```text 请先安装 md2wechat CLI,再安装 md2wechat skill,并验证版本和能力发现都正常。 执行: 1. 如果我是 mac 用户,先运行:brew install geekjourneyx/tap/md2wechat 2. 如果我已经有稳定可用的 Go 环境,也可以改成:go install github.com/geekjourneyx/md2wechat-skill/cmd/md2wechat@v2.4.0 3. 如果以上两种都不适合,再运行:curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install.sh | bash 4. 运行:npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat 5. 如果我是通过 install.sh 安装的,再执行:export PATH="$HOME/.local/bin:$PATH" 6. md2wechat version --json 7. md2wechat capabilities --json 8. md2wechat config init 如果失败,请继续排查,不要只返回错误原文。 ``` -------------------------------- ### Build Project Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Command to build the project. ```bash make build ``` -------------------------------- ### Natural Language Commands for Claude Code Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md Examples of natural language commands that can be used to drive md2wechat functionality within Claude Code after the skill is installed. ```text "把 article.md 转换为微信格式,用 elegant-gold 主题,生成封面图,推送到草稿箱" "帮我用 inspect --json 检查 data.readiness.targets/blockers,然后预览一下排版效果" ``` -------------------------------- ### Full Scenario B: User with Full Config, Quick Publishing Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md A streamlined workflow for users who have complete configuration and a Brand Profile, focusing on rapid article conversion and publishing. ```bash # 1. 验证排版语法 md2wechat layout validate --file /tmp/md2wechat-format//article.formatted.md --json # 2. 转换(复用当前主题和配置) md2wechat convert /tmp/md2wechat-format//article.formatted.md --output output.html # 3. 预览 md2wechat preview /tmp/md2wechat-format//article.formatted.md # 4. 一键创建草稿和发布 md2wechat convert /tmp/md2wechat-format//article.formatted.md \ --draft \ --cover ./cover.jpg \ --theme bytedance ``` -------------------------------- ### Full Scenario D: Switching Theme or Provider Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Instructions for changing the article's theme or image provider. It includes commands to list available options and how to apply them during conversion. ```bash # 1. 查看可用主题 md2wechat themes list --json # 2. 使用新主题转换 md2wechat convert article.md --theme minimal-blue --output output.html # 3. 查看可用 Provider md2wechat providers list --json # 4. 更新配置或环境变量以切换 Provider export IMAGE_PROVIDER=tuzi export IMAGE_API_KEY=your_api_key # 5. 重新转换 md2wechat convert article.md --output output.html ``` -------------------------------- ### List Layout Modules Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Display a list of available layout modules. Use the --json flag for structured output suitable for scripting. ```bash md2wechat layout list --json ``` -------------------------------- ### Uninstall md2wechat installed via Go toolchain Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Remove the md2wechat executable from your Go bin path if you installed it using `go install`. ```bash rm $(go env GOPATH)/bin/md2wechat ``` -------------------------------- ### Run All Tests Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Command to run all tests, setting a specific cache directory for Go builds. ```bash GOCACHE=/tmp/md2wechat-go-build go test ./... ``` -------------------------------- ### Compile md2wechat from source Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Clone the repository and use the Go toolchain to build the md2wechat executable from the source code. ```bash git clone https://github.com/geekjourneyx/md2wechat-skill.git cd md2wechat-skill go build -o md2wechat ./cmd/md2wechat ``` -------------------------------- ### 使用新风格的命令行示例 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/writers/README.md 创建配置文件后,可以通过命令行或自然语言指令来使用新的写作风格。 ```bash # CLI 命令 md2wechat write --style my-style # 自然语言 "用 my-style 风格写一篇文章" ``` -------------------------------- ### Full Scenario A: First Article, No Config/Brand Profile Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md A comprehensive workflow for a user publishing their first article without prior configuration or a Brand Profile. It covers discovery, initialization, validation, conversion, and preview steps. ```bash # 1. 发现本次任务需要的能力 md2wechat doctor --json md2wechat themes list --json md2wechat layout list --json # 2. 检查并初始化配置 md2wechat config show --format json # 如果缺少关键配置,提示用户运行 md2wechat config init # 3. Brand Profile 不存在时非阻塞提示一次,继续任务 # 4. 复制原文到临时 Markdown,插入 layout render 生成的模块后验证 md2wechat layout validate --file /tmp/md2wechat-format//article.formatted.md --json # 5. 转换临时排版稿 md2wechat convert /tmp/md2wechat-format//article.formatted.md --output output.html # 6. 预览临时排版稿 md2wechat preview /tmp/md2wechat-format//article.formatted.md # 7. 检查发布就绪 md2wechat inspect /tmp/md2wechat-format//article.formatted.md --draft --cover ./cover.jpg --json # 继续前确认 data.readiness.targets.draft 不是 blocked;如 blocked,读取 data.readiness.blockers # 8. 创建草稿 md2wechat convert /tmp/md2wechat-format//article.formatted.md \ --draft \ --cover ./cover.jpg \ --output draft.html ``` -------------------------------- ### View Current Version Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Command to display the current version of the project. ```bash cat VERSION ``` -------------------------------- ### Uninstall md2wechat installed via pre-compiled binary (Linux/macOS) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Remove the md2wechat executable from `/usr/local/bin` if you installed it manually on Linux or macOS. ```bash sudo rm /usr/local/bin/md2wechat ``` -------------------------------- ### ClawHub Manual Publish Reminder Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Instructions for manual ClawHub publishing if automatic publishing fails. ```bash ClawHub 发布跳过。如需手动发布,请稍后执行: clawhub login clawhub publish ./platforms/openclaw/md2wechat --slug md2wechat --version {VERSION} --tags latest ``` -------------------------------- ### Initialize Brand Profile Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Command to initialize a new Brand Profile. This is used when the 'BRAND_NOT_FOUND' error occurs and a profile needs to be set up. ```bash md2wechat brand init ``` -------------------------------- ### Preview Article Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Generate a preview of a Markdown article. This command is useful for quickly checking the rendered output. ```bash md2wechat preview article.md ``` -------------------------------- ### Add local bin to PATH on macOS/Linux Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md If the md2wechat command is not found after installation via script on macOS or Linux, you might need to add the default installation directory to your PATH. ```bash export PATH="$HOME/.local/bin:$PATH" ``` -------------------------------- ### List Prompt Templates Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md View all available prompt templates. The --json flag ensures the output is in a machine-readable format. ```bash md2wechat prompts list --json ``` -------------------------------- ### Upgrade md2wechat via Homebrew Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Use this command to upgrade an existing md2wechat installation managed by Homebrew. ```bash brew upgrade geekjourneyx/tap/md2wechat ``` -------------------------------- ### Inspect Article Metadata for Publishing Readiness Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Inspect a Markdown article to check its metadata and readiness for publishing. The output is in JSON format and includes readiness status and detailed checks. ```bash md2wechat inspect article.md --json ``` -------------------------------- ### Coding Agent Support Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md Instructions for installing and using the md2wechat skill within Coding Agents like Claude Code. ```APIDOC ## Coding Agent Support md2wechat is a CLI-first tool, naturally suited for integration into Coding Agents. ```bash # Install the CLI (install this first) brew install geekjourneyx/tap/md2wechat # Install the skill (Claude Code / Codex / OpenCode) npx skills add https://github.com/geekjourneyx/md2wechat-skill --skill md2wechat ``` After installation, drive md2wechat with natural language in Claude Code: ``` "Convert article.md to WeChat format, use elegant-gold theme, generate a cover image, and push to the draft box" "Help me check data.readiness.targets/blockers using inspect --json, then preview the layout effect" ``` ### Supported Platforms | Platform | Skill Path | Installation Documentation | |---|---|---| | Claude Code / Codex / OpenCode | `skills/md2wechat/` | `npx skills add ...` | | Obsidian (Claudian Plugin) | `~/.claude/skills/` | [docs/OBSIDIAN.md](docs/OBSIDIAN.md) | | OpenClaw | `platforms/openclaw/md2wechat/` | [docs/OPENCLAW.md](docs/OPENCLAW.md) | OpenClaw users can install directly via ClawHub: [clawhub.ai/geekjourneyx/md2wechat](https://clawhub.ai/geekjourneyx/md2wechat) ```bash curl -fsSL https://github.com/geekjourneyx/md2wechat-skill/releases/download/v2.4.0/install-openclaw.sh | bash ``` ``` -------------------------------- ### Show Module Specifications Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Commands to display the complete specifications for various typography modules in JSON format. Useful for understanding the expected parameters and structure for each module. ```bash md2wechat layout show hero --json md2wechat layout show verdict --json md2wechat layout show callout --json ``` -------------------------------- ### 初始化 md2wechat 配置文件 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/WECHAT-CREDENTIALS.md 运行此命令以生成 md2wechat 的默认配置文件。配置文件通常位于 `~/.config/md2wechat/config.yaml`。 ```bash md2wechat config init ``` -------------------------------- ### Create GitHub Release Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Steps to create a GitHub Release by pushing a tag. GitHub Actions automatically handles the release creation and smoke testing. ```bash # 创建 GitHub Release(推 tag 后 GitHub Actions 自动创建,无需 gh CLI) git tag v{VERSION} git push origin main --tags # → GitHub Actions release.yml 自动触发:构建 → smoke 测试 → 创建 Release ``` -------------------------------- ### Natural Language Prompt for Claude Code Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md An example of how to use natural language within Claude Code to achieve the article generation and publishing workflow. ```text "用 Dan Koe 风格写一篇关于 AI 时代独立开发者的文章,生成封面,推送到微信草稿箱" ``` -------------------------------- ### View Current Configuration Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Displays the currently parsed configuration settings in JSON format. Useful for debugging configuration-related problems. ```bash md2wechat config show --format json ``` -------------------------------- ### 测试新风格的命令行示例 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/writers/README.md 提供了用于测试新风格的命令行指令,包括列出所有风格、查看风格详情以及进行写作测试。 ```bash # 列出所有风格 md2wechat styles # 查看风格详情 md2wechat styles --detail my-style # 测试写作 md2wechat write --style my-style --input-type idea ``` -------------------------------- ### 测试创建微信草稿 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/WECHAT-CREDENTIALS.md 使用此命令测试 `test-draft` 功能,并以 JSON 格式输出结果。用于验证图片上传和草稿创建流程。 ```bash md2wechat test-draft ./article.html ./cover.png --json ``` -------------------------------- ### Preview Article Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Generate a preview of the article in HTML format. The preview can be opened in a browser to review the appearance before publishing. ```bash md2wechat preview article.md ``` ```bash md2wechat preview article.md --output /path/to/preview.html ``` -------------------------------- ### Show Module Specification Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Display the specification for a specific layout module. The --json flag provides structured details about the module. ```bash md2wechat layout show hero --json ``` -------------------------------- ### Integrate Humanize with Write Command (Authentic Intensity) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/HUMANIZE.md Generates an article and then applies humanization with 'authentic' intensity. This aims to produce content that reads like it was written by a skilled human, focusing on writing quality dimensions. ```bash md2wechat write --style dan-koe --humanize=authentic article.md ``` -------------------------------- ### Test Module Rendering Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Commands to test the rendering of specific modules with provided variables. This helps in verifying how modules will appear before full conversion. ```bash md2wechat layout render callout --var 'rows=[["测试内容"]]' --json md2wechat layout render cta --var title="立即订阅" --var note="持续更新" --json ``` -------------------------------- ### 测试上传单张图片 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/WECHAT-CREDENTIALS.md 使用此命令测试 `upload_image` 功能,并以 JSON 格式输出结果。这是验证微信凭证和 IP 白名单配置的初步步骤。 ```bash md2wechat upload_image ./cover.png --json ``` -------------------------------- ### Show Changes and Output to File Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/HUMANIZE.md Combines the functionality to view detailed changes with the ability to save the humanized output to a file. This provides a comprehensive way to process and review the rewritten content. ```bash md2wechat humanize article.md --show-changes -o article-humanized.md ``` -------------------------------- ### Test Module Rendering Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Render a specific layout module with provided variables. The --json flag returns the rendering result in a structured format. ```bash md2wechat layout render callout --var 'rows=[["test"]]' --json ``` -------------------------------- ### Integrate Humanize with Write Command (Aggressive Intensity) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/HUMANIZE.md Generates an article and then applies humanization with 'aggressive' intensity. This is useful when the initial AI generation is expected to have significant AI-like characteristics. ```bash md2wechat write --style dan-koe --humanize=aggressive article.md ``` -------------------------------- ### Inspect Article for Publishing Readiness Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Check if an article is ready for publishing. The --draft flag can be used for draft checks, and --json provides structured results. ```bash md2wechat inspect article.md --draft --json ``` -------------------------------- ### Create Draft with Cover Image Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Convert an article and create a draft, including a cover image. Specify the Markdown file and the path to the cover image. ```bash md2wechat convert article.md --draft --cover ./cover.jpg ``` -------------------------------- ### Discover and Validate Layout Commands Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md CLI commands for managing and validating advanced layout modules, including listing, showing specifications, and validating article files. ```bash # 列出全部 43 个模块 md2wechat layout list --json # 按用途筛选 md2wechat layout list --serves attention --json md2wechat layout list --serves conversion --json # 查看模块完整规格 md2wechat layout show hero --json # 验证文章中的 :::module 用法 md2wechat layout validate --file article.md --json ``` -------------------------------- ### Publish to ClawHub Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Commands to publish the skill to the ClawHub marketplace. Ensure you are logged in and have the correct version and slug. ```bash # 检查登录状态 clawhub whoami # 如未登录,尝试登录 clawhub login # 发布技能 clawhub publish ./platforms/openclaw/md2wechat \ --slug md2wechat \ --name "md2wechat" \ --version {VERSION} \ --changelog "版本更新说明" \ --tags latest ``` -------------------------------- ### cover_prompt 示例:简约风格 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/writers/README.md 一个生成简约风格封面的 cover_prompt 示例,指定了极简主义、黑白配色和大量留白的要求。 ```yaml cover_prompt: | 生成一个简约风格的封面: - 极简主义,黑白配色 - 几何线条,现代感 - 大量留白用于文字 - 16:9 横向 文章内容: {article_content} ``` -------------------------------- ### Basic Workflow Commands Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md These commands outline the typical workflow for creating and publishing a WeChat article using md2wechat. ```bash md2wechat write --style dan-koe # 1. 生成文章 + 封面提示词 md2wechat humanize article.md # 2. 去除 AI 痕迹 md2wechat generate_cover --article article.md # 3. AI 生成封面图 md2wechat convert article.md --draft --cover cover.jpg # 4. 推送草稿 ``` -------------------------------- ### List Available Themes Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Retrieve a list of all available themes supported by md2wechat. The --json flag formats the output for scripting. ```bash md2wechat themes list --json ``` -------------------------------- ### 执行完整的文章转换和发布流程 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/WECHAT-CREDENTIALS.md 运行此命令执行完整的文章转换、图片上传、草稿创建和发布流程,并以 JSON 格式输出结果。 ```bash md2wechat convert article.md --upload --draft --cover cover.png --json ``` -------------------------------- ### Basic Article Conversion (API Mode) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Convert a Markdown article to HTML using the default API mode, which supports advanced layout modules. Requires API key configuration. ```bash md2wechat convert article.md --output output.html ``` -------------------------------- ### Sync md2wechat to npm mirror Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/INSTALL.md Run this command after a new version is published to npm to ensure it's quickly synced to mirrors like npmmirror. ```bash npx cnpm sync @geekjourneyx/md2wechat ``` -------------------------------- ### Check Image Upload Readiness Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Inspect an article to determine if its images are ready for upload. This command checks the upload readiness status and provides details in JSON format. ```bash md2wechat inspect article.md --upload --json ``` -------------------------------- ### User Confirmation Prompt Template Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Template for confirming user actions before critical operations like committing, tagging, or pushing. ```markdown 准备发布 v{VERSION} 变更摘要: - 新增: {N} 个功能 - 修改: {N} 个文件 - 删除: {N} 个文件 待执行操作: 1. git add -A 2. git commit -m "feat: ..." 3. git tag v{VERSION} 4. git push origin main --tags 5. gh release create v{VERSION} 6. clawhub publish (发布到 ClawHub) 是否继续?请确认。 ``` -------------------------------- ### cover_prompt 编写指南 - 基本结构 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/writers/README.md 定义封面生成提示词的基本结构,包括角色、任务、要求(风格、比例、颜色、禁止项)和文章内容占位符。 ```yaml cover_prompt: | # 角色 你是[封面设计师描述]。 # 任务 根据文章内容生成封面提示词。 ## 要求 - 风格:[风格描述] - 比例:16:9 横向 - 颜色:[配色方案] - 禁止:[不要做的] # 文章内容 {article_content} ``` -------------------------------- ### Integrate Humanize with Write Command (Default Intensity) Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/HUMANIZE.md Automatically applies humanization with default 'medium' intensity after generating an article using the `write` command. This streamlines the process of creating natural-sounding AI content. ```bash md2wechat write --style dan-koe --humanize article.md ``` -------------------------------- ### 基础风格配置文件结构 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/writers/README.md 定义自定义写作风格的基本字段,包括名称、分类、核心理念和AI写作提示词。 ```yaml # writers/my-style.yaml name: "风格名称" english_name: "my-style" # 英文标识,用于命令行 category: "分类" description: "一句话描述这个风格" version: "1.0" # 核心写作 DNA(可选) core_beliefs: - "核心理念1" - "核心理念2" # AI 写作提示词(必需) writing_prompt: | 你是[角色描述]... 请将用户的内容,用[风格名]的风格重新演绎。 # 封面相关(可选) cover_prompt: "[风格]风格的封面描述..." cover_style: "封面风格" cover_mood: "封面情绪" ``` -------------------------------- ### Initialize md2wechat Configuration Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/OPENCLAW.md Initializes and validates the configuration for the md2wechat CLI. The configuration file is typically located at ~/.config/md2wechat/config.yaml. ```bash md2wechat config init md2wechat config validate ``` -------------------------------- ### writing_prompt 示例:简洁风格 Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/writers/README.md 一个模仿海明威简洁有力写作风格的 writing_prompt 示例,强调事实、短句和动作描写。 ```yaml writing_prompt: | 你是海明威,以简洁有力的风格写作。 核心原则: - 只写事实,不要形容词 - 短句为主,每句不超过15字 - 用动作和对话表达,不要直接说情绪 格式: - 段落简短 - 避免修辞 - 直接陈述 请将用户的内容,用海明威的冰山理论风格重新演绎。 ``` -------------------------------- ### Article Conversion with Custom Theme Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Convert a Markdown article to HTML and apply a specific theme. Multiple themes are available for different styling. ```bash md2wechat convert article.md --theme bytedance --output output.html ``` ```bash md2wechat convert article.md --theme minimal-blue --output output.html ``` ```bash md2wechat convert article.md --theme autumn-warm --output output.html ``` -------------------------------- ### Create Image Post Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Create an image post (e.g., for 'Little Red Book') from a Markdown article, specifying a cover image. This is suitable for content that is better presented as a card. ```bash md2wechat create_image_post article.md --cover ./cover.jpg --json ``` -------------------------------- ### Reset npm Registry to Official Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/FAQ.md Configure npm to use the official registry as the default. ```bash npm config set registry https://registry.npmjs.org/ ``` -------------------------------- ### View Current Capabilities Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Use this command to see the current capabilities of md2wechat. The --json flag provides machine-readable output. ```bash md2wechat capabilities --json ``` -------------------------------- ### Advanced Layout Module Syntax Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md Demonstrates the Markdown syntax for using advanced layout modules like hero, callout, and timeline within md2wechat. ```markdown :::hero eyebrow: 深度观察 title: AI 时代的公众号写作 subtitle: 为什么你需要重新定义「好内容」 ::: :::callout 高级排版模块仅在 API 模式下生效。需要 API Key,扫码联系作者申请。 ::: :::timeline - 2024:GPT-4 发布,内容生产门槛归零 - 2025:AI 写作工具爆发,同质化严重 - 2026:高质量、有视角的内容成为稀缺品 ::: ``` -------------------------------- ### Check Code Style Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/CLAUDE.md Commands to check code style using Go vet and gofmt. ```bash go vet ./... gofmt -l . ``` -------------------------------- ### Create Draft Article Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md Convert an article to HTML format suitable for a draft, including a specified cover image. The command outputs the draft HTML and can be used to create a draft in the publishing system. ```bash md2wechat convert article.md --draft --cover ./cover.jpg --output draft.html ``` ```bash md2wechat create_draft draft.html --json ``` ```bash md2wechat convert article.md \ --draft \ --cover ./cover.jpg \ --output draft.html ``` -------------------------------- ### Pipe Input to Humanize and Output to File Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/HUMANIZE.md Reads content from standard input (e.g., from `pbpaste` on macOS) and humanizes it, saving the result to a specified output file. This is useful for processing clipboard content. ```bash pbpaste | md2wechat humanize - -o cleaned.md ``` -------------------------------- ### Full Scenario E: Handling API Mode Unavailability Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/docs/AGENT-GUIDE.md A workflow for addressing situations where API mode is unavailable. It includes local diagnostics, checking configuration, and falling back to AI mode with a note about its limitations. ```bash # 1. 本地诊断 md2wechat doctor --json # 2. 查看当前配置 md2wechat config show --format json # 3. 只有用户接受失去高级排版模块时,才显式改用 AI 模式 md2wechat convert article.md --mode ai --output output.html # 4. 注意:AI 模式不支持高级排版模块 # 预期行为::::module ... ::: 语法被当作普通文本 ``` -------------------------------- ### Agent Discovery Commands Source: https://github.com/geekjourneyx/md2wechat-skill/blob/main/README.md Commands useful for agents or automation scripts to discover available resources like themes, layouts, and capabilities. ```bash md2wechat themes list --json # 排版选主题时使用,按 selectable/type 判断能否用于当前模式 md2wechat layout list --json # 高级排版选模块时使用 md2wechat doctor --json # API、草稿、上传或配置本地可尝试性排障时使用 md2wechat prompts list --kind image --json # 图片 prompt 选择时使用 md2wechat providers list --json # 图片生成 provider 选择时使用 md2wechat capabilities --json # 版本、命令能力或行为边界不确定时使用 ```