← 返回 Skills 市场
weixizi

browser-file-uploa

作者 weixizi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
94
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install browser-file-uploa
功能描述
Automates file uploads on web pages via agent-browser CLI or Python script, supporting flexible file paths and optional file input selectors.
使用说明 (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 file uploads), but there are a few things to check before installing: 1) The skill relies on the external agent-browser CLI (not declared in metadata) — verify agent-browser is installed and that you trust it, because it will perform the actual network interactions. 2) The Python script will read any local file path you give it (including paths resolved from environment variables or OPENCLAW_WORKSPACE); avoid pointing it at sensitive files. 3) Metadata should declare OPENCLAW_WORKSPACE or other env usage; treat the absence as a transparency issue. 4) As a precaution, run the script with a non-sensitive test file and inspect console output first, or run it in a sandboxed account/environment.
功能分析
Type: OpenClaw Skill Name: browser-file-uploa Version: 1.0.0 The skill provides a utility for uploading local files to remote websites, which is a high-risk capability for data exfiltration. The script `scripts/upload_file.py` implements broad path resolution using `os.path.expandvars` and `os.path.abspath`, allowing the agent to access and potentially transmit sensitive files (e.g., SSH keys or environment secrets) from anywhere on the system to arbitrary URLs. While the code logic is consistent with the stated purpose of browser automation, the lack of path-based security constraints or destination whitelisting presents a significant security risk.
能力评估
Purpose & Capability
The SKILL.md and Python script clearly require and call the external agent-browser CLI to open pages, click elements, and upload files, but the skill metadata declares no required binaries. That mismatch reduces transparency: agent-browser availability and trustworthiness are essential for this skill to work and to understand its blast radius. The script also resolves OPENCLAW_WORKSPACE and other environment variables even though no environment variables are declared in the metadata.
Instruction Scope
Instructions and the script stay within the stated purpose (navigate to a URL and upload a specified local file). They intentionally support absolute/relative/workspace/env-var paths and will read any file the user points at. The instructions do not direct data to unexpected remote endpoints beyond the target URL, but because the skill invokes the agent-browser CLI (an external tool) that tool will perform the network transfer — you should ensure agent-browser is trusted.
Install Mechanism
There is no install spec (instruction-only style) and a shipped Python script. Nothing is downloaded or written by an installer. This is the lowest-risk install mechanism, but the included script executes subprocess calls to agent-browser.
Credentials
The metadata claims no required environment variables, yet the script expands arbitrary environment variables (os.path.expandvars, expanduser) and looks up OPENCLAW_WORKSPACE (falling back to ~/.openclaw/workspace). No sensitive credentials are requested, but the skill will use environment values to locate files — the metadata should have declared OPENCLAW_WORKSPACE as a possible config and documented the behavior more explicitly.
Persistence & Privilege
The skill does not request permanent/always-on presence and does not modify other skills or system settings. It runs on demand and invokes external CLI commands; autonomous invocation is allowed by platform defaults but is not requested specially by this skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install browser-file-uploa
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /browser-file-uploa 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of browser-file-upload skill. - Automates file uploads to web pages using agent-browser CLI or a Python script. - Supports flexible file path formats: absolute, relative, workspace-relative, and environment variables (including Windows-style). - Allows targeting file inputs via CSS selectors or by searching visible label text. - Includes quick-start usage, troubleshooting steps, and command examples for common upload scenarios.
元数据
Slug browser-file-uploa
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

browser-file-uploa 是什么?

Automates file uploads on web pages via agent-browser CLI or Python script, supporting flexible file paths and optional file input selectors. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。

如何安装 browser-file-uploa?

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

browser-file-uploa 是免费的吗?

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

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

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

谁开发了 browser-file-uploa?

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

💬 留言讨论