Documents

Lark To Anything

Try it

Use when the user provides a Feishu/Lark document URL (feishu.cn or larksuite.com) and wants to export, download, save, or convert it to a local Markdown file. Triggers on phrases like "Export Lark documents as Markdown, save them locally, or convert ", or any feishu.cn/docx link with export intent.

What it does

Use when the user provides a Feishu/Lark document URL (feishu.cn or larksuite.com) and wants to export, download, save, or convert it to a local Markdown file. Triggers on phrases like "把飞书文档导出成 markdown"、 "保存到本地"、"转成 md 文件", or any feishu.cn/docx link with export intent.

The skill document

lark-to-anything: Feishu Doc → Local Markdown

Export any Feishu document to a self-contained local folder: /index.md + /assets/ with all images downloaded.

Prerequisites

Read ../lark-shared/SKILL.md for auth and global flags before running any lark-cli command.

Steps

0. Check lark-cli version

lark-cli --version

If below 1.0.66, stop and tell the user:

画板缩略图需要 lark-cli ≥ 1.0.66,当前版本是 X.X.X,请先升级:

npm install -g @larksuite/cli@1.0.66 && npx skills add larksuite/cli -y -g

升级完成后请重启 Claude Code,然后重新执行导出。

1. Fetch the document

lark-cli docs +fetch \
  --api-version v2 \
  --doc "" \
  --doc-format markdown \
  --format json > /tmp/lark_fetch.json

2. Convert, download assets, and save

The conversion script is bundled with this skill. Run it with:

python3 "$(dirname "$0")/scripts/to_markdown.py" /tmp/lark_fetch.json

Or use the full skill path (replace `` with your skills directory, typically ~/.claude/skills):

python3 /lark-to-anything/scripts/to_markdown.py /tmp/lark_fetch.json

The script:

  • Creates //index.md
  • Downloads all images into /assets/ concurrently (stdlib only, no pip)
  • Downloads whiteboard thumbnails via lark-cli docs +media-download --type whiteboard
  • Rewrites all image links to relative local paths
  • Fails gracefully: failed images keep original URL, failed whiteboards keep placeholder

Pass --output-dir to save somewhere other than cwd.

3. Report back

Tell the user the path to index.md and the asset counts.

Output structure

/
  index.md          ← converted document with local image references
  assets/
    image-1.png
    whiteboard-1.png
    ...

Element conversion table

Feishu elementMarkdown result
``# Title at top
``> blockquote
`` HTMLstandard markdown table
``@DisplayName
``[Document Title]
``- [ ] / - [x]
Images (any location)downloaded → assets/image-N.ext
``downloaded thumbnail → assets/whiteboard-N.png
/> *[附件: filename]*
``removed

Error handling

  • Permission denied: use --as user; document must be accessible to the logged-in user.
  • Image download fails: Feishu image URLs expire. Re-run the fetch to get fresh URLs.
  • Whiteboard fails: upgrade lark-cli to ≥ 1.0.66 (see Step 0).
  • Large documents: pass --scope section or --scope keyword — see ../lark-doc/references/lark-doc-fetch.md.

Related skills

Use this skill for Feishu/Lark OpenAPI integration work: configuring OpenClaw Feishu bot accounts, setting app credentials outside the skill, reading or writ...

11 installs

Operate Feishu or Lark IM APIs via UXC + curated OpenAPI schema

21 installs

把项目 OpenAPI / Swagger spec(本地 yaml/json **或 http(s):// URL**)同步到飞书 / Lark wiki & docx 文档树。支持 single / tree / endpoint(每接口一个 wiki 子节点)三种结构,自动按 tag 拆分 + path-p...

1 installs

飞书文档归档与管理。Use when needing to save analysis results, meeting notes, or documents to Feishu cloud docs, organize files in Feishu drive, or sync local content...

Design or implement a paper-management workflow built on a Feishu bot plus OpenClaw. Use when the user wants to ingest papers from Feishu messages, save PDFs...

21 installs

Scaffold, configure, validate, run, and maintain a Feishu/Lark invoice approval bot that uses Codex vision, validates buyer headers, auto-selects the closest expense category, drafts the approval reason, sends an interactive confirmation card, and submits only after the original uploader confirms. Use for building or troubleshooting Feishu invoice-to-approval workflows, approval form mappings, dry-run tests, card callbacks, and duplicate protection.

2 installs