Upload Handler Generator for Openclaw

A specialized code generator that automates the creation of secure and efficient file upload handlers for various storage backends.

lxgicstudios
v1.0.1
Jan 29, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install upload-gen

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install upload-gen using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Upload Handler Generator?

The Upload Handler Generator is a developer-centric utility designed to simplify the complex task of managing file uploads in modern applications. As a key part of the Openclaw Skills suite, it allows developers to quickly generate robust code for Express, Fastify, or serverless environments. Whether you need to handle local storage, AWS S3, or Cloudflare R2, this tool automates the creation of middleware, validation logic, and storage integration. It ensures that security best practices—such as file type verification and size limits—are baked into your application from day one, reducing the risk of common vulnerabilities associated with user-generated content.

Upload Handler Generator Use Cases

  • Adding secure profile picture uploads with strict image type validation.
  • Creating document management features that require specific file size limits.
  • Building media libraries that utilize Cloudflare R2 or Google Cloud Storage.
  • Implementing large file transfers using presigned URL flows to minimize server overhead.

How Upload Handler Generator Works

  1. Select your target storage provider (e.g., S3, local, or GCS) and define your validation requirements.
  2. Run the generator using a natural language prompt via the CLI.
  3. The tool analyzes the prompt to produce tailored middleware and storage handler code.
  4. Copy the generated code directly into your project to handle multipart uploads or presigned URL requests.

Upload Handler Generator Setup

This tool requires Node.js 18 or higher. You can run it directly without a global installation using npx, making it a highly accessible part of the Openclaw Skills ecosystem.

npx ai-upload "images to S3 with 5MB limit"

To view all available options, use the help command:

npx ai-upload --help

Upload Handler Generator Data Schema & Taxonomy

The generator produces structured code components that organize upload metadata and file handling logic as follows:

Component Purpose
Storage Interface Defines the connection logic for S3, R2, or local paths.
Validation Logic Enforces rules for file extensions, MIME types, and maximum sizes.
Presigned URL Logic (Optional) Generates secure tokens for direct-to-cloud client uploads.
Error Handling Provides structured responses for failed uploads or validation errors.

Upload Handler Generator Advanced Features

  • Native support for diverse storage backends including Cloudflare R2 and GCS.
  • Multipart upload support for handling very large files reliably.
  • Integrated progress tracking capabilities using the --with-progress flag.
  • Automatic generation of presigned URL logic for optimized client-side uploads.
  • Clean, dependency-minimal code output that fits any Node.js project.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*