[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M770VXRNQVMF7SZD1YKWKP1R":3,"skill-same:01M770VXRNQVMF7SZD1YKWKP1R":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M770VXRNQVMF7SZD1YKWKP1R","browser-automation",null,"Browser automation for AI agents using PinchTab. Control Chrome programmatically for testing, scraping, and interaction. Features token-efficient text extraction, multi-instance orchestration, headless\u002Fheaded modes, and MCP integration. Use when automating browser tasks, extracting web data, testing web apps, or validating sites in real browsers.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fb\u002Fbrowser-automation-pin\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: browser-automation\ndescription: Browser automation for AI agents using PinchTab. Control Chrome programmatically for testing, scraping, and interaction. Features token-efficient text extraction, multi-instance orchestration, headless\u002Fheaded modes, and MCP integration. Use when automating browser tasks, extracting web data, testing web apps, or validating sites in real browsers.\nmetadata:\n  version: \"1.0\"\n  origin: \"PinchTab\"\n---\n\n# Browser Automation\n\nBrowser automation for AI agents using [PinchTab](https:\u002F\u002Fpinchtab.com) — a high-performance Chrome bridge with HTTP API.\n\n## What is PinchTab?\n\n- **Standalone HTTP server** — Control Chrome via HTTP API\n- **Token-efficient** — 800 tokens\u002Fpage with text extraction (vs 10,000+ for screenshots)\n- **Multi-instance** — Run multiple parallel Chrome processes with isolated profiles\n- **Headless or Headed** — Run without window or with visible Chrome\n- **Self-contained** — 12MB binary, no external dependencies\n- **MCP integration** — Native SMCP plugin for Claude Code\n\n## Quick Start\n\n### Installation\n\n```bash\n# macOS \u002F Linux\ncurl -fsSL https:\u002F\u002Fpinchtab.com\u002Finstall.sh | bash\n\n# npm\nnpm install -g pinchtab\n\n# Docker\ndocker run -d -p 9867:9867 pinchtab\u002Fpinchtab\n```\n\n### Start Server\n\n```bash\n# Terminal 1: Start PinchTab server\npinchtab\n# Server runs on http:\u002F\u002Flocalhost:9867\n```\n\n### Basic Commands\n\n```bash\n# Navigate\npinchtab nav https:\u002F\u002Fpinchtab.com\n\n# Wait 3 seconds for accessibility tree\nsleep 3\n\n# Get interactive elements\npinchtab snap -i -c\n\n# Extract text (token-efficient)\npinchtab text\n\n# Click element by ref\npinchtab click e5\n\n# Fill input\npinchtab fill e3 \"user@example.com\"\n```\n\n---\n\n## Core Concepts\n\n### Instance\n\nA running Chrome process. Each instance has isolated state.\n\n```bash\n# Create headless instance\npinchtab instances create --mode=headless\n\n# Create headed instance (visible window)\npinchtab instances create --mode=headed\n\n# List instances\npinchtab instances list\n\n# Stop instance\npinchtab instances stop \u003Cinstance-id>\n```\n\n### Profile\n\nBrowser state (cookies, history, localStorage). Log in once, stay logged in.\n\n```bash\n# Create instance with profile\npinchtab instances create --profile=work\n\n# Profile persists across restarts\n```\n\n### Tab\n\nA single webpage. Each instance can have multiple tabs.\n\n```bash\n# Open new tab\npinchtab tabs open https:\u002F\u002Fexample.com\n\n# List tabs\npinchtab tabs list\n\n# Close tab\npinchtab tabs close \u003Ctab-id>\n```\n\n---\n\n## Token-Efficient Patterns\n\n### The 3-Second Wait Rule\n\n**Critical:** Chrome's accessibility tree takes ~3 seconds to populate after navigation.\n\n```bash\n# ❌ Too fast - empty tree\npinchtab nav https:\u002F\u002Fexample.com\npinchtab snap\n# Returns: {\"count\": 1, \"nodes\": [{\"ref\": \"e0\"}]}\n\n# ✅ Wait 3 seconds\npinchtab nav https:\u002F\u002Fexample.com\nsleep 3\npinchtab snap\n# Returns: {\"count\": 2645, \"nodes\": [...]}\n```\n\n### Optimal Extraction Pattern\n\n```bash\n# Navigate + wait + filter (14x token savings)\ncurl -X POST http:\u002F\u002Flocalhost:9867\u002Fnavigate \\\n  -d '{\"url\": \"https:\u002F\u002Fexample.com\"}' && \\\nsleep 3 && \\\ncurl http:\u002F\u002Flocalhost:9867\u002Fsnapshot | \\\njq '.nodes[] | select(.name | length > 15) | .name' | \\\nhead -30\n```\n\n**Why this works:**\n1. Navigate + wait ensures full accessibility tree\n2. jq filter extracts text nodes only\n3. `length > 15` filters buttons\u002Flabels\n4. `head -30` limits output\n\n**Token comparison:**\n- Exploratory approach: ~3,800 tokens\n- Pattern-driven: ~270 tokens\n- **Savings: 14x**\n\n---\n\n## HTTP API Reference\n\n### Base URL\n\n```\nhttp:\u002F\u002Flocalhost:9867\n```\n\n### Instances\n\n```bash\n# Create instance\nTAB=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"profile\":\"work\",\"mode\":\"headless\"}' | jq -r '.id')\n\n# List instances\ncurl http:\u002F\u002Flocalhost:9867\u002Finstances\n\n# Stop instance\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fstop\"\n```\n\n### Navigation\n\n```bash\n# Navigate to URL\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\"}'\n\n# Wait for load\nsleep 3\n```\n\n### Snapshot\n\n```bash\n# Full snapshot\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fsnapshot\"\n\n# Interactive elements only\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fsnapshot?filter=interactive\"\n\n# With coordinates\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fsnapshot?includeCoords=true\"\n```\n\n### Actions\n\n```bash\n# Click element\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"click\",\"ref\":\"e5\"}'\n\n# Type text\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"type\",\"ref\":\"e12\",\"text\":\"hello\"}'\n\n# Press key\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"key\",\"ref\":\"e12\",\"key\":\"Enter\"}'\n\n# Scroll\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"scroll\",\"direction\":\"down\"}'\n```\n\n### Extraction\n\n```bash\n# Extract text (token-efficient)\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Ftext\"\n\n# Take screenshot\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fscreenshot\" \\\n  --output screenshot.png\n\n# Generate PDF\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fpdf\" \\\n  --output page.pdf\n\n# Evaluate JavaScript\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fevaluate\" \\\n  -d '{\"script\": \"document.title\"}'\n```\n\n---\n\n## Common Patterns\n\n### Pattern 1: Web Scraping\n\n```bash\n#!\u002Fbin\u002Fbash\n# scrape-headlines.sh\n\nURL=$1\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"mode\":\"headless\"}' | jq -r '.id')\n\n# Navigate and wait\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n  -d \"{\\\"url\\\":\\\"$URL\\\"}\"\nsleep 3\n\n# Extract headlines (filter by length)\ncurl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fsnapshot\" | \\\n  jq '.nodes[] | select(.name | length > 20) | .name' | \\\n  head -20\n\n# Cleanup\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n```\n\n### Pattern 2: Form Interaction\n\n```bash\n#!\u002Fbin\u002Fbash\n# fill-form.sh\n\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"mode\":\"headless\"}' | jq -r '.id')\n\n# Navigate to form\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\u002Flogin\"}'\nsleep 3\n\n# Get snapshot to find element refs\nSNAPSHOT=$(curl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fsnapshot?filter=interactive\")\n\n# Extract refs (example: e5=email, e7=password, e9=submit)\nEMAIL_REF=$(echo $SNAPSHOT | jq -r '.nodes[] | select(.name | contains(\"email\")) | .ref')\nPASS_REF=$(echo $SNAPSHOT | jq -r '.nodes[] | select(.name | contains(\"password\")) | .ref')\nSUBMIT_REF=$(echo $SNAPSHOT | jq -r '.nodes[] | select(.role == \"button\") | .ref')\n\n# Fill form\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Faction\" \\\n  -d \"{\\\"kind\\\":\\\"type\\\",\\\"ref\\\":\\\"$EMAIL_REF\\\",\\\"text\\\":\\\"user@example.com\\\"}\"\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Faction\" \\\n  -d \"{\\\"kind\\\":\\\"type\\\",\\\"ref\\\":\\\"$PASS_REF\\\",\\\"text\\\":\\\"password123\\\"}\"\n\n# Submit\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Faction\" \\\n  -d \"{\\\"kind\\\":\\\"click\\\",\\\"ref\\\":\\\"$SUBMIT_REF\\\"}\"\n\n# Wait for navigation\nsleep 3\n\n# Verify login\ncurl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftext\" | jq -r '.title'\n\n# Cleanup\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n```\n\n### Pattern 3: Multi-Instance Parallel Processing\n\n```bash\n#!\u002Fbin\u002Fbash\n# parallel-scrape.sh\n\nURLS=(\"https:\u002F\u002Fsite1.com\" \"https:\u002F\u002Fsite2.com\" \"https:\u002F\u002Fsite3.com\")\nINSTANCES=()\n\n# Create instances\nfor i in {0..2}; do\n  INST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n    -d '{\"mode\":\"headless\"}' | jq -r '.id')\n  INSTANCES[$i]=$INST\ndone\n\n# Launch parallel jobs\nfor i in {0..2}; do\n  (\n    curl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F${INSTANCES[$i]}\u002Ftabs\u002Fopen\" \\\n      -d \"{\\\"url\\\":\\\"${URLS[$i]}\\\"}\"\n    sleep 3\n    TITLE=$(curl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F${INSTANCES[$i]}\u002Ftext\" | jq -r '.title')\n    echo \"Result $i: $TITLE\"\n    curl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F${INSTANCES[$i]}\u002Fstop\"\n  ) &\ndone\n\nwait\necho \"All complete\"\n```\n\n### Pattern 4: Visual Regression Testing\n\n```bash\n#!\u002Fbin\u002Fbash\n# visual-regression.sh\n\nURLS=(\"https:\u002F\u002Fstaging.example.com\" \"https:\u002F\u002Fproduction.example.com\")\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"mode\":\"headless\"}' | jq -r '.id')\n\nfor URL in \"${URLS[@]}\"; do\n  curl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n    -d \"{\\\"url\\\":\\\"$URL\\\"}\"\n  sleep 3\n\n  # Take screenshot\n  FILENAME=$(echo $URL | sed 's\u002F[^a-zA-Z0-9]\u002F_\u002Fg').png\n  curl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fscreenshot\" \\\n    --output \"$FILENAME\"\n  echo \"Saved: $FILENAME\"\ndone\n\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n```\n\n### Pattern 5: Session Persistence\n\n```bash\n#!\u002Fbin\u002Fbash\n# persistent-session.sh\n\n# Create instance with named profile\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"profile\":\"myaccount\",\"mode\":\"headless\"}' | jq -r '.id')\n\n# Login once\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\u002Flogin\"}'\nsleep 3\n# ... perform login ...\n\n# Stop (cookies saved to profile)\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n\n# Later: Resume with same profile\nINST2=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"profile\":\"myaccount\",\"mode\":\"headless\"}' | jq -r '.id')\n\n# Already logged in!\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST2\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\u002Fdashboard\"}'\n```\n\n---\n\n## MCP Integration\n\nPinchTab provides an SMCP plugin for native Claude Code integration.\n\n### Setup\n\n```bash\n# Set plugin directory\nexport MCP_PLUGINS_DIR=\u002Fpath\u002Fto\u002Fpinchtab\u002Fplugins\n\n# Restart Claude Code to load plugin\n```\n\n### Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `pinchtab__navigate` | Navigate to URL |\n| `pinchtab__snapshot` | Get page structure |\n| `pinchtab__action` | Click, type, press keys |\n| `pinchtab__text` | Extract text content |\n| `pinchtab__screenshot` | Capture screenshot |\n| `pinchtab__pdf` | Generate PDF |\n| `pinchtab__evaluate` | Run JavaScript |\n| `pinchtab__cookies_get` | Get cookies |\n| `pinchtab__stealth_status` | Check stealth mode |\n\n### Usage in Claude Code\n\n```\nUse pinchtab to navigate to example.com and extract the main headlines.\n```\n\nClaude will:\n1. Call `pinchtab__navigate` with URL\n2. Wait 3 seconds\n3. Call `pinchtab__snapshot` with filter\n4. Extract headlines from result\n\n---\n\n## Headless vs Headed\n\n| Aspect | Headless | Headed |\n|--------|----------|--------|\n| **Window** | No visible UI | Chrome window visible |\n| **Speed** | ~20% faster | Slower (rendering overhead) |\n| **Memory** | ~50-80 MB | ~100-150 MB |\n| **Use Case** | CI\u002FCD, scraping, batch | Debugging, visual QA |\n| **Interaction** | API only | API + manual |\n\n```bash\n# Headless for production\npinchtab instances create --mode=headless\n\n# Headed for debugging\npinchtab instances create --mode=headed\n```\n\n---\n\n## Best Practices\n\n### DO\n\n- ✅ Wait 3+ seconds after navigation\n- ✅ Use text extraction over screenshots (token-efficient)\n- ✅ Filter snapshots to reduce tokens\n- ✅ Use profiles for persistent sessions\n- ✅ Run headless in production\n- ✅ Clean up instances after use\n- ✅ Handle errors gracefully\n\n### DON'T\n\n- ❌ Skip the 3-second wait\n- ❌ Take screenshots for text extraction\n- ❌ Parse full snapshots without filtering\n- ❌ Use headed mode in CI\u002FCD\n- ❌ Leave instances running indefinitely\n- ❌ Hardcode element refs (they change)\n\n---\n\n## Troubleshooting\n\n### Only getting 1 node in snapshot\n\n**Cause:** Accessibility tree not ready\n**Fix:** Increase wait time to 3+ seconds\n\n```bash\npinchtab nav https:\u002F\u002Fexample.com\nsleep 3  # Increase if needed\npinchtab snap\n```\n\n### Timeouts\n\n**Cause:** Page too slow or Chrome overloaded\n**Fix:** Increase sleep or use headless mode\n\n```bash\n# Increase wait\nsleep 5\n\n# Or use headless for faster rendering\npinchtab instances create --mode=headless\n```\n\n### Element not found\n\n**Cause:** Refs change between snapshots\n**Fix:** Re-snapshot before each action\n\n```bash\n# Get fresh refs before each action\nREF=$(pinchtab snap -i | jq -r '.nodes[] | select(.name == \"Submit\") | .ref')\npinchtab click \"$REF\"\n```\n\n### Connection refused\n\n**Cause:** PinchTab server not running\n**Fix:** Start server first\n\n```bash\npinchtab  # In separate terminal\n```\n\n---\n\n## References\n\n- [PinchTab Documentation](https:\u002F\u002Fpinchtab.com\u002Fdocs)\n- [PinchTab GitHub](https:\u002F\u002Fgithub.com\u002Fpinchtab\u002Fpinchtab)\n- [Agent Optimization Guide](https:\u002F\u002Fpinchtab.com\u002Fdocs\u002Fguides\u002Fagent-optimization)\n- [Common Patterns](https:\u002F\u002Fpinchtab.com\u002Fdocs\u002Fguides\u002Fcommon-patterns)\n- [SMCP Plugin](https:\u002F\u002Fgithub.com\u002Fpinchtab\u002Fpinchtab\u002Ftree\u002Fmain\u002Fplugins)\n\n---\n\n*Token-efficient browser automation for AI agents.*\n","# Browser Automation\n\nBrowser automation for AI agents using [PinchTab](https:\u002F\u002Fpinchtab.com) — a high-performance Chrome bridge with HTTP API.\n\n## What is PinchTab?\n\n- **Standalone HTTP server** — Control Chrome via HTTP API\n- **Token-efficient** — 800 tokens\u002Fpage with text extraction (vs 10,000+ for screenshots)\n- **Multi-instance** — Run multiple parallel Chrome processes with isolated profiles\n- **Headless or Headed** — Run without window or with visible Chrome\n- **Self-contained** — 12MB binary, no external dependencies\n- **MCP integration** — Native SMCP plugin for Claude Code\n\n## Quick Start\n\n### Installation\n\n```bash\n# macOS \u002F Linux\ncurl -fsSL https:\u002F\u002Fpinchtab.com\u002Finstall.sh | bash\n\n# npm\nnpm install -g pinchtab\n\n# Docker\ndocker run -d -p 9867:9867 pinchtab\u002Fpinchtab\n```\n\n### Start Server\n\n```bash\n# Terminal 1: Start PinchTab server\npinchtab\n# Server runs on http:\u002F\u002Flocalhost:9867\n```\n\n### Basic Commands\n\n```bash\n# Navigate\npinchtab nav https:\u002F\u002Fpinchtab.com\n\n# Wait 3 seconds for accessibility tree\nsleep 3\n\n# Get interactive elements\npinchtab snap -i -c\n\n# Extract text (token-efficient)\npinchtab text\n\n# Click element by ref\npinchtab click e5\n\n# Fill input\npinchtab fill e3 \"user@example.com\"\n```\n\n---\n\n## Core Concepts\n\n### Instance\n\nA running Chrome process. Each instance has isolated state.\n\n```bash\n# Create headless instance\npinchtab instances create --mode=headless\n\n# Create headed instance (visible window)\npinchtab instances create --mode=headed\n\n# List instances\npinchtab instances list\n\n# Stop instance\npinchtab instances stop \u003Cinstance-id>\n```\n\n### Profile\n\nBrowser state (cookies, history, localStorage). Log in once, stay logged in.\n\n```bash\n# Create instance with profile\npinchtab instances create --profile=work\n\n# Profile persists across restarts\n```\n\n### Tab\n\nA single webpage. Each instance can have multiple tabs.\n\n```bash\n# Open new tab\npinchtab tabs open https:\u002F\u002Fexample.com\n\n# List tabs\npinchtab tabs list\n\n# Close tab\npinchtab tabs close \u003Ctab-id>\n```\n\n---\n\n## Token-Efficient Patterns\n\n### The 3-Second Wait Rule\n\n**Critical:** Chrome's accessibility tree takes ~3 seconds to populate after navigation.\n\n```bash\n# ❌ Too fast - empty tree\npinchtab nav https:\u002F\u002Fexample.com\npinchtab snap\n# Returns: {\"count\": 1, \"nodes\": [{\"ref\": \"e0\"}]}\n\n# ✅ Wait 3 seconds\npinchtab nav https:\u002F\u002Fexample.com\nsleep 3\npinchtab snap\n# Returns: {\"count\": 2645, \"nodes\": [...]}\n```\n\n### Optimal Extraction Pattern\n\n```bash\n# Navigate + wait + filter (14x token savings)\ncurl -X POST http:\u002F\u002Flocalhost:9867\u002Fnavigate \\\n  -d '{\"url\": \"https:\u002F\u002Fexample.com\"}' && \\\nsleep 3 && \\\ncurl http:\u002F\u002Flocalhost:9867\u002Fsnapshot | \\\njq '.nodes[] | select(.name | length > 15) | .name' | \\\nhead -30\n```\n\n**Why this works:**\n1. Navigate + wait ensures full accessibility tree\n2. jq filter extracts text nodes only\n3. `length > 15` filters buttons\u002Flabels\n4. `head -30` limits output\n\n**Token comparison:**\n- Exploratory approach: ~3,800 tokens\n- Pattern-driven: ~270 tokens\n- **Savings: 14x**\n\n---\n\n## HTTP API Reference\n\n### Base URL\n\n```\nhttp:\u002F\u002Flocalhost:9867\n```\n\n### Instances\n\n```bash\n# Create instance\nTAB=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"profile\":\"work\",\"mode\":\"headless\"}' | jq -r '.id')\n\n# List instances\ncurl http:\u002F\u002Flocalhost:9867\u002Finstances\n\n# Stop instance\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fstop\"\n```\n\n### Navigation\n\n```bash\n# Navigate to URL\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\"}'\n\n# Wait for load\nsleep 3\n```\n\n### Snapshot\n\n```bash\n# Full snapshot\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fsnapshot\"\n\n# Interactive elements only\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fsnapshot?filter=interactive\"\n\n# With coordinates\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fsnapshot?includeCoords=true\"\n```\n\n### Actions\n\n```bash\n# Click element\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"click\",\"ref\":\"e5\"}'\n\n# Type text\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"type\",\"ref\":\"e12\",\"text\":\"hello\"}'\n\n# Press key\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"key\",\"ref\":\"e12\",\"key\":\"Enter\"}'\n\n# Scroll\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Faction\" \\\n  -d '{\"kind\":\"scroll\",\"direction\":\"down\"}'\n```\n\n### Extraction\n\n```bash\n# Extract text (token-efficient)\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Ftext\"\n\n# Take screenshot\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fscreenshot\" \\\n  --output screenshot.png\n\n# Generate PDF\ncurl \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fpdf\" \\\n  --output page.pdf\n\n# Evaluate JavaScript\ncurl -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$TAB\u002Fevaluate\" \\\n  -d '{\"script\": \"document.title\"}'\n```\n\n---\n\n## Common Patterns\n\n### Pattern 1: Web Scraping\n\n```bash\n#!\u002Fbin\u002Fbash\n# scrape-headlines.sh\n\nURL=$1\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"mode\":\"headless\"}' | jq -r '.id')\n\n# Navigate and wait\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n  -d \"{\\\"url\\\":\\\"$URL\\\"}\"\nsleep 3\n\n# Extract headlines (filter by length)\ncurl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fsnapshot\" | \\\n  jq '.nodes[] | select(.name | length > 20) | .name' | \\\n  head -20\n\n# Cleanup\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n```\n\n### Pattern 2: Form Interaction\n\n```bash\n#!\u002Fbin\u002Fbash\n# fill-form.sh\n\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"mode\":\"headless\"}' | jq -r '.id')\n\n# Navigate to form\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\u002Flogin\"}'\nsleep 3\n\n# Get snapshot to find element refs\nSNAPSHOT=$(curl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fsnapshot?filter=interactive\")\n\n# Extract refs (example: e5=email, e7=password, e9=submit)\nEMAIL_REF=$(echo $SNAPSHOT | jq -r '.nodes[] | select(.name | contains(\"email\")) | .ref')\nPASS_REF=$(echo $SNAPSHOT | jq -r '.nodes[] | select(.name | contains(\"password\")) | .ref')\nSUBMIT_REF=$(echo $SNAPSHOT | jq -r '.nodes[] | select(.role == \"button\") | .ref')\n\n# Fill form\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Faction\" \\\n  -d \"{\\\"kind\\\":\\\"type\\\",\\\"ref\\\":\\\"$EMAIL_REF\\\",\\\"text\\\":\\\"user@example.com\\\"}\"\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Faction\" \\\n  -d \"{\\\"kind\\\":\\\"type\\\",\\\"ref\\\":\\\"$PASS_REF\\\",\\\"text\\\":\\\"password123\\\"}\"\n\n# Submit\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Faction\" \\\n  -d \"{\\\"kind\\\":\\\"click\\\",\\\"ref\\\":\\\"$SUBMIT_REF\\\"}\"\n\n# Wait for navigation\nsleep 3\n\n# Verify login\ncurl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftext\" | jq -r '.title'\n\n# Cleanup\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n```\n\n### Pattern 3: Multi-Instance Parallel Processing\n\n```bash\n#!\u002Fbin\u002Fbash\n# parallel-scrape.sh\n\nURLS=(\"https:\u002F\u002Fsite1.com\" \"https:\u002F\u002Fsite2.com\" \"https:\u002F\u002Fsite3.com\")\nINSTANCES=()\n\n# Create instances\nfor i in {0..2}; do\n  INST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n    -d '{\"mode\":\"headless\"}' | jq -r '.id')\n  INSTANCES[$i]=$INST\ndone\n\n# Launch parallel jobs\nfor i in {0..2}; do\n  (\n    curl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F${INSTANCES[$i]}\u002Ftabs\u002Fopen\" \\\n      -d \"{\\\"url\\\":\\\"${URLS[$i]}\\\"}\"\n    sleep 3\n    TITLE=$(curl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F${INSTANCES[$i]}\u002Ftext\" | jq -r '.title')\n    echo \"Result $i: $TITLE\"\n    curl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F${INSTANCES[$i]}\u002Fstop\"\n  ) &\ndone\n\nwait\necho \"All complete\"\n```\n\n### Pattern 4: Visual Regression Testing\n\n```bash\n#!\u002Fbin\u002Fbash\n# visual-regression.sh\n\nURLS=(\"https:\u002F\u002Fstaging.example.com\" \"https:\u002F\u002Fproduction.example.com\")\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"mode\":\"headless\"}' | jq -r '.id')\n\nfor URL in \"${URLS[@]}\"; do\n  curl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n    -d \"{\\\"url\\\":\\\"$URL\\\"}\"\n  sleep 3\n\n  # Take screenshot\n  FILENAME=$(echo $URL | sed 's\u002F[^a-zA-Z0-9]\u002F_\u002Fg').png\n  curl -s \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fscreenshot\" \\\n    --output \"$FILENAME\"\n  echo \"Saved: $FILENAME\"\ndone\n\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n```\n\n### Pattern 5: Session Persistence\n\n```bash\n#!\u002Fbin\u002Fbash\n# persistent-session.sh\n\n# Create instance with named profile\nINST=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"profile\":\"myaccount\",\"mode\":\"headless\"}' | jq -r '.id')\n\n# Login once\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\u002Flogin\"}'\nsleep 3\n# ... perform login ...\n\n# Stop (cookies saved to profile)\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST\u002Fstop\"\n\n# Later: Resume with same profile\nINST2=$(curl -s -X POST http:\u002F\u002Flocalhost:9867\u002Finstances \\\n  -d '{\"profile\":\"myaccount\",\"mode\":\"headless\"}' | jq -r '.id')\n\n# Already logged in!\ncurl -s -X POST \"http:\u002F\u002Flocalhost:9867\u002Finstances\u002F$INST2\u002Ftabs\u002Fopen\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\u002Fdashboard\"}'\n```\n\n---\n\n## MCP Integration\n\nPinchTab provides an SMCP plugin for native Claude Code integration.\n\n### Setup\n\n```bash\n# Set plugin directory\nexport MCP_PLUGINS_DIR=\u002Fpath\u002Fto\u002Fpinchtab\u002Fplugins\n\n# Restart Claude Code to load plugin\n```\n\n### Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `pinchtab__navigate` | Navigate to URL |\n| `pinchtab__snapshot` | Get page structure |\n| `pinchtab__action` | Click, type, press keys |\n| `pinchtab__text` | Extract text content |\n| `pinchtab__screenshot` | Capture screenshot |\n| `pinchtab__pdf` | Generate PDF |\n| `pinchtab__evaluate` | Run JavaScript |\n| `pinchtab__cookies_get` | Get cookies |\n| `pinchtab__stealth_status` | Check stealth mode |\n\n### Usage in Claude Code\n\n```\nUse pinchtab to navigate to example.com and extract the main headlines.\n```\n\nClaude will:\n1. Call `pinchtab__navigate` with URL\n2. Wait 3 seconds\n3. Call `pinchtab__snapshot` with filter\n4. Extract headlines from result\n\n---\n\n## Headless vs Headed\n\n| Aspect | Headless | Headed |\n|--------|----------|--------|\n| **Window** | No visible UI | Chrome window visible |\n| **Speed** | ~20% faster | Slower (rendering overhead) |\n| **Memory** | ~50-80 MB | ~100-150 MB |\n| **Use Case** | CI\u002FCD, scraping, batch | Debugging, visual QA |\n| **Interaction** | API only | API + manual |\n\n```bash\n# Headless for production\npinchtab instances create --mode=headless\n\n# Headed for debugging\npinchtab instances create --mode=headed\n```\n\n---\n\n## Best Practices\n\n### DO\n\n- ✅ Wait 3+ seconds after navigation\n- ✅ Use text extraction over screenshots (token-efficient)\n- ✅ Filter snapshots to reduce tokens\n- ✅ Use profiles for persistent sessions\n- ✅ Run headless in production\n- ✅ Clean up instances after use\n- ✅ Handle errors gracefully\n\n### DON'T\n\n- ❌ Skip the 3-second wait\n- ❌ Take screenshots for text extraction\n- ❌ Parse full snapshots without filtering\n- ❌ Use headed mode in CI\u002FCD\n- ❌ Leave instances running indefinitely\n- ❌ Hardcode element refs (they change)\n\n---\n\n## Troubleshooting\n\n### Only getting 1 node in snapshot\n\n**Cause:** Accessibility tree not ready\n**Fix:** Increase wait time to 3+ seconds\n\n```bash\npinchtab nav https:\u002F\u002Fexample.com\nsleep 3  # Increase if needed\npinchtab snap\n```\n\n### Timeouts\n\n**Cause:** Page too slow or Chrome overloaded\n**Fix:** Increase sleep or use headless mode\n\n```bash\n# Increase wait\nsleep 5\n\n# Or use headless for faster rendering\npinchtab instances create --mode=headless\n```\n\n### Element not found\n\n**Cause:** Refs change between snapshots\n**Fix:** Re-snapshot before each action\n\n```bash\n# Get fresh refs before each action\nREF=$(pinchtab snap -i | jq -r '.nodes[] | select(.name == \"Submit\") | .ref')\npinchtab click \"$REF\"\n```\n\n### Connection refused\n\n**Cause:** PinchTab server not running\n**Fix:** Start server first\n\n```bash\npinchtab  # In separate terminal\n```\n\n---\n\n## References\n\n- [PinchTab Documentation](https:\u002F\u002Fpinchtab.com\u002Fdocs)\n- [PinchTab GitHub](https:\u002F\u002Fgithub.com\u002Fpinchtab\u002Fpinchtab)\n- [Agent Optimization Guide](https:\u002F\u002Fpinchtab.com\u002Fdocs\u002Fguides\u002Fagent-optimization)\n- [Common Patterns](https:\u002F\u002Fpinchtab.com\u002Fdocs\u002Fguides\u002Fcommon-patterns)\n- [SMCP Plugin](https:\u002F\u002Fgithub.com\u002Fpinchtab\u002Fpinchtab\u002Ftree\u002Fmain\u002Fplugins)\n\n---\n\n*Token-efficient browser automation for AI agents.*\n",{"name":5,"metadata":24,"description":7},{"origin":25,"version":26},"PinchTab","1.0","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fb\u002Fbrowser-automation-pin",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill browser-automation",{"tool":42,"command":43},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill browser-automation",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill browser-automation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fb\u002Fbrowser-automation-pin\u002FSKILL.md",true,[],[51,59,66,73,80,87],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":58},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":58},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":58},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":58},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":58},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":58},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]