bypass-macos-file-dialog
Bypass OS-native file upload dialogs in browser automation using JavaScript interception and DataTransfer injection.
- Automate YouTube subtitle uploads without manual Finder interaction
- Inject files into Puppeteer/Playwright scripts when .setInputFiles() fails
- Programmatically upload large CSV/JSON datasets to web dashboards
Secure checkout via Stripe
Included in download
- Inject files into Puppeteer/Playwright scripts when .setInputFiles() fails
- Programmatically upload large CSV/JSON datasets to web dashboards
- browser, file_read automation included
- Ready for Windows
Sample Output
A real example of what this skill produces.
Interceptor active. Staging 'report.csv' (2,450 chars). Synthetic File object created via DataTransfer. Assigned to <input type="file"> via Object.defineProperty. Dispatching 'change' event {bubbles: true}. Upload successful: React component updated state without OS dialog.
bypass-macos-file-dialog
Bypass OS-native file upload dialogs in browser automation using JavaScript interception and DataTransfer injection.
Secure checkout via Stripe
Included in download
- Inject files into Puppeteer/Playwright scripts when .setInputFiles() fails
- Programmatically upload large CSV/JSON datasets to web dashboards
- browser, file_read automation included
- Ready for Windows
- Instant install
Sample Output
A real example of what this skill produces.
Interceptor active. Staging 'report.csv' (2,450 chars). Synthetic File object created via DataTransfer. Assigned to <input type="file"> via Object.defineProperty. Dispatching 'change' event {bubbles: true}. Upload successful: React component updated state without OS dialog.
About This Skill
What it does
This skill provides a battle-tested programmatic workaround for one of the most persistent hurdles in browser automation: the OS-native file upload dialog. Whether you are using Playwright, Puppeteer, Selenium, or Claude's computer-use, clicking a file upload button typically triggers a macOS, Windows, or Linux file picker that freezes automation and requires manual intervention.
This developer-centric tool uses a JavaScript interception technique to bypass the native UI entirely. It overrides the HTMLInputElement.prototype.click method to inject file data directly into the browser's DOM using the DataTransfer API, triggering a synthetic change event that web frameworks recognize as a valid user upload.
Why use this skill
- Zero Manual Intervention: Fully automates file uploads without getting stuck on system-level popups.
- Framework Agnostic: Works seamlessly with React, Angular, Vue, Polymer (YouTube Studio), and jQuery.
- Cross-Platform: Bypasses dialogs on macOS Finder, Windows Explorer, and Linux file managers.
- Invisible to Apps: Sophisticated injection makes the programmatic upload indistinguishable from a real user action.
- Reliable Content Staging: Includes specific patterns for handling large text files, binary data via Base64, and multi-file uploads.
Supported Workflows
The skill is designed for developers building automated scrapers, content uploaders, or RPA bots. It is particularly effective for complex sites like YouTube Studio or enterprise internal tools where input.value assignment is blocked by security headers.
📖 Learn more: Best Frontend & Design Skills for Claude Code →
Use Cases
- Automate YouTube subtitle uploads without manual Finder interaction
- Inject files into Puppeteer/Playwright scripts when .setInputFiles() fails
- Programmatically upload large CSV/JSON datasets to web dashboards
- Bypass security-restricted file inputs in React and Angular applications
- Upload files (text base not PDF or MP4 etc) to websites without getting blocked when MacOS file upload window appears.
Known Limitations
Text-Based Files Only: Out of the box, the Python preparation script (prepare_injection.py) reads files using UTF-8 encoding. This means it works perfectly for text-based files (CSV, JSON, TXT, XML, scripts, sbv etc.), but will throw an encoding error if you try to process binary files like .mp4 videos, .pdf documents, or images (.jpg, .png). File Size Constraints: Because this technique works by injecting the entire file's content into the browser's memory as a JavaScript string, it is not suitable for massive files (e.g., gigabyte-sized video files). Attempting to inject extremely large files may cause the browser tab to run out of memory or crash the automation framework's DevTools protocol. Single-Shot Execution: The JavaScript interceptor is designed to consume the payload upon use (window.__pendingFile = null; after the click). If your automation needs to upload multiple files in a row, you must re-inject the new file payload before each click. Strict Execution Order: The JavaScript interceptor (interceptor.js) must be executed in the browser's DOM before the automation tool clicks the upload trigger. If the click happens first, the OS dialog will still open and block the thread.
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/bypass-macos-file-dialog | tar xz -C ~/.claude/skills/Free skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Early access skill
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
Note: This skill requires broad Read access (**/*) because it is designed to prepare and inject any file type (text based) from any location the user specifies into the browser DOM. The script only reads target files and does not modify, delete, or overwrite any local files.
Tags
Supported Operating Systems: Fully compatible with macOS, Windows, and Linux environments. Supported Web Browsers: Works seamlessly across all major modern browsers, including Google Chrome, Mozilla Firefox, Microsoft Edge, and Apple Safari. Automation Frameworks: Designed to work with standard browser automation and RPA tools, including Puppeteer, Playwright, Selenium, and Claude computer-use. Technical Requirements: Python Payload Preparer (prepare_injection.py): Requires Python 3 to run. It utilizes only built-in standard libraries (such as json, os, and argparse), meaning no external dependencies or pip install commands are required. JavaScript Interceptor (interceptor.js): Written in pure Vanilla JavaScript using standard web APIs (DataTransfer, File, Object.defineProperty). It is entirely framework-agnostic and has been battle-tested on complex single-page applications, including YouTube Studio's Polymer-based interface. Important Implementation Note: For the bypass to function correctly, the JavaScript interceptor script must be injected and executed within the browser's DOM before your automation tool triggers the click event on the target file upload button.
Creator
Claude Skills
Freelancer, internet entrepreneur and music producer from Sweden.
Frequently Asked Questions
Learn More About AI Agent Skills
More Premium Skills
skill-router-2
Automatically detect, load, and stack the perfect skills combo for any user request.
cinematic-sites
Turn any basic business URL into a high-end cinematic landing page with AI-generated 4K assets and GSAP animations.
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.
consumer-motivation-analyzer
Go beyond surface-level feedback to uncover the psychological drivers and hidden motivations behind buyer behavior.