Wecomcli Media logo

Wecomcli Media

OrganizationPopular
Pinvou
wecomcli-media

何时用:仅当用户明确指向企业微信 media_id 与本地文件互转时使用;泛指本地文件操作默认走本地工具。基于 media_id 下载媒体文件到本地,或上传本地文件换取 media_id 供其他企微技能使用;本技能不解析/识别文件内容,仅负责文件搬运。

Overview

PublisherPinvou
Repositorypinvou-agent
Skill namewecomcli-media
Stars
2K
Forks
281
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Pinvou on GitHub. Read the source before you install it.

Installation

Install the Wecomcli Media AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Pinvou/pinvou-agent.git /tmp/pinvou-agent
mkdir -p .claude/skills
cp -r /tmp/pinvou-agent/pinvou3-app/src-tauri/resources/common/bundle/wecom-skills/wecomcli-media .claude/skills/wecomcli-media
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wecomcli Media in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wecomcli Media on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wecomcli Media is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

企业微信媒体文件

执行任何 wecom-cli 命令前,必须先读取并完成 wecomcli-shared 技能的公共前置检查。

资源型 skill,负责基于 media_id 下载媒体文件到本地,以及把本地文件上传为 media_id。是其他技能(微盘、邮件等)处理 media_id 相关操作的基础依赖:upload 会产出新的 media_id,但本 skill 不负责搜索/发现其他业务场景中已存在的 media_id(如邮件附件、微盘文件的 media_id 由对应业务技能产出),也不解析文件内容。

适用范围

适用

  • 根据其他技能或用户提供的 media_id 下载媒体文件到本地
  • 上传本地文件(本地路径已知)获取 media_id,供其他技能后续使用(如微盘上传素材)

不适用

  • 解析/识别文件内容(正文提取、OCR、看图问答、PDF/Word/Excel 解析等) → 本 skill 只负责把文件下载到本地拿 file_path,如需查看内容请直接通过 file_path 读取该本地文件
  • 搜索/发现其他业务场景中已存在的 media_id(如邮件附件、微盘文件列表/搜索等) → 由对应业务技能负责产出并返回 media_id,本 skill 只接收已有的 media_id 做下载;本地文件转media_id 的场景仍走本 skill 的 upload
  • 编造或猜测 media_id / 本地文件路径 → 两者必须来自其他技能返回或用户明确提供,禁止自行构造

接口详述

下载媒体文件

根据 media_id 下载媒体文件到本地,返回本地文件路径。

命令

bash
wecom-cli media download --json '{"media_id": "MEDIA_ID"}'

入参

字段类型必填说明
media_idstring文件的 media_id,由上传文件后获得,或由其他技能(邮件附件/内嵌图片等)返回

返回

字段类型说明
file_pathstring下载成功后的本地文件路径

使用规则

  • 下载完成后如需查看文件内容,直接通过 file_path 读取该本地文件。
  • 下载失败时返回错误码和错误信息。
  • media_id 必须是真正的 media_id,不接受任何形式的 URL:若拿到的是一个链接(如 attach_url、正文里的图片/附件链接),不要把这个 URL 当作 media_id 传入本接口,会直接报错。尤其是命中 work.weixin.qq.com/filepreview/security/ 特征的防泄漏加密链接,属于加密的、与用户身份绑定的资源,本接口无法下载或解密,应直接告知用户该文件受防泄漏策略保护,引导其点击链接、在企业微信客户端内打开查看/保存,不要尝试用本接口或其他手段绕过。

上传媒体文件

将本地文件上传,获取 media_id

命令

bash
wecom-cli media upload --json '{"file_path": "/tmp/example.pdf"}'

入参

字段类型必填说明
file_pathstring需要上传的文件的本地路径
typestring媒体类型:image(图片)/voice(语音,源文件仅支持 AMR 格式)/video(视频)/file(文件),可选传入;发送消息时以上传响应返回的 type 为准

返回

字段类型说明
typestring媒体类型:image(图片)/voice(语音)/video(视频)/file(文件)
media_idstring上传后的 media_id,供其他技能后续使用(如微盘uploadfile_content_media
created_atstring创建时间,格式:YYYY-MM-DD HH:mm:ss

关键约束

  • media_id / file_path 不得编造media_id 必须来自上传结果、其他技能返回或用户明确提供;file_path 必须是真实存在的本地路径。两者都没有时用自然语言追问,禁止靠猜测凑一个。
  • 不做内容解析:本 skill 只负责文件的下载落地与上传,download 拿到 file_path 后如需查看内容,直接通过 file_path 读取,不在本 skill 职责范围内。
  • 内部 ID 不外露media_id 仅用于后续接口调用,禁止直接展示给用户;下载后的本地 file_path 同样不展示给用户。
  • CLI 报错原样转达:命令返回明确错误码时如实告知用户并给替代建议,禁止用 curl / python 等通用手段绕过 CLI 强行完成。

跨技能依赖

依赖场景说明
wecomcli-email邮件附件/内嵌图片的 media_id,使用本 skill 的 download 下载到本地后通过 file_path 读取
wecomcli-disk上传文件到微盘时若已有 media_id,直接作为 disk files uploadfile_content_media 使用,无需再走本 skill;若只有本地路径且需要先转成 media_id,可用本 skill 的 upload

参数缺失 / 意图不明确时,用自然语言追问让用户明确,不要瞎猜。

Frequently asked questions

What does the Wecomcli Media AI skill do?

何时用:仅当用户明确指向企业微信 media_id 与本地文件互转时使用;泛指本地文件操作默认走本地工具。基于 media_id 下载媒体文件到本地,或上传本地文件换取 media_id 供其他企微技能使用;本技能不解析/识别文件内容,仅负责文件搬运。

Why use Wecomcli Media on TypingMind?

Because you install it once and use it with any model. Wecomcli Media is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wecomcli Media in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Pinvou/pinvou-agent/tree/main/pinvou3-app/src-tauri/resources/common/bundle/wecom-skills/wecomcli-media. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Wecomcli Media?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wecomcli Media?

As many as you like. As long as a model supports skills, you can use Wecomcli Media with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wecomcli Media AI skill free?

Yes. It is published on GitHub by Pinvou under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