ryan32382

微信公众号发布工具

コンテンツ制作v0.1.0
作者:ryan32382更新日 2026-05-11ryan-wechat-mp@clawhub_ryan32382/ryan-wechat-mp
SNS 運用#WeChat#微信

AlphaMoatによると、2026-09時点で微信公众号发布工具のダウンロード数は3,402、スター数は0で、AIスキル全体5,078件中3,292位、コンテンツ制作では362件中221位です。

インストール数
745
ダウンロード数
3402
スター数
-
総合順位
#3,292
全体の上位 65% · コンテンツ制作の上位 62%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗25942--
SkillHub ↗7453402-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

WeChat MP の API 経由で記事を送り、AccessToken は自動で保持し必要に応じて更新します。画像、サムネイル、動画の送信と、下書きの作成と管理に対応します。認証情報は ~/.openclaw/config/wechat-mp.json に置き、AppID は環境変数でも渡せます。 このスキルは下書き作成だけでなく記事の公開もできます。公開前に記事とアカウントを確認し、AppSecret と access token を秘密に保管してください。

資料公開日 2026-10-27

できること

  • 書き上がった記事を下書き箱に入れる
  • 画像をまとめて送って下書きを複数作る

使う場面

  • API の手順に沿って投稿するとき
  • 下書きを自動で管理したいとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

この記事を下書き箱に入れて
先にこの画像を送ってから下書きを作って

月次の推移

ダウンロード数3402
948226635842026-03 · ダウンロード数 11302026-05 · ダウンロード数 16812026-07 · ダウンロード数 22462026-08 · ダウンロード数 25512026-09 · ダウンロード数 340226-0326-09
スター数-
0112026-03 · スター数 -2026-05 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -26-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-093402—-
2026-082551+13.6%-
2026-072246—-
2026-051681—-
2026-031130—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

6.3 KB・ClawHub v0.1.0
# WeChat MP Publisher

OpenClaw Skill for publishing articles to WeChat Official Account (微信公众号文章自动发布工具)

## Description

This skill enables AI agents to publish articles to WeChat Official Accounts using the WeChat MP API. It supports:

- AccessToken management with automatic caching and refresh
- Media upload (images, thumbnails, videos)
すべて表示(全 281 行)
- Article draft creation and management
- Publishing articles to followers
- Querying publish status and drafts

## Tools

### wechat-mp-publish

Publish a WeChat Official Account article (发布微信公众号文章)

**Parameters:**
- `title` (string, required): Article title (文章标题)
- `content` (string, required): Article content in HTML format (正文内容,支持 HTML)
- `cover_media_id` (string, required): Cover image media_id obtained from upload (封面图片素材 ID)
- `author` (string, optional): Author name (作者名)
- `digest` (string, optional): Article summary/abstract (文章摘要)
- `content_source_url` (string, optional): Original source URL (原文链接)
- `publish` (boolean, optional): Whether to publish immediately (default: true). Set to false to save as draft. (是否立即发布,false 则保存为草稿)

**Returns:**
```json
{
  "success": true,
  "message": "文章已创建并提交发布",
  "data": {
    "media_id": "draft media id",
    "publish_id": "publish task id"
  }
}
```

**Example:**
```yaml
tool: wechat-mp-publish
params:
  title: "我的第一篇文章"
  content: "<p>这是一篇测试文章</p>"
  cover_media_id: "MEDIA_ID_FROM_UPLOAD"
  author: "张三"
  publish: true
```

---

### wechat-mp-upload-media

Upload media file to WeChat server (上传素材到微信服务器)

**Parameters:**
- `file_path` (string, required): Local file path to upload (本地文件路径)
- `type` (string, optional): Media type - `image`, `thumb`, `voice`, `video` (default: `image`) (素材类型)

**Returns:**
```json
{
  "success": true,
  "message": "素材上传成功",
  "data": {
    "media_id": "uploaded media id",
    "type": "image",
    "created_at": 1234567890
  }
}
```

**Example:**
```yaml
tool: wechat-mp-upload-media
params:
  file_path: "/path/to/image.jpg"
  type: "image"
```

---

### wechat-mp-upload-cover

Upload cover image (shortcut for thumb type upload) (上传封面图片)

**Parameters:**
- `file_path` (string, required): Local file path to cover image (封面图片路径)

**Returns:**
```json
{
  "success": true,
  "message": "封面上传成功",
  "data": {
    "media_id": "cover media id"
  }
}
```

**Example:**
```yaml
tool: wechat-mp-upload-cover
params:
  file_path: "/path/to/cover.jpg"
```

---

### wechat-mp-query-drafts

Query draft list (查询草稿列表)

**Parameters:**
- `offset` (number, optional): Pagination offset (default: 0) (分页偏移量)
- `count` (number, optional): Items per page, max 20 (default: 10) (每页数量)

**Returns:**
```json
{
  "success": true,
  "message": "获取草稿列表成功,共 5 条",
  "data": {
    "total_count": 5,
    "item_count": 5,
    "items": [...]
  }
}
```

