- Home
- Skills
- Agents & Orchestration
- File Upload Contract Repair
More screenshots
Works with the AI Agents you already use
File Upload Contract Repair
Repair file-upload drift across validation, object keys, authorization, quarantine, scanning, finalization, retries, downloads, cleanup, tests, and docs.
$1
File Upload Contract Repair
Example session with this skill installed
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.
- Read your context and instructions
- Compiled the file upload contract
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.
Connects securely to your tools. The creator never sees your data.
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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
No access to live S3/Azure/GCS buckets. Local mocks required for verification. Does not certify malware detection or perform live production migrations.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
Permissions are limited to the active local workspace and are used to inspect user-supplied or local workspace files; create or modify bounded local fixes, tests, documentation, or review artifacts; run repository-supported local tests, checks, builds, or parsing commands. The skill package does not require bundled credentials, unrestricted external network access, or automatic production changes.