Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

feishu-document-reader飞书文档阅读器

Agent Skill

feishu-document-reader 用于整理文档、README、Markdown 和说明材料,适合在 OpenClaw 中需要把零散信息整理成结构清晰的文档时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

13,176

周安装

549

GitHub Stars

公开资料未说明

下载量

4,392
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:feishu-document-reader(飞书文档阅读器)
来源仓库:https://github.com/alfredxia-ai/feishu-document-reader
安装命令:
openclaw skills install feishu-document-reader
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install feishu-document-reader

简介

使用飞书官方 API 提取各类文档内容。feishu-document-reader 属于开发类 Skill,可作为该场景下的辅助能力补充。

  • 适合信息抽取、知识库构建与自动化处理任务。
  • 覆盖主流文档类型,保证数据获取的完整性。
  • 依赖官方接口稳定性,需处理可能的速率限制。
  • 可能涉及大量文本读取,建议优化内存使用策略。

SKILL.md

name
feishu-doc-reader
description
Read and extract content from all Feishu (Lark) document types using the official Feishu Open API
metadata
{"moltbot":{"emoji":"📄","requires":{"bins":["python3","curl"]}}}

Feishu Document Reader

This skill enables reading and extracting content from all Feishu (Lark) document types using the official Feishu Open API.

Configuration

Set Up the Skill

  1. Create the configuration file at ./reference/feishu_config.json with your Feishu app credentials:
{
  "app_id": "your_feishu_app_id_here",
  "app_secret": "your_feishu_app_secret_here"
}
  1. Make sure the scripts are executable:
chmod +x scripts/read_doc.sh
chmod +x scripts/read_feishu.sh
chmod +x scripts/get_blocks.sh

Security Note: The configuration file should be kept secure and not committed to version control. Consider using proper file permissions (chmod 600 ./reference/feishu_config.json).

Usage

Unified Document Reader (推荐)

使用统一文档读取器可以自动识别并读取所有支持的文档类型:

# 自动识别文档类型并读取
./scripts/read_feishu.sh "docx_xxxxxxxxxxxxxx"
./scripts/read_feishu.sh "sheet_xxxxxxxxxxxxx"
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx"
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxx"

# 从URL直接读取
./scripts/read_feishu.sh "https://xxx.feishu.cn/docx/xxxxx"

# 指定文档类型
./scripts/read_feishu.sh "token" --type bitable

# 格式化JSON输出
./scripts/read_feishu.sh "token" --pretty

# 只输出文本内容
./scripts/read_feishu.sh "docx_token" --output text

Wiki Knowledge Base (知识库)

读取飞书知识库节点和内容:

# 读取单个Wiki节点
./scripts/read_feishu.sh "wikcnxxxxxxxxxxxxxx" --type wiki

# 读取整个知识空间
./scripts/read_feishu.sh --wiki-space "SPACE_ID"

# 递归读取所有子节点内容
./scripts/read_feishu.sh --wiki-space "SPACE_ID" --recursive

Bitable (多维表格)

读取飞书多维表格数据:

# 读取多维表格(包含所有数据表和记录)
./scripts/read_feishu.sh "basexxxxxxxxxxxxxx" --type bitable

Basic Document Reading

# 读取新版文档
./scripts/read_doc.sh "docx_xxxxxxxxxxxxxx"

# 读取电子表格
./scripts/read_doc.sh "sheet_xxxxxxxxxxxxx" sheet

# 读取多维表格
./scripts/read_doc.sh "basexxxxxxxxxxxxxx" bitable

# 读取知识库节点
./scripts/read_doc.sh "wikcnxxxxxxxxxxxxx" wiki

Get Detailed Document Blocks

For complete document structure with all blocks:

# Get full document blocks structure
./scripts/get_blocks.sh "docx_AbCdEfGhIjKlMnOpQrStUv"

Using Python directly:

python scripts/feishu_reader.py "docx_token" --pretty
python scripts/feishu_reader.py "sheet_token" --type sheet
python scripts/feishu_reader.py --wiki-space "SPACE_ID" --recursive

Supported Document Types

类型Token前缀说明支持程度
docxdocx_新版飞书文档✅ 完整支持
docdoc_旧版飞书文档✅ 基本支持
sheetsheet_, shtcn电子表格✅ 完整支持
bitablebase, bascn多维表格✅ 完整支持
wikiwikcn知识库节点✅ 完整支持
slides-幻灯片⚠️ 仅元数据

Features

Enhanced Content Extraction

  • Structured output: Clean JSON with document metadata, content blocks, and hierarchy
  • Complete blocks access: Full access to all document blocks including text, tables, images, headings, lists, etc.
  • Block hierarchy: Proper parent-child relationships between blocks
  • Text extraction: Automatic text extraction from complex block structures
  • Table support: Proper table parsing with row/column structure
  • Image handling: Image URLs and metadata extraction
  • Link resolution: Internal and external link extraction

Block Types Supported

  • text: Plain text and rich text content
  • heading1/2/3: Document headings with proper hierarchy
  • bullet/ordered: List items with nesting support
  • table: Complete table structures with cells and formatting
  • image: Image blocks with tokens and metadata
  • quote: Block quotes
  • code: Code blocks with language detection
  • equation: Mathematical equations
  • divider: Horizontal dividers
  • page: Page breaks (in multi-page documents)

