# Wechat Draft Publish

> Publish finished article content into a WeChat Official Account draft box through a local bridge service. Use when the user says things like "把这篇发到公众号草稿箱", "帮我推到公众号草稿箱", "发布到微信公众号草稿箱", "把这篇文章存成公众号草稿", or asks to send a Markdown article into WeChat drafts.

- **Type:** Skill
- **Install:** `agentstack add skill-danazd91-collab-wechat-mp-skills-wechat-draft-publish`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [danazd91-collab](https://agentstack.voostack.com/s/danazd91-collab)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [danazd91-collab](https://github.com/danazd91-collab)
- **Source:** https://github.com/danazd91-collab/wechat-mp-skills/tree/main/wechat-draft-publish

## Install

```sh
agentstack add skill-danazd91-collab-wechat-mp-skills-wechat-draft-publish
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# WeChat Draft Publish

## Overview

Use this skill after the article content is already finalized and should be sent into a WeChat Official Account draft box.

Treat plain-language requests such as `把这篇发到公众号草稿箱`, `帮我推到公众号草稿箱`, and `把这个 Markdown 发到公众号草稿箱` as direct triggers.

Read [references/minimal-plan.md](references/minimal-plan.md) when you need the architecture, file layout, or request schema.

## Workflow

1. Confirm the article body is ready.
   - If the user says "这篇", infer the current article content or the file they most recently referenced.
2. Confirm the payload has the minimum required fields:
   - title
   - article body
   - `thumbMediaId` or `coverImagePath`
3. If the article is Markdown, convert it with the bundled converter instead of asking the user to do it manually.
4. Check that the local bridge service is reachable at `http://127.0.0.1:8787/health`.
5. Publish with:

```powershell
powershell -ExecutionPolicy Bypass -File ".\scripts\publish-markdown-to-wechat-draft.ps1" `
  -MarkdownFile "D:\path\article.md" `
  -CoverImagePath "D:\path\cover.jpg" `
  -Theme "minimal"
```

6. Return the `mediaId`, final title, and file path used for publishing.

## Validation Rules

- Do not publish if the article is unfinished.
- Do not publish if neither `thumbMediaId` nor `coverImagePath` is available.
- Stop and ask when the cover image is missing.
- Prefer the first Markdown `# ` heading as the title when no explicit title is passed.
- Use the local scripts in this skill folder, not browser automation.
- Prefer `minimal` as the default theme unless the user explicitly asks for a more formal, more narrative, or more编辑感的公众号排版。
- When the Markdown includes `:::intro`, `:::card`, or `:::quote`, preserve those semantic blocks and let the selected theme render them.

## Common Commands

Start the local bridge service:

```powershell
powershell -ExecutionPolicy Bypass -File ".\scripts\start-wechat-draft-service.ps1"
```

Publish a Markdown article:

```powershell
powershell -ExecutionPolicy Bypass -File ".\scripts\publish-markdown-to-wechat-draft.ps1" `
  -MarkdownFile "D:\path\article.md" `
  -CoverImagePath "D:\path\cover.jpg" `
  -Theme "minimal"
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [danazd91-collab](https://github.com/danazd91-collab)
- **Source:** [danazd91-collab/wechat-mp-skills](https://github.com/danazd91-collab/wechat-mp-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-danazd91-collab-wechat-mp-skills-wechat-draft-publish
- Seller: https://agentstack.voostack.com/s/danazd91-collab
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
