Coze Upload logo

Coze Upload

Community
xuliang2024
coze-upload

上传本地文件到云端并返回可访问 URL。支持图片(png/jpg/webp/gif)和视频(mp4/webm/mov)。当用户需要上传图片、上传视频、将本地文件转为 URL、获取图片链接、获取视频链接、图片转链接、本地图片转 URL、附带了本地图片/视频路径需要转成链接、或提到 coze upload 时使用此 skill。

Overview

Publisherxuliang2024
Repositoryvideo_skills
Skill namecoze-upload
Stars
67
Forks
17
Bundled files
1
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Coze Upload 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.
    https://github.com/xuliang2024/video_skills/tree/main/skills/coze-upload
  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/xuliang2024/video_skills.git /tmp/video_skills
mkdir -p .claude/skills
cp -r /tmp/video_skills/skills/coze-upload .claude/skills/coze-upload
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Coze Upload 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 Coze Upload 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 Coze Upload 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.

Coze Upload — 本地文件转临时媒体链接

将本地图片或视频上传到 Coze,返回可访问的临时 URL。

流程

本地文件 → ① 获取 Token → ② 上传到 Coze → ③ Workflow 转链接 → 媒体 URL
  1. GET https://api.xskill.ai/api/fal/tasks/coze_token(无需认证)→ upload_key + data
  2. POST https://api.coze.cn/v1/files/upload(Bearer = upload_key)→ file_id
  3. POST https://api.coze.cn/v1/workflow/run(Bearer = data, workflow_id = 7527555709244801087)→ 媒体 URL

脚本使用

脚本路径:.cursor/skills/coze-upload/scripts/coze_upload.py

无外部依赖,仅用 Python 标准库。

bash
# 单个文件
python .cursor/skills/coze-upload/scripts/coze_upload.py /path/to/image.png

# 批量上传
python .cursor/skills/coze-upload/scripts/coze_upload.py a.png b.mp4 c.jpg

进度信息输出到 stderr,最终 URL 输出到 stdout,支持管道:

bash
URL=$(python .cursor/skills/coze-upload/scripts/coze_upload.py /tmp/photo.jpg)
echo "媒体链接: $URL"

Python 调用

python
import subprocess, sys

def coze_upload(filepath: str) -> str:
    """上传本地文件,返回临时媒体链接。"""
    script = ".cursor/skills/coze-upload/scripts/coze_upload.py"
    result = subprocess.run([sys.executable, script, filepath], capture_output=True, text=True)
    if result.returncode != 0:
        raise RuntimeError(f"上传失败: {result.stderr}")
    return result.stdout.strip()

也可直接 import:

python
from scripts.coze_upload import upload

url = upload("/tmp/photo.jpg")

自动触发条件

当以下情况发生时,应自动使用此 skill:

  • AI 模型需要文件 URL,但用户提供了本地路径
  • 用户要求上传文件获取链接
  • 其他 skill 流程中需要将本地产物转为可访问 URL

注意事项

  • 返回的是临时链接,有时效性
  • 支持图片和视频文件
  • 无需 API Key 或任何认证配置

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Coze Upload AI skill do?

上传本地文件到云端并返回可访问 URL。支持图片(png/jpg/webp/gif)和视频(mp4/webm/mov)。当用户需要上传图片、上传视频、将本地文件转为 URL、获取图片链接、获取视频链接、图片转链接、本地图片转 URL、附带了本地图片/视频路径需要转成链接、或提到 coze upload 时使用此 skill。

Why use Coze Upload on TypingMind?

Because you install it once and use it with any model. Coze Upload 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 Coze Upload in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/xuliang2024/video_skills/tree/main/skills/coze-upload. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Coze Upload?

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 Coze Upload?

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

Is the Coze Upload AI skill free?

It is published on GitHub by xuliang2024. Check the repository for licensing terms. 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 👇