This skill adds parsed blocks to Feishu documents in batches, including images, to ensure smooth uploads and avoid API limits.
npx playbooks add skill rosalynyang/feishu-doc-creator-skill --skill feishu-block-adder
将解析后的块数据添加到飞书文档,分批处理以避免 API 限制。
blocks.json - 由 feishu-md-parser 生成doc_info.json - 由 feishu-doc-creator-with-permission 生成output/add_result.json - 添加结果统计从 blocks.json 加载解析后的块列表。
从 doc_info.json 加载文档 ID。
每批最多 20 个块,避免触发 API 限流。
保存添加结果到 output/add_result.json。
| block_type | 名称 | 状态 | 说明 |
|------------|------|------|
| 2 | text | ✅ | 普通文本 |
| 3-8 | heading1-6 | ✅ | 一到六级标题 |
| 12 | bullet | ✅ 无序列表 |
| 13 | ordered | ✅ | 有序列表 |
| 14 | code | ✅ | 代码块 |
| 15 | quote | ✅ | 引用块 |
| 17 | todo | ✅ | 待办事项 |
| 19 | callout | ✅ | 高亮块 |
| 22 | divider | ✅ | 分割线 |
| 27 | image | ✅ 图片块(支持本地图片上传) |
---
现在支持 Markdown 中的本地图片上传到飞书文档。

local_path 字段会被保存到图片块数据中
 语法local_path:D:\00-work_study\path\to\image.pnglocal_path 字段upload_image_file() 函数上传到飞书update_image_block_token() 函数设置 tokenPOST /open-apis/docx/v1/documents/{doc_id}/blocks/{parent_id}/children
{
"children": [{
"block_type": 27,
"image": {}
}]
}
POST /open-apis/drive/v1/medias/upload_all
Content-Type: multipart/form-data
file=@D:/00-work_study/AIsthdy/test-claude/test_upload.png; filename=test_upload.png
file_name=test_upload.png
parent_type=docx_image
parent_node={image_block_id}
size=1024
PATCH /open-apis/docx/v1/documents/{doc_id}/blocks/{image_block_id}
{
"replace_image": {
"token": "{file_token}"
}
}
# 我的图片测试

---
上传成功后,图片将在飞书文档中显示!
---
更新时间:2025-02-13
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.