ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified file management Safety 4/5

feishu_file_fetch

Implements a Clawdbot extension tool that downloads Feishu files by message_id and file_key, streams to disk with sha256, size limits, and path traversal protection. Use when the user asks to build or update the feishu_file_fetch tool, Feishu file download workflow, or Clawdbot extension handling message_id/file_key inputs.

Why use this skill?

Securely download Feishu files into your OpenClaw environment. This automated tool supports SHA256 verification, size limits, and path traversal protection for safe file management.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/dingshuxin353/feishu-file-fetch
Or

What This Skill Does

The feishu_file_fetch skill is a specialized utility designed for the OpenClaw ecosystem to automate the secure retrieval of documents, media, and other assets hosted on Feishu (Lark) servers. By integrating directly with the Feishu IM v1 API, the tool enables agents to fetch files using specific message_id and file_key identifiers. The implementation is architected with a primary focus on security and reliability: it handles token authentication (caching and automatic refreshing of the tenant_access_token), streams data directly to disk to maintain a low memory footprint, and enforces strict size constraints (default 100MB) to prevent system resource exhaustion. The skill includes robust path traversal protection, ensuring that downloaded files are always isolated within a designated, secure output directory, and it verifies file integrity post-download via SHA256 checksums.

Installation

To integrate this skill into your OpenClaw environment, use the following terminal command: clawhub install openclaw/skills/skills/dingshuxin353/feishu-file-fetch

Ensure that you have your environment variables FEISHU_APP_ID and FEISHU_APP_SECRET correctly configured in your agent workspace, as these are required to authorize the API requests. The script is designed to run using only standard Python libraries, eliminating the need for complex dependency management or environment configurations.

Use Cases

This skill is ideal for workflows involving automated document processing, such as fetching team meeting notes, logs, or attachments sent via Feishu. It is particularly useful for developers building automated CI/CD pipelines where artifacts are shared in chat, or for data analysts who need to ingest raw data files directly from Feishu into a local sandbox for processing. By automating the download process, it removes the manual overhead of authentication and browser-based file exporting.

Example Prompts

  1. "Download the latest project requirement document sent by the manager in the team channel. The message ID is om_123456 and the file key is file_abc789."
  2. "Update my file fetch tool configuration to strictly enforce a 50MB limit and output the result to my local /data/downloads folder."
  3. "Fetch the asset with key file_xyz999 from Feishu message om_987654 and confirm the sha256 hash for verification."

Tips & Limitations

  • Security: The script utilizes atomic os.replace operations, ensuring that files are only made available once the download and checksum verification are successfully completed.
  • Efficiency: The tool uses streaming headers to check Content-Length before initiating the download, preventing unnecessary network traffic and protecting your disk space.
  • Limitations: This tool is strictly for Feishu IM resources. It does not support broader document management systems (like Feishu Docs/Wiki) unless accessed through the message resources API. Always ensure your disk has sufficient temporary space before running, as the script creates a temporary file before finalization.

Metadata

Stars1100
Views0
Updated2026-02-17
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-dingshuxin353-feishu-file-fetch": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#feishu#automation#file-download#api-integration#lark
Safety Score: 4/5

Flags: network-access, file-write, file-read, external-api