🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

upload-file

by @m1ss-cell

MUST be used for any browser file upload task. Provides reliable, step-by-step automation for uploading files via agent-browser CLI. Includes strict executio...

Versionv1.0.0
Downloads343
Installs1
TERMINAL
clawhub install upload-file

πŸ“– About This Skill


name: browser-file-upload description: > MUST be used for any browser file upload task. Provides reliable, step-by-step automation for uploading files via agent-browser CLI. Includes strict execution protocol, fallback strategies, and path normalization.

Browser File Upload (Industrial-Grade)

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


πŸ”₯ Execution Protocol (MANDATORY)

You MUST follow strict state-machine execution:

1. Execute ONLY ONE command at a time 2. WAIT for result before next step 3. VERIFY success before continuing 4. If failed β†’ retry or fallback 5. DO NOT skip steps 6. DO NOT batch commands 7. DO NOT assume elements exist


πŸ”₯ Standard Upload Pipeline (REQUIRED)

Follow this exact sequence:

Step 1 β€” Open Page

agent-browser open

Step 2 β€” Wait for Load

agent-browser wait 2000

If page is slow: agent-browser wait --load networkidle


Step 3 β€” Trigger File Input

Try in order:

1. agent-browser find text "选择文仢" click 2. agent-browser find text "上传" click 3. agent-browser click "[type=file]"

If all fail: agent-browser snapshot


Step 4 β€” Upload File

Preferred selector: agent-browser upload "[type=file]"

If selector known: agent-browser upload ""


Step 5 β€” Verify Upload (IMPORTANT)

agent-browser snapshot

Check:

  • File name appears
  • No error message
  • Input is not empty
  • If failed β†’ retry upload once


    πŸ”₯ Strategy Selection

    Priority:

    1. βœ… Python script (MOST STABLE) 2. ⚠️ agent-browser commands (when selector known)


    πŸ”₯ Python Script Mode (Recommended)

    Use for robust execution:

    ```bash python scripts/upload_file.py [selector] [wait_ms]