File Upload Contract Repair
Repair file-upload drift across validation, object keys, authorization, quarantine, scanning, finalization, retries, downloads, cleanup, tests, and docs.
Secure checkout via Stripe
Works with the AI tools you already use
See it in action
You say
Repair the file upload lifecycle in our Django app. We currently trust browser MIME types, use filenames as keys, and files are available before the Celery scan task finishes.
Your agent does
I have mapped your upload drift. I will now add an 'uploaded_pending_verification' state to the File model, implement opaque key generation in the storage adapter, and update the scan callback to use atomic versioned updates. Safe local patches and dry-run cleanup tests are ready for review.
What you get
About this skill
The problem
File upload logic often drifts across routes, storage adapters, and background workers, leading to insecure behaviors like trusting client-side MIME types or using sensitive filenames as storage keys. These inconsistencies create race conditions in scan callbacks, orphaned objects, and unauthorized access to quarantined files.
What it does
- Generates opaque, server-controlled object keys to prevent path collisions and metadata leaks.
- Implements atomic, idempotent finalization for direct and multipart uploads to stop duplicate row creation.
- Introduces typed lifecycle states including quarantine, ready, and superseded to gate downloads and derivative processing.
- Verifies final stored object size and integrity against the original session contract.
- Standardizes versioned callback handling to prevent stale scan results from overwriting newer file states.
Frameworks & tools
Works with repository patterns using S3-compatible storage, Node.js, Python/Django, PostgreSQL, and background workers like BullMQ or Celery.
Why this beats prompting it yourself
This skill handles the complex state transitions between storage adapters, database models, and async workers that a simple prompt misses. It builds a deterministic local test matrix to verify edge cases like cross-session part reuse and cleanup races without touching production data.
Use cases
- Repairing inconsistent file type validation across multiple API endpoints.
- Fixing race conditions where files become downloadable before malware scanning finishes.
- Transitioning from filename-based storage to opaque internal identities.
- Standardizing cleanup jobs to safely identify orphaned multipart uploads.
Known limitations
Cannot access live storage, inspect customer files, or perform production migrations. Local verification relies on the repository's existing fake storage or mocks.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe
Creator
109 skills on Agensi
Frequently Asked Questions
Popular in AI Agents & LLM Ops
agentic-workflow
A risk-aware, evidence-based engineering lifecycle protocol for robust agentic task execution and safety.
designing-hybrid-context-layers
Architects the right retrieval strategy for every query — teaching your agent when to use RAG, a knowledge graph, or a temporal index instead of defaulting to vector search for everything.

prompt-engineer
Professional prompt engineering patterns for building robust, secure, and production-ready LLM applications.
codex-grade-coding
Turn your AI agent into a senior engineer with strict task classification and verification-driven coding protocols.