Files
agent/skills/image-process/AGENTS.md
T
kicer 25f9e157ad docs(skills): 排错清单统一成「报错 → 怎么办 → 命令」,office 改为建软链
技能目录的 AGENTS.md 只在报错时被读,所以只写「报错原文 → 怎么办 → 命令」,一节一个
现象,不写背景。命令块前统一声明「仅为示例,具体以本机平台实际情况为准」——路径分隔符、
可执行名、包管理器交给模型按本机情况自愈,不逐平台列出。

office:`command not found` 从按次拼 PATH 前缀改成建一次 $HOME/.local/bin/office 软链。
每条 terminal 命令都是新 shell,前缀不跨命令生效,按次拼的写法容易被反复踩。
image-process:PIL 缺包与「中文水印缺字体」拆成两节。
x2pdf:后端代价表压成三条列表,四个现象(ModuleNotFoundError / 没有可用排版能力 /
could not import some external libraries / 排版降级)各自成节。
document-photo-to-pdf:单节化,保留 fitz 是 pymupdf 的 import 名这条坑。
data-page 只用标准库,不需要 AGENTS.md。
2026-11-12 10:05:46 +08:00

22 lines
635 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# image-process
以下命令仅为示例,具体以本机平台实际情况为准。
## ModuleNotFoundError: No module named 'PIL'
把依赖装进 `$AGENT_SKILLS_DEPS`。
```sh
python3 -m pip install --upgrade --target "$AGENT_SKILLS_DEPS" -r "$(dirname "$AGENT_SKILLS_DEPS")/image-process/requirements.txt"
```
## 中文水印缺少字体
传 `font` 参数,指向本机任意中文字体文件(ttf/ttc)。
```json
{"action":"watermark","input":"a.jpg","text":"机密","font":"<本机中文字体路径>"}
```
找字体:Linux `fc-list :lang=zh`;macOS `ls /System/Library/Fonts`;Windows `C:\Windows\Fonts\msyh*`。