Feishu pdf downloader

From wulaosiji/skills · View interactive version

Feishu pdf downloader is an AI agent skill from the GitHub repository wulaosiji/skills. 通过文件 token 从飞书云盘下载 PDF 及其他文件 / Download PDF and other files from Feishu/Lark cloud drive using file token. 支持自动凭证加载,可批量下载多个文件。 Use when: "下载飞书文件", "download feishu files", "飞书PDF下载", "feishu pdf download", "云盘文件导出", "cloud drive export", "提取飞书文档", "extract feishu documents", "文件token下载", "file token

How to use this skill

Skill file

Feishu PDF Downloader

通过文件 token 从飞书云盘下载 PDF 及其他文件,支持自动凭证加载。

When to Use

Use this skill when:

Do NOT use this skill if:

Typical triggers:

Workflow

  1. 探查 (Probe)

确认文件 token 和期望的本地保存路径。从 Web URL 提取 token:https://xxx.feishu.cn/file/<file_token>。

  1. 约束 (Constrain)

确保 ~/.openclaw/.env 中包含有效的 FEISHU_APP_ID 和 FEISHU_APP_SECRET。确保应用具备 drive:file:read 权限。文件 token 必须有效且文件存在。不降级——凭证缺失时停止并提示用户。

  1. 证据 (Evidence)

确认文件 token 有效,调用飞书认证 API 获取 tenant_access_token。

  1. 执行 (Execute)

调用下载 API 获取文件二进制内容并保存到本地:

python3 skills/feishu-pdf-downloader/scripts/download_feishu_pdf.py <file_token> [output_path]
  1. 验证 (Verify)

检查文件大小和完整性,确认下载的文件非空且格式正确。

  1. 交付 (Deliver)

返回本地文件路径,清理临时文件。

Output

返回下载的本地文件路径。下载的 PDF 可配合 pdf skill 进行文本提取、OCR 或表格提取。

Guardrails

Anti-patterns

Constraints

How to Get File Token

From Web URL

From API

Use Feishu drive API to list files and get tokens.

Processing Downloaded PDFs

After downloading, use the pdf skill to:

Troubleshooting

| Issue | Solution |

|-------|----------|

| "FEISHU_APP_ID not set" | Check ~/.openclaw/.env file format |

| "Failed to get token" | Verify app_id and app_secret are correct |

| "Download failed" | Check file_token is valid and file exists |

| Permission denied | Ensure app has drive:file:read permission |

Related Skills

About UniqueClub

Part of the UniqueClub toolkit.

🌐 https://uniqueclub.ai

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.