Browser scripts

From tubecreate/tubecli · View interactive version

Browser scripts is an AI agent skill from the GitHub repository tubecreate/tubecli. Visual browser automation script editor & manager for TubeCLI.

How to use this skill

Skill file

Script Studio

Visual browser automation script editor & manager for TubeCLI.

Features

Storage

Scripts are stored as individual JSON files in scripts/ directory. Each file = one script.

Step Types

Functions

Functions are scripts marked with is_function: true. They define inputs and outputs, and can be called from any script via the call_function step.

Available Functions

`gmail_login_with_2fa` — Google/Gmail Login

Đăng nhập Google/Gmail với email, password và tự xử lý 2FA.

Inputs:

| Name | Type | Required | Description |

|------|------|----------|-------------|

| email | string | ✅ | Gmail/Google email |

| password | string | ✅ | Account password |

| totp_secret | string | ❌ | TOTP 2FA secret (base32) |

Outputs:

| Name | Type | Description |

|------|------|-------------|

| login_status | string | "success" or "failed" |

Usage example (as step in another script):

{
    "action": "call_function",
    "label": "Login Gmail",
    "params": {
        "function_slug": "gmail_login_with_2fa",
        "inputs": {
            "email": "{{profile_email}}",
            "password": "{{profile_password}}",
            "totp_secret": "{{totp_secret}}"
        },
        "outputs": {
            "my_login_result": "login_status"
        }
    }
}

Creating New Functions

A function is a regular script JSON with extra fields:

{
    "name": "My Function",
    "slug": "my_function",
    "is_function": true,
    "function_inputs": [
        {"name": "param1", "type": "string", "required": true, "description": "What this does"},
        {"name": "param2", "type": "string", "required": false, "description": "Optional param"}
    ],
    "function_outputs": [
        {"name": "result", "type": "string", "description": "What this returns"}
    ],
    "steps": [ ... ]
}

How call_function Works

  1. Caller maps its variables → function input names
  2. Function runs with those inputs as {{variables}}
  3. After function completes, outputs are mapped back to caller's variables
  4. Variable scope is isolated — function doesn't pollute caller's scope

Variables

API

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.