← Back to Skills Marketplace
timyljob2011-sudo

auto-file-sender

by timyljob2011-sudo · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
200
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install auto-file-sender
Description
Automatically send files from workspace to Feishu/Lark when files are generated or updated. Use when: (1) User creates new documents and wants them delivered...
README (SKILL.md)

Auto File Sender

Overview

This skill enables automatic file delivery from the workspace to Feishu/Lark users. When files are generated (documents, PDFs, images, etc.), they can be automatically sent to specified recipients without manual intervention.

Key Capabilities:

  • Auto-detect new files in workspace
  • Send via Feishu message with file attachment
  • Support batch sending of multiple files
  • Configurable file type filters and recipient rules

Quick Start

Basic Usage

When a file is ready to send:

// Single file
{
  "action": "send",
  "filePath": "/root/.openclaw/workspace/document.docx",
  "filename": "document.docx",
  "message": "Here's your file!",
  "target": "user_open_id"
}

Auto-Send on File Creation

The skill provides a helper script to watch for new files and auto-send:

# Watch workspace and auto-send new files
python3 scripts/auto_send.py --watch /root/.openclaw/workspace --recipient USER_OPEN_ID

Workflow

Step 1: Identify Files to Send

Check for recently created/modified files:

# List files created in last 10 minutes
find /root/.openclaw/workspace -type f -mmin -10

Step 2: Send Files

Use the message tool with filePath parameter:

{
  "action": "send",
  "filePath": "\x3Cabsolute-path-to-file>",
  "filename": "\x3Cdisplay-filename>",
  "message": "\x3Coptional-message>",
  "target": "\x3Crecipient-open-id>"
}

Parameters:

  • filePath: Absolute path to the file (required)
  • filename: Display name for the file (optional, defaults to basename)
  • message: Accompanying text message (optional)
  • target: Recipient open_id (defaults to current user if omitted)

Step 3: Confirm Delivery

Check the response for successful delivery:

  • messageId: ID of the sent message
  • chatId: ID of the chat/channel

Supported File Types

Type Extensions Max Size
Documents .docx, .doc, .pdf 30MB
Images .jpg, .png, .gif, .webp 30MB
Spreadsheets .xlsx, .xls, .csv 30MB
Archives .zip, .tar.gz 30MB
Others Any 30MB

Batch Sending

To send multiple files at once:

// Send files sequentially
for (const file of files) {
  await message.send({
    action: "send",
    filePath: file.path,
    filename: file.name
  });
}

Configuration

Default Settings

  • Source directory: /root/.openclaw/workspace
  • Max file size: 30MB (Feishu limit)
  • Auto-recipient: Current conversation user

Custom Recipient

To send to a specific user:

{
  "action": "send",
  "target": "ou_a65105519c863f8544fb22b40c468063",  // User's open_id
  "filePath": "/path/to/file"
}

Scripts

scripts/auto_send.py

Python script for watching directories and auto-sending files.

Usage:

python3 scripts/auto_send.py [options]

