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...
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 openStep 2 β Wait for Load
agent-browser wait 2000If 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:
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