← 返回 Skills 市场
weixizi

browser-file-upload

作者 weixizi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
179
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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.
使用说明 (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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install browser-file-upload
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /browser-file-upload 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug browser-file-upload
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 179 次。

如何安装 browser-file-upload?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install browser-file-upload」即可一键安装,无需额外配置。

browser-file-upload 是免费的吗?

是的,browser-file-upload 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

browser-file-upload 支持哪些平台?

browser-file-upload 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 browser-file-upload?

由 weixizi(@weixizi)开发并维护,当前版本 v1.0.0。

💬 留言讨论