Piclist Upload logo

Piclist Upload

Community
cat-xierluo
piclist-upload

通过 PicList HTTP Server 将 Markdown 文件中的本地图片上传到图床,并替换为云端链接。本技能应在用户需要上传 Markdown 中的图片、处理包含本地图片引用的 Markdown、批量处理多个 Markdown 文件或目录、或替换本地路径为云端链接以实现跨设备访问时使用。

Overview

Publishercat-xierluo
Repositorylegal-skills
Skill namepiclist-upload
Stars
722
Forks
109
Bundled files
4
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.

  • 4 bundled files

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

  • Open source

    Published by cat-xierluo on GitHub. Read the source before you install it.

Installation

Install the Piclist 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/cat-xierluo/legal-skills/tree/main/skills/piclist-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/cat-xierluo/legal-skills.git /tmp/legal-skills
mkdir -p .claude/skills
cp -r /tmp/legal-skills/skills/piclist-upload .claude/skills/piclist-upload
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Piclist 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 Piclist 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 Piclist 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.

PicList 图片上传

将 Markdown 文件中的本地图片上传到配置的图床,并将本地路径替换为云端链接。

前置条件

  • 已安装 PicList 并启用 HTTP Server
  • 已在 PicList 中配置图床
  • 已安装 jq
  • 已安装 curl

系统兼容性: 脚本兼容 bash 3.2+(macOS 自带 /bin/bash 直接可用,无需安装新版 bash)、Linux 各发行版、Git Bash(Windows)。lsof 缺失时自动回退 /dev/tcp 端口探测,无需 bc。

首次配置: 请参阅 references/setup.md 安装和配置指南。

⚠️ 强制规则:必须通过脚本执行

禁止手动 curl 上传。所有操作必须通过 scripts/process.sh 脚本执行。 脚本已内置上传、URL 替换和本地文件删除的完整逻辑,手动操作容易遗漏步骤。

默认行为是上传成功后删除本地图片。 只有当用户明确要求保留时,才可添加 --keep-local。不得擅自保留本地图片。

使用方法

处理文件或目录(默认删除本地图片)

bash
bash scripts/process.sh --in-place <file.md|directory...>

保留本地图片(仅在用户明确要求时使用)

bash
bash scripts/process.sh --in-place --keep-local <file.md|directory...>

预览模式(不修改文件)

bash
bash scripts/process.sh --dry-run <file.md|directory...>

命令选项

选项说明
--in-place直接修改原文件(必须指定,否则仅输出到终端)
--keep-local保留本地图片文件。仅在用户明确要求时使用
--dry-run预览模式,不上传、不修改文件

响应格式

解析上传返回的 JSON:

json
{"success":true,"result":["https://example.com/image.png"]}

统计报告

处理完成后显示:

markdown
📊 Summary:
  Total uploaded: 5
  Total skipped: 3
  Total failed: 0
  • Uploaded: 成功上传并替换(已删除本地图片)
  • Skipped: 已是云端 URL(无需操作)
  • Failed: 上传错误(保留原始路径)

断点续传

--in-place 模式下每张图片上传成功后、删除本地文件之前,脚本都会立即把已替换的 md 内容原子写回磁盘。因此中途被打断(超时、崩溃、Ctrl-C)不会丢失已上传的 URL:已完成的部分在 md 中已是云端链接,未完成的部分保持本地引用,直接重跑同一命令即可续传(幂等)。

错误处理

  • PicList 进程未运行: 脚本会先做端口级探测,缺失则自动尝试 open -a PicList.app(仅 macOS)并等待最多 15 秒(PICLIST_START_WAIT);仍无响应才退出。
  • PicList 在监听但业务端点 503/000: 通常是 PicList 应用卡死或图床后端未配置。脚本会报错并提示用户在 PicList 应用里检查默认图床/token,必要时重启应用。
  • 文件不存在: 跳过并显示 ⚠️ 警告,继续处理
  • 单张上传失败: 自动重试一次(MAX_RETRIES=1,间隔 RETRY_DELAY=2s),仍失败则保留原始路径,标记 ❌,继续
  • 无效 JSON: 视为上传失败

配置

PicList Server 默认地址为 http://127.0.0.1:36677/upload。可通过环境变量覆盖:

bash
export PICLIST_SERVER=http://127.0.0.1:PORT
# 以下为可选调优(一般无需改动)
export PICLIST_START_WAIT=15   # 启动 PicList 后等待端口就绪的秒数
export MAX_RETRIES=1           # 单图上传失败时的额外重试次数
export RETRY_DELAY=2           # 重试间隔秒数

支持格式

png, jpg, jpeg, gif, webp, svg, bmp

支持的引用写法

写法示例处理
普通路径![alt](/abs/pic.png)、![alt](rel/pic.png)原样解析(v1.0.0 起)
尖括号路径![alt](</abs/pic (1).png>)剥离尖括号后解析
Obsidian file://![alt](<file:///abs/pic.jpg>)剥离尖括号与 file://,file://<host>/ 形式去掉主机名;URL 内百分号编码(%20 等)解码为真实路径(v1.5.0 起)

普通路径中的字面 %(如 50%.png)不会被解码,保持原样。

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 Piclist Upload AI skill do?

通过 PicList HTTP Server 将 Markdown 文件中的本地图片上传到图床,并替换为云端链接。本技能应在用户需要上传 Markdown 中的图片、处理包含本地图片引用的 Markdown、批量处理多个 Markdown 文件或目录、或替换本地路径为云端链接以实现跨设备访问时使用。

Why use Piclist Upload on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cat-xierluo/legal-skills/tree/main/skills/piclist-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 Piclist 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 Piclist Upload?

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

Is the Piclist Upload AI skill free?

It is published on GitHub by cat-xierluo. 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 👇