Agent skill

Piclist Upload

by cat-xierluo in cat-xierluo/legal-skills

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

MITAuto-check passedDocuments & Office

Install Piclist Upload

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill piclist-upload -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cat-xierluo/legal-skills piclist-upload --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/piclist-upload .claude/skills/piclist-upload && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
piclist-upload
GitHub stars
717
Token cost
~701 tokens
SKILL.md length
145 words
Files
6 (incl. scripts, references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

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

  • Tasks that involve Markdown
  • SKILL.md covers 前置条件, ⚠️ 强制规则:必须通过脚本执行, 使用方法 and 命令选项, plus 7 more sections
  • Runs Shell scripts from its folder; calls bash

What it does

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

Its SKILL.md is about 700 tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/setup.md` and `scripts/process.sh`).

It sits in Documents & Office, covering Markdown. It works with Bash. The licence is MIT.

When your agent uses it

  • Tasks that involve Markdown

Example prompts

  • “/piclist-upload”

Requirements

  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit c077fcc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Piclist Upload loads about 701 tokens when it runs, and up to ~1.5k if it reads all its reference files. Until then it costs about 41 tokens; SKILL.md has 145 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~701
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cat-xierluo/legal-skills at commit c077fcc, republished under its MIT licence (© cat-xierluo). 145 words, ~701 tokens.

Download SKILL.mdSave it as .claude/skills/piclist-upload/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
piclist-upload
description
通过 PicList HTTP Server 将 Markdown 文件中的本地图片上传到图床,并替换为云端链接。本技能应在用户需要上传 Markdown 中的图片、处理包含本地图片引用的 Markdown、批量处理多个 Markdown 文件或目录、或替换本地路径为云端链接以实现跨设备访问时使用。
homepage
https://github.com/cat-xierluo/legal-skills
author
杨卫薪律师(微信ywxlaw)
version
1.5.0
license
Complete terms in LICENSE.txt

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)不会被解码,保持原样。

© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/piclist-upload of cat-xierluo/legal-skills.

  • SKILL.md
  • CHANGELOG.md
  • LICENSE.txt
  • references/setup.md
  • scripts/process.sh
  • scripts/test_file_url_refs.sh

Open the folder on GitHubat commit c077fcc

Compare with similar skills

Piclist Upload next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Piclist Upload compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Piclist Upload this skillcat-xierluo/legal-skills717—~701Automated safety check: PassMIT
Segment DocsJanDeDobbeleer/oh-my-posh24k—~1.1kAutomated safety check: PassMIT
MarkdownJanDeDobbeleer/oh-my-posh24k—~754Automated safety check: PassMIT
Markdown Exporterbowenliang123/markdown-exporter2721 repos~5.3kAutomated safety check: PassApache-2.0
Markdown Article FormatterJimLiu/baoyu-skills26k6 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78214 repos~3.2kAutomated safety check: NotesMIT

Similar skills

  • Segment Docs

    JanDeDobbeleer/oh-my-posh

    Reference mapping between Oh My Posh Go segment source code and MDX documentation.

    24k GitHub stars~1.1k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Markdown

    JanDeDobbeleer/oh-my-posh

    Markdown formatting rules for this project. An agent skill from JanDeDobbeleer/oh-my-posh.

    24k GitHub stars~754 tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Markdown Exporter

    bowenliang123/markdown-exporter

    Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.

    272 GitHub starsUsed in 1 repo~5.3k tokens
    Documents & OfficeAuto-check passed
  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    26k GitHub starsUsed in 6 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    782 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed

More from cat-xierluo/legal-skills

All 62 skills in this repo
  • Elements-Style Complaint Generator

    cat-xierluo/legal-skills

    Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.

    717 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check: notes
  • Lecture Performance Review

    cat-xierluo/legal-skills

    Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.

    717 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • De-AI Polish for Chinese Articles

    cat-xierluo/legal-skills

    Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.

    717 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • GitHub Star Manager

    cat-xierluo/legal-skills

    Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.

    717 GitHub stars~2k tokensUpdated yesterday
    Auto-check: notes
  • Legal Harness Initializer

    cat-xierluo/legal-skills

    Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.

    717 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Moot Court Simulation Builder

    cat-xierluo/legal-skills

    Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.

    717 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Piclist Upload

What does Piclist Upload do?

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

When should I use Piclist Upload?

Piclist Upload fits situations like: tasks that involve Markdown.

How do I install Piclist Upload in Claude Code?

Run `npx skills add cat-xierluo/legal-skills --skill piclist-upload -a claude-code`. Or copy the skill folder (skills/piclist-upload in cat-xierluo/legal-skills) into .claude/skills/piclist-upload in your project. Claude Code loads it when a task matches its description.

How do I install Piclist Upload in Codex?

Run `npx skills add cat-xierluo/legal-skills --skill piclist-upload -a codex`. Or copy the skill folder (skills/piclist-upload in cat-xierluo/legal-skills) into .agents/skills/piclist-upload in your project. Codex loads it when a task matches its description.

Can I use Piclist Upload in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill piclist-upload -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/piclist-upload, .gemini/skills/piclist-upload, .github/skills/piclist-upload and .opencode/skills/piclist-upload in your project.

What does Piclist Upload need to run?

Going by SKILL.md and its folder, Piclist Upload needs a shell for the scripts in its folder and the command-line tools its instructions call (bash). Our summary lists: A Bash shell.

Does Piclist Upload access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Piclist Upload safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Piclist Upload use?

Piclist Upload is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Piclist Upload use?

About 701 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 754 tokens, read only when the agent opens those files.

What are the alternatives to Piclist Upload?

Skills that share tags, products or a category with Piclist Upload: Segment Docs (JanDeDobbeleer/oh-my-posh, 24k stars), Markdown (JanDeDobbeleer/oh-my-posh, 24k stars), Markdown Exporter (bowenliang123/markdown-exporter, 272 stars) and Markdown Article Formatter (JimLiu/baoyu-skills, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Piclist Upload?

cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 717 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 8, 2026.

Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.