- Home
- Skills
- Rosalynyang
- Feishu Doc Creator Skill
- Feishu Block Adder
feishu-block-adder_skill
- Python
5
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill rosalynyang/feishu-doc-creator-skill --skill feishu-block-adder- SKILL.md3.4 KB
Overview
This skill adds parsed block data into Feishu (Lark) documents in batches, handling text, headings, lists, code, quotes, callouts, dividers, todos, and images. It accepts parser output and document metadata, processes blocks in safe batch sizes, and now supports uploading local images to Feishu before inserting image blocks.
How this skill works
The skill loads a blocks.json produced by the Markdown parser and a doc_info.json containing the target document ID. It groups blocks into batches (up to 20 per request) to avoid API rate limits, creates blocks via the Feishu doc API, and records results to output/add_result.json. For local images it creates an empty image block, uploads the file to Feishu Drive, and patches the image block with the returned file token so the image displays in the document.
When to use it
- You have Markdown parsed into feishu-md-parser block JSON and need to populate a Feishu document programmatically.
- You must upload local images referenced in Markdown into a Feishu document.
- You want to avoid Feishu API rate limits by batching block insertions.
- You need support for common block types (text, headings, lists, code, quote, callout, todo, divider, image).
- You want a deterministic output log of added blocks for auditing or retry logic.
Best practices
- Ensure blocks.json and doc_info.json are created by the corresponding parser/creator steps before running this skill.
- Keep local image paths absolute or valid relative paths so the skill can find and upload files.
- Validate image sizes: Feishu API commonly limits files (e.g., 10 MB); skip or resize larger images to avoid failures.
- Handle partial failures by inspecting output/add_result.json and retrying failed batches selectively.
- Limit concurrent runs against the same document to reduce conflict and rate-limit errors.
Example use cases
- Convert a Markdown file with embedded local images into a Feishu document with images uploaded and embedded.
- Batch-import structured content (headings, lists, code blocks) produced by a static site generator into a collaboration doc.
- Automate report creation where content is parsed into blocks and inserted into a shared Feishu document.
- Migrate documentation fragments from Markdown repositories into centralized Feishu docs while preserving block structure.
- Generate a document draft from parsed content, inspect add_result.json, and patch or re-run batches if needed.
FAQ
Local images are uploaded in three steps: create an empty image block, upload the file to Feishu Drive, then patch the image block with the returned file token. Network image URLs are left as links and not uploaded.
What block types are supported?
Common blocks are supported: text, heading levels 1–6, bullet and ordered lists, code, quote, todo, callout, divider, and image blocks (local upload supported).
Why batch blocks?
Batches (up to 20 blocks each) reduce the chance of hitting Feishu API rate limits and make retries easier for partial failures.