Loading...
Loading...
Read content from Feishu cloud documents or knowledge bases and analyze document structure. It is used when users request to "view", "read", "analyze", "fetch", "open" Feishu documents or knowledge bases. It supports reading via document ID, knowledge base Token or URL. Markdown is used as the intermediate format and stored in the /tmp directory.
npx skill4agent add riba2534/feishu-cli feishu-cli-read/tmp/feishu-read <document_id>
/feishu-read <node_token>
/feishu-read <url>/docx/doc export/wiki/wiki exportfeishu-cli doc export <document_id> --output /tmp/feishu_doc.md --download-images --assets-dir /tmp/feishu_assetsfeishu-cli wiki export <node_token> --output /tmp/feishu_wiki.md --download-images --assets-dir /tmp/feishu_assets--download-images--front-matter--highlight<span>--expand-mentions/tmp/feishu_assets# List downloaded images
ls /tmp/feishu_assets/
# Use Read tool to view images (Claude supports multimodal)
# Read /tmp/feishu_assets/image_1.png| URL Format | Type | Command |
|---|---|---|
| Regular Document | |
| Knowledge Base | |
| Regular Document | |
| Knowledge Base | |
# Read regular document
/feishu-read <document_id>
/feishu-read https://xxx.feishu.cn/docx/<document_id>
# Read knowledge base document
/feishu-read <node_token>
/feishu-read https://xxx.feishu.cn/wiki/<node_token># Knowledge base document
feishu-cli wiki export <node_token> \
--output /tmp/doc.md \
--download-images \
--assets-dir /tmp/doc_assets
# Regular document
feishu-cli doc export <document_id> \
--output /tmp/doc.md \
--download-images \
--assets-dir /tmp/doc_assetsls -la /tmp/doc_assets/
# Output example:
# image_1.png (403KB)
# image_2.png (394KB)# Use Read tool in Claude to read images
Read /tmp/doc_assets/image_1.png
Read /tmp/doc_assets/image_2.png# 1. Export document and images
feishu-cli wiki export <node_token> \
-o /tmp/wiki_doc.md \
--download-images \
--assets-dir /tmp/wiki_assets
# 2. View image list
ls /tmp/wiki_assets/
# 3. Read Markdown content
# Read /tmp/wiki_doc.md
# 4. Read each image to understand content
# Read /tmp/wiki_assets/image_1.png
# Read /tmp/wiki_assets/image_2.png
# 5. Report to user after comprehensive analysis[Wiki Directory - Use 'wiki nodes <space_id> --parent <node_token>' to get the list of child nodes]# 1. First get node information, record space_id
feishu-cli wiki get <node_token>
# 2. List child nodes under this node
feishu-cli wiki nodes <space_id> --parent <node_token># Step 1: Try to export the document
feishu-cli wiki export <node_token> -o /tmp/doc.md
# Step 2: Check content
# If it shows "[Wiki Directory...]", it is a directory node
# Step 3: Get node information
feishu-cli wiki get <node_token>
# Record space_id and has_child fields
# Step 4: Get child nodes
feishu-cli wiki nodes <space_id> --parent <node_token>
# Step 5: Export child nodes one by one
feishu-cli wiki export <child_node_token_1> -o /tmp/child1.md
feishu-cli wiki export <child_node_token_2> -o /tmp/child2.md| Error | Cause | Solution |
|---|---|---|
| Parameter error | Check token format |
| Node does not exist | Check if the token is correct |
| No access permission | Confirm the application has wiki:wiki:readonly permission |
| Knowledge space does not exist | Check if space_id is correct |
Empty content or | Special block type | See the "Directory Node Identification" section |
--assets-dir<!-- Unknown block type: XX -->feishu-cli doc blocks <doc_id> --all# Add --debug to view detailed error information
feishu-cli wiki export <token> --debug
# Retry after waiting a few seconds
sleep 5 && feishu-cli wiki export <token>| Feishu Block Type | Markdown Representation |
|---|---|
| Callout highlight block | 6 types of GitHub-style alerts such as |
| Block/inline formula | |
| Board | |
| ISV block (Mermaid) | Board link |
| QuoteContainer | |
| AddOns/SyncedBlock | Transparently expand child block content |
| Iframe | |
--highlight<span style="color:...">feishu://media/<token>