upload-download-file
Skill8 starsChanged 7 months agoMITView on GitHub
Uploads a local file to an HTML5 file input, or triggers a download and captures the resulting path. Composes with multi-step-form for file-attaching workflows.
In this repository14 other files it gives its agents.
- date-picker-widgetSkill
- detect-captchaSkill
- dismiss-cookie-bannerSkill
- dismiss-newsletter-popupSkill
- exit-tracking-popupSkill
- extract-table-paginationSkill
- fill-multi-step-formSkill
- handle-infinite-scrollSkill
- handle-modal-dialogSkill
- login-flowSkill
- pagination-next-pageSkill
- searchable-dropdownSkill
- search-and-filterSkill
- verify-page-loadedSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 64
macOS sandboxing of Playwright file uploads: if Playwright runs in a security context that can't read ~/Documents, uploads silently fail.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upload / Download File
When to invoke
The user task requires uploading a local file or capturing a download.
The agent provides the file path in vars.file_path (uploads) or a
target directory in vars.download_dir (downloads).
The matcher hits this skill when an <input type="file"> is present
on the page.
Recipe
Upload mode (vars.mode = "upload" or auto-detected via input[type=file] presence)
- wait_for_selector selector="input[type='file']" state=attached timeout=5s
- fill selector="input[type='file']" value="$vars.file_path"
- wait extra=300ms
Download mode (vars.mode = "download")
Downloads in headless browsers route through the browser's download API; this skill stubs the recipe for now and defers to the runner's download event handler (M5 wiring).
Success criteria (upload mode)
- assert input_type_file_has_files selector="input[type='file']"
When NOT to use
- File-attach widgets that don't use a real
<input type="file">(proprietary drag-and-drop). Vision fallback or a per-site bespoke approach. - Multi-file uploads requiring drag-drop reorder. Not in v0.1.
Known failures
- Sites that gate file inputs behind a click-to-reveal: the input
isn't
attacheduntil a wrapper button is clicked. Run aclickprimitive first; spec your agent to chain. - Server-side validation of file size / type: the skill submits; the agent reads validation errors via the form's error-message recipe.
- macOS sandboxing of Playwright file uploads: if Playwright runs
in a security context that can't read
~/Documents, uploads silently fail. Document in the agent's expected setup.
Related skills
fill-multi-step-form— common parent flowverify-page-loaded— run before to ensure the file input has rendered
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.