---

### wechat-mp-query-publish-status

Query publish status by publish_id (查询发布状态)

**Parameters:**
- `publish_id` (string, required): Publish task ID returned from publish (发布任务 ID)

**Returns:**
```json
{
  "success": true,
  "message": "发布状态: 成功",
  "data": {
    "publish_id": "PUBLISH_ID",
    "publish_status": 0,
    "status_text": "成功",
    "article_id": "ARTICLE_ID",
    "article_detail": {...}
  }
}
```

**Status codes:**
- 0: Success (成功)
- 1: Publishing (发布中)
- 2: Original content review failed (原创审核失败)
- 3: Failed (失败)

---

### wechat-mp-delete-draft

Delete a draft by media_id (删除草稿)

**Parameters:**
- `media_id` (string, required): Draft media_id to delete (草稿素材 ID)

**Returns:**
```json
{
  "success": true,
  "message": "草稿删除成功"
}
```

## Configuration

Create a configuration file at `~/.openclaw/config/wechat-mp.json`:

```json
{
  "app_id": "your-wechat-app-id",
  "app_secret": "your-wechat-app-secret",
  "default_author": "默认作者名",
  "access_token_cache_file": "~/.openclaw/.wechat_mp_token.json"
}
```

Or use environment variables:
```bash
export WECHAT_MP_APP_ID="your-app-id"
export WECHAT_MP_APP_SECRET="your-app-secret"
export WECHAT_MP_DEFAULT_AUTHOR="默认作者"
export WECHAT_MP_TOKEN_CACHE="~/.openclaw/.wechat_mp_token.json"
```

## Prerequisites

1. WeChat Official Account (Service Account/认证服务号) with API access
2. IP whitelist configured in WeChat MP Admin Portal
3. Node.js >= 18

## Installation

```bash
cd /Users/zhizi/.openclaw/workspace/agents/dev-team/projects/active/wechat-mp-publisher
npm install
npm run build
```

## Usage Example

### Complete workflow

```typescript
// 1. Upload cover image
const coverResult = await wechatMpUploadCover({
  file_path: "/path/to/cover.jpg"
});

// 2. Publish article
const publishResult = await wechatMpPublish({
  title: "我的文章标题",
  content: "<p>文章内容</p>",
  cover_media_id: coverResult.data.media_id,
  author: "作者名",
  publish: true
});

// 3. Check publish status
const status = await wechatMpQueryPublishStatus({
  publish_id: publishResult.data.publish_id
});
```

## Project Structure

```
wechat-mp-publisher/
├── SKILL.md                    # This file
├── README.md                   # Project documentation
├── package.json                # Dependencies
├── tsconfig.json               # TypeScript config
├── src/
│   ├── index.ts               # Main entry & OpenClaw tools
│   ├── auth.ts                # AccessToken management
│   ├── media.ts               # Media upload
│   ├── article.ts             # Article management
│   └── types.ts               # TypeScript types
├── scripts/                    # CLI scripts (optional)
└── tests/                      # Test files
```

## Error Handling

All tools return a standardized response:

```typescript
{
  success: boolean;    // Operation success status
  message: string;     // Human-readable message
  data?: any;          // Response data on success
}
```

On failure, `success` will be `false` and `message` contains the error description.

## API Reference

Based on WeChat Official Account API:
- https://developers.weixin.qq.com/doc/offiaccount/en/Getting_Started/Overview.html

## License

MIT

コンテンツ制作の人気スキル

文章去AI味工具コンテンツ制作

文章に残る AI らしさを見つけて取り除き、人が書いたように読める文章にします。

↓ 37.7万★ 688user_ab5ae6ee
Humanizerコンテンツ制作

AI が書いた文章の典型的な痕跡を見つけ、意味を保ったまま自然な文章に書き直す文章編集スキルです。

↓ 32万★ 1107B*T
humanizer-zhコンテンツ制作

AI が生成した文章の痕跡を見つけて取り除く中国語の編集スキルです。

↓ 10.5万★ 103liuxy951129-cpu
公众号热门文章查询コンテンツ制作

wechat-search は WeChat の人気記事を検索し、関連度、人気、鮮度で結果を整理します。

↓ 7.2万★ 118user_5f9c21aa
抖音文案一键提取コンテンツ制作

公開された短編動画の共有リンクからタイトル、概要、口播テキストを抽出し、改写版も作ります。

↓ 6.2万★ 183user_a41ae6c8
一键去AI味工具コンテンツ制作

humanizer は中国語と英語の文章を自然な表現に整えるための編集ガイドです。

↓ 4.8万★ 55user_ab5ae6ee
番茄小说写作助手(单章2200-2800字)コンテンツ制作

Web 小説の各章をファイルに書き、会話では要約と位置だけを返します。

↓ 4.5万★ 347user_634bbcdc
Marketing Skillsコンテンツ制作

複数のマーケティング手法をひとつのスキルにまとめ、依頼内容に合うモジュールへ振り分けるスキルです。

↓ 3.9万★ 158Jordan Chops

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。