Error Handling & Diagnostics

  • Detailed error messages: Clear explanations for common issues
  • Permission validation: Checks required permissions before making requests
  • Token validation: Validates document tokens before processing
  • Retry logic: Automatic retries for transient network errors
  • Rate limiting: Handles API rate limits gracefully

Security Features

  • Secure credential storage: Supports both environment variables and secure file storage
  • No credential logging: Credentials never appear in logs or output
  • Minimal permissions: Uses only required API permissions
  • Access token caching: Efficient token reuse to minimize API calls

Command Line Options

Main Document Reader

# Python script options
python scripts/read_feishu_doc.py --help

# Shell script usage
./scripts/read_doc.sh <doc_token> [doc|sheet|slide]

Blocks Reader (NEW)

# Get full document blocks
./scripts/get_blocks.sh <doc_token>

# Get specific block
./scripts/get_blocks.sh <doc_token> <block_id>

# Include children blocks
./scripts/get_blocks.sh <doc_token> "" true

# Python options
python scripts/get_feishu_doc_blocks.py --help

API Permissions Required

Your Feishu app needs the following permissions based on document types:

基础权限(必需)

  • docx:document:readonly - 读取新版文档内容
  • doc:document:readonly - 读取旧版文档内容

电子表格

  • sheets:spreadsheet:readonly - 读取电子表格内容

多维表格 (Bitable)

  • bitable:app:readonly - 读取多维表格元信息
  • bitable:record:read - 读取多维表格记录

知识库 (Wiki)

  • wiki:wiki:readonly - 读取知识库节点信息

云空间(可选)

  • drive:drive:readonly - 读取云空间文件信息

Error Handling

Common errors and solutions:

认证错误

  • 401 Unauthorized: 检查 App ID 和 App Secret 是否正确
  • Token expired: 访问令牌2小时过期,会自动刷新

权限错误

  • 403 Forbidden: 检查应用权限配置和文档共享设置
  • 99991663: 应用没有访问该文档的权限
  • 10002: 应用权限不足,请在开放平台配置所需权限

资源错误

  • 404 Not Found: 检查文档token是否正确
  • 99991664: 文档不存在或已被删除

特定类型错误

  • Wiki节点无法读取: 检查 wiki:wiki:readonly 权限
  • Bitable记录为空: 检查 bitable:record:read 权限
  • Sheet数据缺失: 检查工作表是否有数据,权限是否足够

Examples

读取各类文档

# 新版文档 (docx)
./scripts/read_feishu.sh "docx_AbCdEfGhIjKlMnOp" --pretty

# 电子表格 (sheet)
./scripts/read_feishu.sh "sheet_XyZ123AbCdEfGh" --type sheet

# 多维表格 (bitable)
./scripts/read_feishu.sh "baseAbCdEfGhIjKlMn" --type bitable --pretty

# 知识库节点 (wiki)
./scripts/read_feishu.sh "wikcnAbCdEfGhIjKl" --type wiki

知识库操作

# 读取单个节点及其内容
./scripts/read_feishu.sh "wikcnAbCdEfGhIjKl" --type wiki --pretty

# 读取整个知识空间
./scripts/read_feishu.sh --wiki-space "7xxxxxxxxxx" --pretty

# 递归读取知识空间所有内容
./scripts/read_feishu.sh --wiki-space "7xxxxxxxxxx" --recursive

从URL读取

# 直接从飞书URL读取(自动识别类型)
./scripts/read_feishu.sh "https://xxx.feishu.cn/docx/xxxxx"
./scripts/read_feishu.sh "https://xxx.feishu.cn/wiki/xxxxx"
./scripts/read_feishu.sh "https://xxx.feishu.cn/base/xxxxx"

输出格式控制

# JSON格式(默认)
./scripts/read_feishu.sh "docx_token"

# 格式化JSON
./scripts/read_feishu.sh "docx_token" --pretty

# 仅输出纯文本
./scripts/read_feishu.sh "docx_token" --output text

Python直接调用

# 统一读取器
python scripts/feishu_reader.py "docx_token" --pretty
python scripts/feishu_reader.py "base_token" --type bitable
python scripts/feishu_reader.py --wiki-space "SPACE_ID" --recursive

# 文档blocks专用
python scripts/get_feishu_doc_blocks.py "docx_token"

Security Notes

  • Never commit credentials: Keep app secrets out of version control
  • Use minimal permissions: Only request permissions your use case requires
  • Secure file permissions: Set proper file permissions on secret files (chmod 600)
  • Environment isolation: Use separate apps for development and production
  • Audit access: Regularly review which documents your app can access

Troubleshooting

Authentication Issues

  1. Verify your App ID and App Secret in Feishu Open Platform
  2. Ensure the app has been published with required permissions
  3. Check that environment variables or config files are properly set
  4. Test with the test_auth.py script to verify credentials

Document Access Issues

  1. Ensure the document is shared with your app or in an accessible space
  2. Verify the document token format (should start with docx_, doc_, or sheet_)
  3. Check if the document requires additional sharing permissions

Network Issues

  1. Ensure your server can reach open.feishu.cn
  2. Check firewall rules if running in restricted environments
  3. The script includes retry logic for transient network failures

Blocks-Specific Issues

  1. Empty blocks response: Document might be empty or have no accessible blocks
  2. Missing block types: Some block types require additional permissions
  3. Incomplete hierarchy: Use --include-children flag for complete block tree

References

官方文档

文档相关

表格相关

知识库相关

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.22%
按下载量换算3,128

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills