Agent skill · software engineering · aj-geddes

file-upload-handling

Implement secure file upload handling with validation, virus scanning, storage management, and serving files efficiently. Use when building file upload features, managing file storage, and implementing file download systems.

Why this skill is useful

Provides specific implementation patterns and security practices for file upload handling that the AI wouldn't reliably generate on its own.

What it needs

Requires aiofiles, python-magic, werkzeug installed locally. About 2k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.

What this skill does

File Upload Handling Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Build secure and robust file upload systems with validation, sanitization, virus scanning, efficient storage management, CDN integration, and proper file serving mechanisms across different backend frameworks. When to Use Implementing file upload features Managing user-uploaded documents Storing and serving media files Implementing profile picture uploads Building document management systems Handling bulk file imports Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Python/Flask File Upload Python/Flask File Upload Node.js Express File Upload with Multer Node.js Express File Upload with Multer FastAPI File Upload FastAPI File Upload S3/Cloud Storage Integration S3/Cloud Storage Integration Best Practices ✅ DO Validate file extensions and MIME types Check file size before processing Use secure filenames to prevent directory traversal Store files outside web root Implement virus scanning Use CDN for file delivery Generate signed URLs for direct access Log file upload/download events Implement access control checks Clean up temporary files ❌ DON'T Trust user-provided filenames Store files in web-accessible directories Allow arbitrary file types Skip virus scanning for uploaded files Expose absolute file paths Allow unlimited file sizes Ignore access control Use predictable file paths Store sensitive metadata in filenames Forget to validate file content

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aj-geddes/file-upload-handling

View the source on GitHub

Browse the @skills marketplace