Options:
  --watch PATH       Directory to watch (default: workspace)
  --recipient ID     Target recipient open_id
  --pattern PATTERN  File pattern to match (default: *)
  --once             Send existing files and exit (don't watch)

Examples:

# Watch and auto-send all new PDFs
python3 scripts/auto_send.py --pattern "*.pdf" --recipient USER_ID

# One-time send of all docx files
python3 scripts/auto_send.py --pattern "*.docx" --once

Troubleshooting

File Not Found

  • Ensure file path is absolute
  • Verify file exists: ls -la \x3Cfilepath>
  • Check file permissions

Send Failed

  • Verify file size \x3C 30MB
  • Check recipient open_id is correct
  • Ensure bot has permission to send files

Large Files

For files > 30MB:

  1. Compress: zip -r output.zip large_file
  2. Split: split -b 25M large_file part_
  3. Use cloud storage and send link instead

Best Practices

  1. Always verify files exist before sending
  2. Use descriptive filenames for better organization
  3. Batch similar files to reduce API calls
  4. Clean up sent files periodically to save space
  5. Log sent files for tracking (optional)

Examples

Example 1: Send Generated Document

User: "Generate a report and send it to me"

// After generating the report
{
  "action": "send",
  "filePath": "/root/.openclaw/workspace/report_2024.docx",
  "filename": "Annual_Report_2024.docx",
  "message": "Here's your annual report!"
}

Example 2: Send Multiple Files

User: "Send all the PDFs in my workspace"

# Find and send all PDFs
find /root/.openclaw/workspace -name "*.pdf" -exec \
  python3 -c "import sys; print(sys.argv[1])" {} \;

Then send each file using the message tool.

Example 3: Auto-Send on Completion

After a long-running task generates output:

// Task completed, auto-send result
{
  "action": "send",
  "filePath": "/root/.openclaw/workspace/output.pdf",
  "message": "Task completed! Here's your file."
}
Usage Guidance
This skill does not actually implement Feishu/Lark API calls or request credentials — it scans your workspace and prints JSON 'message.send' commands that the platform or an agent would need to execute to deliver files. Before installing or running: (1) Understand whether your agent/platform will automatically execute those printed send commands and whether it has Feishu credentials — if so, the skill can forward any matching file from the workspace (potential data exfiltration). (2) Prefer running with --once to preview which files would be sent. (3) Limit the watch directory to a safe folder, add strict patterns, and review/inspect any sensitive files in the workspace. (4) If you expect the skill to handle sending itself, require a version that implements Feishu API calls and documents credential handling. (5) If unsure, treat this as untrusted automation and do not run watch mode unattended.
Capability Analysis
Type: OpenClaw Skill Name: auto-file-sender Version: 1.0.1 The 'auto-file-sender' skill is a productivity tool designed to automate the delivery of workspace files to Feishu/Lark. It includes a Python helper script (scripts/auto_send.py) that monitors a directory for new files and outputs JSON-formatted tool calls for the AI agent to execute. The code is transparent, lacks obfuscation, and does not attempt to exfiltrate sensitive system data (like SSH keys or environment variables) or communicate with unauthorized external endpoints. While it facilitates moving data out of the workspace, it does so through the agent's authorized messaging tools as described in its documentation (SKILL.md).
Capability Assessment
Purpose & Capability
The name/description promise automatic delivery to Feishu/Lark, but the Python script does not call any Feishu API, does not use any bot token/credentials, and instead generates JSON 'message.send' tool calls. No environment variables or credentials are declared for Feishu. Either the skill relies on the platform's message tool to have pre-configured credentials (not documented) or it cannot actually send files as advertised — this is an incoherence.
Instruction Scope
SKILL.md and the script instruct scanning and watching /root/.openclaw/workspace (and arbitrary directories via --watch) and produce/send commands containing absolute file paths. The script reads any files in the workspace and prints JSON commands that include those paths. This behavior aligns with 'send files', but it grants the skill broad discretion to read and forward workspace files — something users should explicitly approve.
Install Mechanism
Instruction-only with a small bundled script; there is no install spec, no downloads, and nothing written to system directories by an installer. Risk from install mechanism is low.
Credentials
The skill requests no credentials or env vars, yet claims to interact with Feishu/Lark. Real Feishu integration normally requires API credentials. The lack of declared credentials suggests the skill expects the host agent/tooling to provide send capability (and associated secrets) implicitly — this should be documented and justified. Also, the script will read arbitrary files from the workspace, which is proportionate to 'send files' but raises data exposure concerns if sensitive files exist.
Persistence & Privilege
The skill is not always-enabled and does not request persistent platform privileges. It does not modify other skills or system-wide settings. Running watch mode grants runtime autonomy to scan and emit send commands, but that is normal for a watcher script and not an elevated privilege by itself.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install auto-file-sender
  3. After installation, invoke the skill by name or use /auto-file-sender
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Version 1.0.1 - No file changes were detected in this release. - All features and functionality remain the same as the previous version.
v1.0.0
Initial release of auto-file-sender. - Automatically sends files from the workspace to Feishu/Lark when generated or updated. - Supports documents, images, spreadsheets, and archives up to 30MB. - Includes batch and auto-send capabilities via helper script. - Allows configurable file filters and recipient rules. - Provides troubleshooting steps and best practices.
Metadata
Slug auto-file-sender
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is auto-file-sender?

Automatically send files from workspace to Feishu/Lark when files are generated or updated. Use when: (1) User creates new documents and wants them delivered... It is an AI Agent Skill for Claude Code / OpenClaw, with 200 downloads so far.

How do I install auto-file-sender?

Run "/install auto-file-sender" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is auto-file-sender free?

Yes, auto-file-sender is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does auto-file-sender support?

auto-file-sender is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created auto-file-sender?

It is built and maintained by timyljob2011-sudo (@timyljob2011-sudo); the current version is v1.0.1.

💬 Comments