← Back to Skills Marketplace
ghostwritten

File Transfer

by Ghostwritten · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ✓ Security Clean
136
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install file-transfer
Description
Transfers files intelligently based on chat context with MIME validation and progress tracking, supporting Telegram and extensible channels.
README (SKILL.md)

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:

Field Values Description
scenario share, backup, collaborate, archive Transfer intent
urgency low, medium, high, critical Priority level
confidence 0.0 - 1.0 Analysis confidence
fileCategory document, image, video, archive, code File 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.

Usage Guidance
This package appears to implement what it claims: a local, simulated file-transfer library with Telegram adapter logic but no real network/bot integration and no credential requests. Before installing: 1) prefer obtaining the package from a trusted registry or the referenced GitHub repo to confirm provenance; 2) if you later enable a real Telegram adapter, be careful where you provide the bot token (only pass it to code you trust) and verify the adapter's implementation for secure storage/usage of tokens; 3) note the library will create temp files under /tmp by default—if that is a concern set a custom tempDir; 4) the package simulates chunk data in readFileInChunks rather than streaming actual file bytes — review and modify that behavior before using with real transfers. If you want further assurance, provide the exact npm package source (registry URL or tarball) or run a dependency audit/build in an isolated environment and I can re-evaluate.
Capability Analysis
Type: OpenClaw Skill Name: file-transfer Version: 0.2.0 The 'file-transfer' skill bundle is a well-documented and professionally structured framework for managing file transfers within the OpenClaw ecosystem. It features a ContextEngine for intent analysis, a FileManager for size and MIME-type validation, and a TelegramAdapter that currently operates in a simulation mode. The code follows standard security practices for file handling, such as path validation and temporary file cleanup, and includes a comprehensive suite of unit and integration tests. No evidence of malicious intent, data exfiltration, or unauthorized execution was found across the source code (src/), documentation (docs/), or agent instructions (SKILL.md).
Capability Assessment
Purpose & Capability
Name/description match the implementation: a FileTransferSkill with a ContextEngine, FileManager, and a TelegramAdapter (simulated). The code implements MIME checks, chunking, progress tracking and context analysis as advertised. Minor metadata mismatch: registry says 'instruction-only' but the package includes full source and package.json with a GitHub repo URL.
Instruction Scope
SKILL.md instructs using the library API (import and call sendFileWithContext or adapter methods). It does not instruct reading unrelated files, environment variables, or sending data to unexpected external endpoints. The README/SKILL.md and code consistently note that Telegram integration is simulated and no bot token or external network call is performed by the current code.
Install Mechanism
No install spec in the registry, but package.json is present and references normal npm installation. There are no downloads from arbitrary URLs or extract/install steps. Dependencies are minimal and from npm (mime-types).
Credentials
The skill requests no environment variables, no credentials, and no external config paths. Example/chat IDs are provided only as parameters. The code does not attempt to read other environment secrets.
Persistence & Privilege
The skill is not always-enabled and may be invoked by the model normally. It writes temporary files under /tmp (default tempDir '/tmp/file-transfer'); this is proportionate to file transfer functionality but you should be aware it will create and delete temp files on disk while in use.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install file-transfer
  3. After installation, invoke the skill by name or use /file-transfer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.0
Rename from openclaw-file-transfer-skill: package is platform-agnostic, works with any AI agent (Claude, OpenAI, OpenClaw)
Metadata
Slug file-transfer
Version 0.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is File Transfer?

Transfers files intelligently based on chat context with MIME validation and progress tracking, supporting Telegram and extensible channels. It is an AI Agent Skill for Claude Code / OpenClaw, with 136 downloads so far.

How do I install File Transfer?

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

Is File Transfer free?

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

Which platforms does File Transfer support?

File Transfer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created File Transfer?

It is built and maintained by Ghostwritten (@ghostwritten); the current version is v0.2.0.

💬 Comments