docs(skills): AGENTS.md 改成「现象 → 命令」排错清单

删掉服务器背景、agent-executor-init、SKILL.md 说明之类的旁白。只保留:
报什么错 → 敲什么命令。四份都在 20 行内。
This commit is contained in:
2026-11-11 19:13:34 +08:00
parent 4e1c1f36d0
commit 5959b4a674
5 changed files with 32 additions and 72 deletions
+9 -22
View File
@@ -1,30 +1,17 @@
# x2pdf:本机环境
# x2pdf
`ModuleNotFoundError`(文本类报 `markdown`,或提示 WeasyPrint 不可用)
```sh
SK="$(dirname "$AGENT_SKILLS_DEPS")/x2pdf"
python3 -m pip install --target "$AGENT_SKILLS_DEPS" -r "$(dirname "$AGENT_SKILLS_DEPS")/x2pdf/requirements.txt"
```
## 文本类 md / txt / html
WeasyPrint 还要系统库:macOS `brew install pango`。
Office 类(docx/xlsx/pptx)报「未找到 LibreOffice」
```sh
python3 -m pip install --target "$AGENT_SKILLS_DEPS" -r "$SK/requirements.txt"
brew install pango # macOS;Linux 的系统库见 install.sh
brew install --cask libreoffice
```
不装 pango 也能用:技能在 WeasyPrint 不可用时回落 LibreOffice,代价是 `page` 的边距/页码与部分 CSS 不生效。
## Office 类 docx / xlsx / pptx / odt / ods / odp
必须有 LibreOffice(文本类也可用它渲染):
```sh
brew install --cask libreoffice # macOS:soffice 在 app bundle 内,技能会自己找到
apt-get install libreoffice-writer libreoffice-calc libreoffice-impress # Linux(镜像已预装)
```
## 验证
```sh
python3 -c "import weasyprint, markdown"
/Applications/LibreOffice.app/Contents/MacOS/soffice --version
```
装了 LibreOffice 后文本类也能用(自动回落,`page` 的边距/页码与部分 CSS 不生效),此时不必装 pango。