← Back to Skills Marketplace
weixizi

browser-file-upload

by weixizi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
179
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install browser-file-upload
Description
Automates uploading files to web pages via agent-browser CLI, supporting flexible path formats and interactions with file input elements or dialogs.
README (SKILL.md)

Browser File Upload

Automates file uploads to web pages using agent-browser CLI.

Quick Start

Upload a file to a web page:

# Basic upload (auto-detects file input)
agent-browser open \x3Curl>
agent-browser find text 选择文件 click
agent-browser upload "#filePicker" \x3Cfile-path>

# Or use the Python script
python scripts/upload_file.py \x3Curl> \x3Cfile-path>

Usage Patterns

Upload to Specific Selector

When you know the file input selector:

agent-browser open https://example.com/upload
agent-browser click "#fileInput"
agent-browser upload "#fileInput" C:\path	o\file.xlsx

Upload by Text Search

When file input has visible label text:

agent-browser open https://example.com/upload
agent-browser find text "上传文件" click
agent-browser upload "[type=file]" C:\path	o\file.xlsx

Using Python Script

For reusable upload logic with flexible path specification:

python scripts/upload_file.py \x3Curl> \x3Cfile-path> [selector] [wait_ms]

Arguments:

  • url - Target page URL
  • file-path - Path to file (supports multiple formats, see below)
  • selector - Optional CSS selector for file input
  • wait_ms - Optional wait time after page load (default: 2000)

File Path Formats

The Python script supports multiple path formats:

Format Example Description
Absolute `C:\Users\
ame\file.xlsx` Full path
Relative ./data/file.xlsx Relative to current directory
Workspace workspace/file.xlsx Relative to OPENCLAW_WORKSPACE
Env Var ${HOME}/file.xlsx Environment variable
Windows Env %USERPROFILE%\file.xlsx Windows environment variable

Path Examples

# Absolute path
python scripts/upload_file.py https://example.com C:\Users\陈\Documents\data.xlsx

# Relative path (from workspace)
python scripts/upload_file.py https://example.com ./test.xlsx

# Workspace-relative
python scripts/upload_file.py https://example.com workspace/data/test.xlsx

# With environment variable
python scripts/upload_file.py https://example.com ${HOME}/downloads/file.xlsx

Common Selectors

Selector Description
#filePicker Common id for file inputs
[type=file] Any file input element
input[type=file] Explicit file input
.upload-zone Drop zone containers

Troubleshooting

File input not found:

  • Run agent-browser snapshot to inspect page elements
  • Look for [type=file] or file-related buttons
  • Try clicking the upload zone first

Upload fails:

  • Ensure file path is absolute
  • Check file exists: test-path \x3Cfile-path>
  • Try agent-browser find text 选择文件 click first

Page not loaded:

  • Add agent-browser wait 2000 after open
  • Use agent-browser wait --load networkidle for slow pages

Related Commands

# Inspect page elements
agent-browser snapshot

# Take screenshot
agent-browser screenshot

# Find elements by text
agent-browser find text "上传"

# Click element
agent-browser click \x3Cselector>

# Upload file
agent-browser upload \x3Cselector> \x3Cfile-path>

Example: Upload Excel to UU Tool

# Method 1: Direct agent-browser commands
agent-browser open https://uutool.cn/excel/
agent-browser wait 2000
agent-browser find text 选择文件 click
agent-browser upload "#filePicker" C:\Users\陈\.openclaw\workspace	est.xlsx

# Method 2: Using Python script with absolute path
python scripts/upload_file.py https://uutool.cn/excel/ C:\Users\陈\.openclaw\workspace	est.xlsx

# Method 3: Using Python script with workspace-relative path
python scripts/upload_file.py https://uutool.cn/excel/ workspace/test.xlsx

# Method 4: Using Python script with custom selector and wait time
python scripts/upload_file.py https://uutool.cn/excel/ workspace/test.xlsx "#filePicker" 3000
Usage Guidance
This skill appears to do what it says: automate uploads via the agent-browser CLI. Before installing or running it, confirm that you have the agent-browser CLI and a suitable Python runtime available (the metadata does not declare those dependencies). Understand that the script will resolve environment variables and can access any local file path you provide — do not pass paths to sensitive files (credentials, private keys, personal documents). If you plan to let the agent run autonomously, be extra cautious: an autonomous agent + this skill can upload local files to arbitrary URLs, so test with non-sensitive files first and inspect the script yourself. If you want to proceed, add/verify a declared dependency on agent-browser in the skill metadata or ensure the environment provides the CLI.
Capability Analysis
Type: OpenClaw Skill Name: browser-file-upload Version: 1.0.0 The skill provides legitimate browser automation for uploading files to web forms using the `agent-browser` CLI and a helper Python script (`scripts/upload_file.py`). The script includes logic to resolve various path formats, including environment variables and workspace-relative paths, and uses safe subprocess execution (passing arguments as a list). There is no evidence of malicious intent, obfuscation, or unauthorized data exfiltration; the tool functions as described to assist an agent in interacting with web-based file inputs.
Capability Assessment
Purpose & Capability
The SKILL.md and included Python script clearly expect and invoke the agent-browser CLI (and Python) to open pages and perform uploads, but the registry metadata lists no required binaries or install steps. A legitimate browser-file-upload skill would need to declare that agent-browser (and a Python runtime if using the script) must be present. This is a documentation/metadata omission rather than functionality mismatch.
Instruction Scope
The runtime instructions and script stay within the stated purpose: they navigate to a URL, locate/click file input elements, and instruct agent-browser to upload a resolved local file path. The script resolves environment variables and workspace-relative paths for convenience. It does not contain network endpoints or logic that exfiltrates data to third-party servers beyond uploading to the target URL you supply (which is the intended behavior).
Install Mechanism
This is an instruction-only skill with an included Python script; there is no install spec, no downloads, and nothing written to disk beyond the provided files. No high-risk install mechanism is present.
Credentials
The skill declares no required environment variables, but the script will read OPENCLAW_WORKSPACE (if present) and expands any environment variables referenced in file paths (e.g., ${HOME}, %USERPROFILE%). Also, the script checks local filesystem paths and can read any file you point it at — which is necessary for uploads but means sensitive local files could be uploaded if given as input. This behavior is proportionate to the stated purpose but worth awareness.
Persistence & Privilege
The skill does not request persistent/always-on presence and does not modify other skills or system-wide configuration. Autonomous invocation is allowed by default (platform default), which is expected for an agent-invokable skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install browser-file-upload
  3. After installation, invoke the skill by name or use /browser-file-upload
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of browser-file-upload skill. - Automates file uploads to web pages via agent-browser CLI. - Supports multiple ways to specify file paths: absolute, relative, workspace-based, and environment variables. - Includes Python script for reusable and flexible file upload automation. - Provides detailed usage examples and troubleshooting tips for handling file input elements.
Metadata
Slug browser-file-upload
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is browser-file-upload?

Automates uploading files to web pages via agent-browser CLI, supporting flexible path formats and interactions with file input elements or dialogs. It is an AI Agent Skill for Claude Code / OpenClaw, with 179 downloads so far.

How do I install browser-file-upload?

Run "/install browser-file-upload" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is browser-file-upload free?

Yes, browser-file-upload is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does browser-file-upload support?

browser-file-upload is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created browser-file-upload?

It is built and maintained by weixizi (@weixizi); the current version is v1.0.0.

💬 Comments