file-upload
Skill2 starsChanged 35 days agoMITView on GitHub
Let signed-in users upload images and PDFs on an app-foundation site, stored in Vercel Blob (free 1 GB, no card) with the file list in Postgres, plus a /files page. Use when the user says "add file upload", "let users upload images/avatars/photos", "my uploads disappear after deploy", "upload works locally but fails on Vercel", or a later skill (shop products, reviews with photos) requires file-upload.
- Reads credentials
- Installs packages
16 other projects use a version of this.
Adopted by
Most recently taken up by
- lora-sys/skillstheir own version, first seen Nov 29, 2026
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- SubhiSec/claude-ai-cyber-security-skillstheir own version, first seen Oct 25, 2026
- Dhruv2mars/skillstheir own version, first seen Oct 20, 2026
- FlyelepAI/agent-skillstheir own version, first seen Oct 17, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 16, 2026
Used with
Projects with it also use sqli, xss and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SubhiSecSkillsqli
Hunt SQL injection in REST/GraphQL/SOAP/raw parameters using sqlmap, ghauri, manual UNION/Time/Boolean techniques, and custom WAF-bypass tamper scripts. Use when an input flows into a database query or when the user has identified a parameter that might be vulnerable.
Also in 6 projects that use this
SubhiSecSkillxss
Hunt reflected, stored, and DOM-based Cross-Site Scripting (XSS) including CSP bypass, polyglot payloads, mutation XSS (mXSS), markdown XSS, and template XSS. Use when the user has identified a parameter or input that reflects to the page, or wants to test for XSS in a specific input.
Also in 7 projects that use this
langbyyiSkillcsrf
CSRF testing playbook. Use when reviewing state-changing web flows, anti-CSRF defenses, SameSite behavior, JSON CSRF, login CSRF, and OAuth state handling.
Also in 4 projects that use this
yaklangSkillopen-redirect
Open redirect playbook. Use when URL parameters, form actions, or JavaScript sinks control navigation targets and may redirect users to attacker-controlled destinations.
Also in 6 projects that use this
langbyyiSkillpath-traversal
Path traversal and LFI playbook. Use when file paths, download endpoints, include operations, archive extraction, or wrapper behavior may expose filesystem control.
Also in 4 projects that use this
zebbernSkilljs-analysis
Analyze JavaScript files to discover hidden endpoints, API keys, secrets, and sensitive data. Use when testing web applications, when user mentions JavaScript analysis, or when looking for hidden API endpoints.
Also in 3 projects that use this
- +5 more from SubhiSec
- +1 more from langbyyi
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- cdxiaodong/cain-agent★ 953same name
- SubhiSec/claude-ai-cyber-security-skills★ 45same name
- 0xGhostCAT/claude-ai-cyber-security-skills★ 41same name
- thejefflarson/soundcheck★ 20same name
- fusebase-dev/fusebase-flow★ 9same name
- FlyelepAI/agent-skills★ 5same name
- iAskShahram/skills★ 4same name
- langbyyi/websec-skills★ 4same name
- Dhruv2mars/skills★ 3same name
- 1398281322-a11y/java-backend-guardrails★ 2same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/app-foundation/template/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/app-foundation/template/CLAUDE.mdCLAUDE.md
- app-foundationSkill
- auth-loginSkill
- db-backupSkill
- db-connectSkill
- deploy-cloudflareSkill
- domain-setupSkill
- email-sendSkill
- env-secretsSkill
- github-vercel-deploySkill
- launch-kitSkill
- ops-dashboardSkill
- pay-checkoutSkill
- pay-subscriptionSkill
- pay-webhookSkill
- uptime-alertSkill
- warehouse-siteSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
All Blob calls live in src/lib/storage.ts and the upload route, so another provider (Cloudflare R2 for 10 GB) can replace them later …
- Very specific: line 31
Never copy, print or ask for BLOB_READ_WRITE_TOKEN.
- Distinctive: line 32
Don't raise the limits or allow other file types (HTML, SVG, executables) without asking.
- Distinctive: line 64
Delete it: it disappears from the list and from the Blob store's Browser tab.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
file-upload
Goal: signed-in users can upload images and PDFs, see them in /files, and delete them. Files survive every deploy. Follow ../../STACK.md.
Why not save files in the project folder
AI tools often write uploads to public/uploads with fs.writeFile. That works on your computer and fails once deployed: on Vercel and Cloudflare the site's folder is read-only and replaced on every deploy (on Vercel the error is ENOENT ... mkdir '/var/task/public' or EROFS: read-only file system). Files belong in object storage; the database keeps only their address. apply.mjs warns if it finds such code.
Choices made
- Vercel Blob, public store. Created from the Vercel dashboard in a few clicks, no card needed. Hobby includes 1 GB storage, 10 GB downloads, 10,000 simple and 2,000 advanced operations a month (each upload is one). Past the limit Blob stops for the rest of the 30 days; it never charges a Hobby account. Re-check https://vercel.com/docs/vercel-blob/usage-and-pricing before quoting numbers.
- Browser uploads straight to Blob (client upload), so files aren't capped by the 4.5 MB function body limit.
/api/files/uploadonly issues a one-time permit. - Only signed-in users, only into
files/<userId>/, JPG/PNG/WebP/GIF/PDF, 5 MB per file, 20 files and 25 MB per person (UPLOAD_LIMITSinsrc/lib/storage.ts). Without sign-in, strangers could fill the free quota. - The list comes from Postgres, not from Blob, so viewing
/filescosts no Blob operation. Each upload is verified withhead()before it's recorded. Deleting is free. - All Blob calls live in
src/lib/storage.tsand the upload route, so another provider (Cloudflare R2 for 10 GB) can replace them later without touching pages.
Rules
- Creating the Blob store changes the owner's Vercel project: ask for an OK first, and let the owner watch or click.
- Never copy, print or ask for
BLOB_READ_WRITE_TOKEN. Vercel adds it to the project by itself. - Don't raise the limits or allow other file types (HTML, SVG, executables) without asking. A public store means anyone with a link can open the file; tell the owner not to use it for private documents.
Steps
1. Check dependencies
stack.json → installed needs db-connect and auth-login. If either is missing, offer to install it first.
2. Add the code
node <skill-dir>/scripts/apply.mjs --dir "<project>" --jsonIt adds src/db/schema/files.ts, src/lib/storage.ts, /api/files/upload, /files (page, uploader, actions), the @vercel/blob dependency, an .env.example note, stack.json → installed, and a git save point. It runs drizzle-kit generate --name file_upload when node_modules exists; if manual says so, run npm install && npm run db:generate -- --name file_upload and commit drizzle/. Read warnings: if it lists files that save to public/, offer to switch them to src/lib/storage.ts.
Push. The next build creates the table.
3. Owner: connect a Blob store (with OK)
In Vercel → the project → Storage → Create Storage → Blob → Continue:
- Access: Public (the code uploads public files; a Private store rejects them)
- tick Add a read-write token env var to this connection (Vercel's dialog leaves it off by default, and uploads need it)
- Create
Then Deployments → Redeploy (or push). Variables only reach new deployments.
4. Verify
- Signed out,
/filesredirects to/login. - Signed in: upload a picture → it appears with the space bar updated. Too-large or wrong-type files get a clear message.
- Redeploy, open
/filesagain: the picture is still there. This is the whole point. - Delete it: it disappears from the list and from the Blob store's Browser tab.
Using it in code
import { listFiles, UPLOAD_LIMITS } from "@/lib/storage";
const files = await listFiles(user.id); // { id, url, name, contentType, size, createdAt }[]Other systems react to files.uploaded / files.deleted in core_events, or keep a file's url in their own table (e.g. shop_products.image_url).
Troubleshooting
See references/troubleshooting.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

