File Transfer

# File Transfer Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "File Transfer" with this command: npx skills add ghostwritten/file-transfer

File Transfer Skill

Overview

Context-aware file transfer skill for OpenClaw ecosystem. Intelligently transfers files based on conversation context with progress tracking.

Features

  • Context-Aware: Automatically detects group/private chat and infers transfer intent
  • File Validation: MIME type checking, size limits, chunked reading
  • Telegram Support: Full adapter with progress tracking (simulated)
  • Extensible: Adapter pattern for adding new channels

Installation

npm install file-transfer

Usage

Basic File Transfer

import { FileTransferSkill } from 'file-transfer';

const skill = new FileTransferSkill({
  channels: { telegram: { enabled: true } }
});

const result = await skill.sendFileWithContext({
  file: '/path/to/document.pdf',
  caption: 'Team weekly report',
  context: { chatId: '-1003655501651' }
});

Direct Adapter Usage

import { TelegramAdapter } from 'file-transfer/src/adapters/telegram-adapter.js';

const adapter = new TelegramAdapter();
const result = await adapter.sendFile({
  filePath: '/path/to/file.pdf',
  chatId: '-1003655501651',
  caption: 'Document sharing'
});

Tool Definitions

sendFileWithContext

Transfers a file with intelligent context detection.

Parameters:

  • file (string, required): Path to the file
  • caption (string, optional): File description
  • context (object, optional): Conversation context with chatId

Returns:

  • success (boolean): Transfer success status
  • messageId (string): Message ID
  • context (object): Context analysis result (scenario, urgency, confidence)
  • stats (object): Transfer statistics (size, duration, channel)

getTransferHistory

Retrieves file transfer history.

Parameters:

  • options (object, optional): Query options

Returns:

  • history (array): Transfer history records
  • stats (object): Transfer statistics

Configuration

const skill = new FileTransferSkill({
  contextEngine: {
    enableAI: false,
    maxHistoryLength: 10
  },
  file: {
    maxFileSize: 100 * 1024 * 1024,  // 100MB
    allowedMimeTypes: ['application/pdf', 'image/jpeg', ...]
  },
  channels: {
    telegram: {
      enabled: true,
      maxFileSize: 50 * 1024 * 1024  // 50MB
    }
  }
});

Context Analysis

The ContextEngine analyzes file transfers and returns:

FieldValuesDescription
scenarioshare, backup, collaborate, archiveTransfer intent
urgencylow, medium, high, criticalPriority level
confidence0.0 - 1.0Analysis confidence
fileCategorydocument, image, video, archive, codeFile classification

Current Limitations

  • Telegram adapter uses simulated transfer (no real API integration yet)
  • WhatsApp and Discord adapters are planned but not implemented
  • Transfer history is not persisted

Testing

npm test                  # All tests
npm run test:unit         # Unit tests
npm run test:integration  # Integration tests

License

MIT License - see LICENSE for details.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Agent2RSS - AI Content to RSS Feed

Agent2RSS 客户端,管理 RSS 频道并推送内容。触发:用户提到 Agent2RSS/RSS 频道/推送文章/上传文章/创建频道/设置默认频道/幂等性。

Registry SourceRecently Updated
7741Profile unavailable
Automation

Audos – Launch a Startup Via OpenClaw in 10 Minutes

Create AI-powered startup workspaces via Audos API. Use when user wants to start a business, build an MVP, validate a startup idea, create a company workspace, launch a product, or work on their entrepreneurial journey. Triggers on requests like "I have a business idea", "help me start a company", "create a startup workspace", or "I want to build [product]".

Registry SourceRecently Updated
1K0Profile unavailable
Automation

Feishu Calendar Intelligent Scheduler

飞书智能日历调度器 - 自动推荐最佳会议时间,批量管理日程,生成会议报表

Registry SourceRecently Updated
2340Profile unavailable
Automation

Workbuddy Add Memory

为WorkBuddy添加更智能的记忆管理功能:自动知识蒸馏→智能检索→工作前回忆

Registry SourceRecently Updated
2690Profile unavailable