High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
chore: skill update
Luigi Agostief5b8c9e8c4a
diff --git a/skill/pinchtab/SKILL.md b/skill/pinchtab/SKILL.mddeleted file mode 100644index 567fabfc..00000000--- a/skill/pinchtab/SKILL.md+++ /dev/null@@ -1,154 +0,0 @@-----name: pinchtab-description: Control a headless or headed Chrome browser via Pinchtab's HTTP API for web automation, scraping, form filling, navigation, screenshots, and extraction with stable accessibility refs.-metadata:- short-description: Browser automation via Pinchtab HTTP API------# Pinchtab--Fast, lightweight browser control for AI agents via HTTP + accessibility tree.--**Security Note:** Pinchtab runs entirely locally. It does not contact external services, send telemetry, or exfiltrate data. However, it controls a real Chrome instance — if pointed at a profile with saved logins, agents can access authenticated sites. Always use a dedicated empty profile and set BRIDGE_TOKEN when exposing the API. See [TRUST.md](TRUST.md) for the full security model.--## Quick Start (Agent Workflow)--The 30-second pattern for browser tasks:--```bash-# 1. Start Pinchtab (runs forever, local on :9867)-pinchtab &--# 2. In your agent, follow this loop:-# a) Navigate to a URL-# b) Snapshot the page (get refs like e0, e5, e12)-# c) Act on a ref (click e5, type e12 "search text")-# d) Snapshot again to see the result-# e) Repeat step c-d until done-```--**That's it.** Refs are stable—you don't need to re-snapshot before every action. Only snapshot when the page changes significantly.--### Recommended Secure Setup--```bash-# Best practice for AI agents-BRIDGE_BIND=127.0.0.1 \-BRIDGE_TOKEN="your-strong-secret" \-BRIDGE_PROFILE=~/.pinchtab/automation-profile \-pinchtab &-```--**Never expose to 0.0.0.0 without a token. Never point at your daily Chrome profile.**--## Setup--```bash-# Headless (default) — no visible window-pinchtab &--# Headed — visible Chrome window for human debugging-BRIDGE_HEADLESS=false pinchtab &--# With auth token-BRIDGE_TOKEN="your-secret-token" pinchtab &--# Custom port-BRIDGE_PORT=8080 pinchtab &-```--Default: **port 9867**, no auth required (local). Set `BRIDGE_TOKEN` for remote access.--For advanced setup, see [references/profiles.md](references/profiles.md) and [references/env.md](references/env.md).--## What a Snapshot Looks Like--After calling `/snapshot`, you get the page's accessibility tree as JSON—flat list of elements with refs:--```json-{- "refs": [- {"id": "e0", "role": "link", "text": "Sign In", "selector": "a[href='/login']"},- {"id": "e1", "role": "textbox", "label": "Email", "selector": "input[name='email']"},- {"id": "e2", "role": "button", "text": "Submit", "selector": "button[type='submit']"}- ],- "text": "... readable text version of page ...",- "title": "Login Page"-}-```--Then you act on refs: `click e0`, `type e1 "[email protected]"`, `press e2 Enter`.--## Core Workflow--The typical agent loop:--1. **Navigate** to a URL-2. **Snapshot** the accessibility tree (get refs)-3. **Act** on refs (click, type, press)-4. **Snapshot** again to see results--Refs (e.g. `e0`, `e5`, `e12`) are cached per tab after each snapshot — no need to re-snapshot before every action unless the page changed significantly.--### Quick examples--```bash-pinchtab nav https://pinchtab.com-pinchtab snap -i -c # interactive + compact-pinchtab click e5-pinchtab type e12 hello world-pinchtab press Enter-pinchtab text # readable text (~1K tokens)-pinchtab text | jq .text # pipe to jq-pinchtab ss -o page.jpg # screenshot-pinchtab eval "document.title" # run JavaScript-pinchtab pdf --tab TAB_ID -o page.pdf # export PDF-```--For the full HTTP API (curl examples, download, upload, cookies, stealth, batch actions, PDF export with full parameter control), see [references/api.md](references/api.md).--## Token Cost Guide--| Method | Typical tokens | When to use |-|---|---|---|-| `/text` | ~800 | Reading page content |-| `/snapshot?filter=interactive` | ~3,600 | Finding buttons/links to click |-| `/snapshot?diff=true` | varies | Multi-step workflows (only changes) |-| `/snapshot?format=compact` | ~56-64% less | One-line-per-node, best efficiency |-| `/snapshot` | ~10,500 | Full page understanding |-| `/screenshot` | ~2K (vision) | Visual verification |-| `/tabs/{id}/pdf` | 0 (binary) | Export page as PDF (no token cost) |--**Strategy**: Start with `?filter=interactive&format=compact`. Use `?diff=true` on subsequent snapshots. Use `/text` when you only need readable content. Full `/snapshot` only when needed.--## Agent Optimization--**Validated Feb 2026**: Testing with AI agents revealed a critical pattern for reliable, token-efficient scraping.--**See the full guide:** [docs/agent-optimization.md](../../docs/agent-optimization.md)--### Quick Summary--**The 3-second pattern** — wait after navigate before snapshot:--```bash-curl -X POST http://localhost:9867/navigate \- -H "Content-Type: application/json" \- -d '{"url": "https://pinchtab.com"}' && \-sleep 3 && \-curl http://localhost:9867/snapshot | jq '.nodes[] | select(.name | length > 15) | .name'-```--**Token savings:** 93% reduction (3,842 → 272 tokens) when using prescriptive instructions vs. exploratory agent approach.--For detailed findings, system prompt templates, and site-specific notes, see [docs/agent-optimization.md](../../docs/agent-optimization.md).--## Tips--- **Always pass `tabId` explicitly** when working with multiple tabs-- Refs are stable between snapshot and actions — no need to re-snapshot before clicking-- After navigation or major page changes, take a new snapshot for fresh refs-- Pinchtab persists sessions — tabs survive restarts (disable with `BRIDGE_NO_RESTORE=true`)-- Chrome profile is persistent — cookies/logins carry over between runs-- Use `BRIDGE_BLOCK_IMAGES=true` or `"blockImages": true` on navigate for read-heavy tasks-- **Wait 3+ seconds after navigate before snapshot** — Chrome needs time to render 2000+ accessibility tree nodesdiff --git a/skill/pinchtab/references/api.md b/skill/pinchtab/references/api.mddeleted file mode 100644index 922ecd8b..00000000--- a/skill/pinchtab/references/api.md+++ /dev/null@@ -1,297 +0,0 @@-# Pinchtab API Reference--Base URL for all examples: `http://localhost:9867`--> **CLI alternative:** All endpoints have CLI equivalents. Use `pinchtab help` for the full list. Examples are shown as `# CLI:` comments below.--## Navigate--```bash-# CLI: pinchtab nav https://pinchtab.com [--new-tab] [--block-images]-curl -X POST /navigate \- -H 'Content-Type: application/json' \- -d '{"url": "https://pinchtab.com"}'--# With options: custom timeout, block images, open in new tab-curl -X POST /navigate \- -H 'Content-Type: application/json' \- -d '{"url": "https://pinchtab.com", "timeout": 60, "blockImages": true, "newTab": true}'-```--## Snapshot (accessibility tree)--```bash-# CLI: pinchtab snap [-i] [-c] [-d] [-s main] [--max-tokens 2000]-# Full tree-curl /snapshot--# Interactive elements only (buttons, links, inputs) — much smaller-curl "/snapshot?filter=interactive"--# Limit depth-curl "/snapshot?depth=5"--# Smart diff — only changes since last snapshot (massive token savings)-curl "/snapshot?diff=true"--# Text format — indented tree, ~40-60% fewer tokens than JSON-curl "/snapshot?format=text"--# Compact format — one-line-per-node, 56-64% fewer tokens than JSON (recommended)-curl "/snapshot?format=compact"--# YAML format-curl "/snapshot?format=yaml"--# Scope to CSS selector (e.g. main content only)-curl "/snapshot?selector=main"--# Truncate to ~N tokens-curl "/snapshot?maxTokens=2000"--# Combine for maximum efficiency-curl "/snapshot?format=compact&selector=main&maxTokens=2000&filter=interactive"--# Disable animations before capture-curl "/snapshot?noAnimations=true"--# Write to file-curl "/snapshot?output=file&path=/tmp/snapshot.json"-```--Returns flat JSON array of nodes with `ref`, `role`, `name`, `depth`, `value`, `nodeId`.--**Token optimization**: Use `?format=compact` for best token efficiency. Add `?filter=interactive` for action-oriented tasks (~75% fewer nodes). Use `?selector=main` to scope to relevant content. Use `?maxTokens=2000` to cap output. Use `?diff=true` on multi-step workflows to see only changes. Combine all params freely.--## Act on elements--```bash-# CLI: pinchtab click e5 / pinchtab type e12 hello / pinchtab press Enter-# Click by ref-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "click", "ref": "e5"}'--# Type into focused element (click first, then type)-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "click", "ref": "e12"}'-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "type", "ref": "e12", "text": "hello world"}'--# Press a key-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "press", "key": "Enter"}'--# Focus an element-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "focus", "ref": "e3"}'--# Fill (set value directly, no keystrokes)-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "fill", "selector": "#email", "text": "[email protected]"}'--# Hover (trigger dropdowns/tooltips)-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "hover", "ref": "e8"}'--# Select dropdown option (by value or visible text)-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "select", "ref": "e10", "value": "option2"}'--# Scroll to element-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "scroll", "ref": "e20"}'--# Scroll by pixels (infinite scroll pages)-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "scroll", "scrollY": 800}'--# Click and wait for navigation (link clicks)-curl -X POST /action -H 'Content-Type: application/json' \- -d '{"kind": "click", "ref": "e5", "waitNav": true}'-```--## Batch actions--```bash-# Execute multiple actions in sequence-curl -X POST /actions -H 'Content-Type: application/json' \- -d '{"actions":[{"kind":"click","ref":"e3"},{"kind":"type","ref":"e3","text":"hello"},{"kind":"press","key":"Enter"}]}'--# Stop on first error (default: false)-curl -X POST /actions -H 'Content-Type: application/json' \- -d '{"tabId":"TARGET_ID","actions":[...],"stopOnError":true}'-```--## Extract text--```bash-# CLI: pinchtab text [--raw]-# Readability mode (default) — strips nav/footer/ads-curl /text--# Raw innerText-curl "/text?mode=raw"-```--Returns `{url, title, text}`. Cheapest option (~1K tokens for most pages).--## PDF export--```bash-# CLI: pinchtab pdf --tab TAB_ID [-o file.pdf] [--landscape] [--scale 0.8]-# Returns base64 JSON-curl "/tabs/TAB_ID/pdf"--# Raw PDF bytes-curl "/tabs/TAB_ID/pdf?raw=true" -o page.pdf--# Save to disk-curl "/tabs/TAB_ID/pdf?output=file&path=/tmp/page.pdf"--# Landscape with custom scale-curl "/tabs/TAB_ID/pdf?landscape=true&scale=0.8&raw=true" -o page.pdf--# Custom paper size (Letter: 8.5x11, A4: 8.27x11.69)-curl "/tabs/TAB_ID/pdf?paperWidth=8.5&paperHeight=11&marginTop=0.5&marginLeft=0.5&raw=true" -o custom.pdf--# Export specific pages-curl "/tabs/TAB_ID/pdf?pageRanges=1-5&raw=true" -o pages.pdf--# With header/footer-curl "/tabs/TAB_ID/pdf?displayHeaderFooter=true&headerTemplate=%3Cspan%20class=title%3E%3C/span%3E&raw=true" -o header.pdf--# Accessible PDF with document outline-curl "/tabs/TAB_ID/pdf?generateTaggedPDF=true&generateDocumentOutline=true&raw=true" -o accessible.pdf--# Honor CSS page size-curl "/tabs/TAB_ID/pdf?preferCSSPageSize=true&raw=true" -o css-sized.pdf-```--**Query Parameters:**--| Param | Type | Default | Description |-|-------|------|---------|-------------|-| `paperWidth` | float | 8.5 | Paper width in inches |-| `paperHeight` | float | 11.0 | Paper height in inches |-| `landscape` | bool | false | Landscape orientation |-| `marginTop` | float | 0.4 | Top margin in inches |-| `marginBottom` | float | 0.4 | Bottom margin in inches |-| `marginLeft` | float | 0.4 | Left margin in inches |-| `marginRight` | float | 0.4 | Right margin in inches |-| `scale` | float | 1.0 | Print scale (0.1–2.0) |-| `pageRanges` | string | all | Pages to export (e.g., `1-3,5`) |-| `displayHeaderFooter` | bool | false | Show header and footer |-| `headerTemplate` | string | — | HTML template for header |-| `footerTemplate` | string | — | HTML template for footer |-| `preferCSSPageSize` | bool | false | Honor CSS `@page` size |-| `generateTaggedPDF` | bool | false | Generate accessible/tagged PDF |-| `generateDocumentOutline` | bool | false | Embed document outline |-| `output` | string | JSON | `file` to save to disk, default returns base64 |-| `path` | string | auto | Custom file path (with `output=file`) |-| `raw` | bool | false | Return raw PDF bytes instead of JSON |--Wraps `Page.printToPDF`. Prints background graphics by default.--## Download files--```bash-# Returns base64 JSON by default (uses browser session/cookies/stealth)-curl "/download?url=https://site.com/report.pdf"--# Raw bytes (pipe to file)-curl "/download?url=https://site.com/image.jpg&raw=true" -o image.jpg--# Save directly to disk-curl "/download?url=https://site.com/export.csv&output=file&path=/tmp/export.csv"-```--## Upload files--```bash-# Upload a local file to a file input-curl -X POST "/upload?tabId=TAB_ID" -H "Content-Type: application/json" \- -d '{"selector": "input[type=file]", "paths": ["/tmp/photo.jpg"]}'--# Upload base64-encoded data-curl -X POST /upload -H "Content-Type: application/json" \- -d '{"selector": "#avatar-input", "files": ["data:image/png;base64,iVBOR..."]}'-```--Sets files on `<input type=file>` elements via CDP. Fires `change` events. Selector defaults to `input[type=file]` if omitted.--## Screenshot--```bash-# CLI: pinchtab ss [-o file.jpg] [-q 80]-curl "/screenshot?raw=true" -o screenshot.jpg-curl "/screenshot?raw=true&quality=50" -o screenshot.jpg-```--## Evaluate JavaScript--```bash-# CLI: pinchtab eval "document.title"-curl -X POST /evaluate -H 'Content-Type: application/json' \- -d '{"expression": "document.title"}'-```--## Tab management--```bash-# CLI: pinchtab tabs / pinchtab tabs new <url> / pinchtab tabs close <id>-# List tabs-curl /tabs--# Open new tab-curl -X POST /tab -H 'Content-Type: application/json' \- -d '{"action": "new", "url": "https://pinchtab.com"}'--# Close tab-curl -X POST /tab -H 'Content-Type: application/json' \- -d '{"action": "close", "tabId": "TARGET_ID"}'-```--Multi-tab: pass `?tabId=TARGET_ID` to snapshot/screenshot/text, or `"tabId"` in POST body.--## Tab locking (multi-agent)--```bash-# Lock a tab (default 30s timeout, max 5min)-curl -X POST /tab/lock -H 'Content-Type: application/json' \- -d '{"tabId": "TARGET_ID", "owner": "agent-1", "timeoutSec": 60}'--# Unlock-curl -X POST /tab/unlock -H 'Content-Type: application/json' \- -d '{"tabId": "TARGET_ID", "owner": "agent-1"}'-```--Locked tabs show `owner` and `lockedUntil` in `/tabs`. Returns 409 on conflict.--## Cookies--```bash-# Get cookies for current page-curl /cookies--# Set cookies-curl -X POST /cookies -H 'Content-Type: application/json' \- -d '{"url":"https://pinchtab.com","cookies":[{"name":"session","value":"abc123"}]}'-```--## Stealth--```bash-# Check stealth status and score-curl /stealth/status--# Rotate browser fingerprint-curl -X POST /fingerprint/rotate -H 'Content-Type: application/json' \- -d '{"os":"windows"}'-# os: "windows", "mac", or omit for random-```--## Health check--```bash-curl /health-```diff --git a/skill/pinchtab/references/env.md b/skill/pinchtab/references/env.mddeleted file mode 100644index 2f3aaf2e..00000000--- a/skill/pinchtab/references/env.md+++ /dev/null@@ -1,45 +0,0 @@-# Pinchtab Environment Variables--## Core runtime--| Var | Default | Description |-|---|---|---|-| `BRIDGE_BIND` | `127.0.0.1` | Bind address. Set `0.0.0.0` for network access |-| `BRIDGE_PORT` | `9867` | HTTP port |-| `BRIDGE_HEADLESS` | `true` | Run Chrome headless |-| `BRIDGE_TOKEN` | (none) | Bearer auth token (recommended with `0.0.0.0`) |-| `BRIDGE_PROFILE` | `~/.pinchtab/chrome-profile` | Chrome profile dir |-| `BRIDGE_STATE_DIR` | `~/.pinchtab` | State/session storage |-| `BRIDGE_NO_RESTORE` | `false` | Skip tab restore on startup |-| `BRIDGE_STEALTH` | `light` | Stealth level: `light` or `full` |-| `BRIDGE_MAX_TABS` | `20` | Max open tabs (0 = unlimited) |-| `BRIDGE_BLOCK_IMAGES` | `false` | Block image loading |-| `BRIDGE_BLOCK_MEDIA` | `false` | Block all media (images + fonts + CSS + video) |-| `BRIDGE_NO_ANIMATIONS` | `false` | Disable CSS animations/transitions |-| `BRIDGE_TIMEZONE` | (none) | Force browser timezone (IANA tz) |-| `BRIDGE_CHROME_VERSION` | `144.0.7559.133` | Chrome version for fingerprint rotation |-| `BRIDGE_USER_AGENT` | (none) | Custom User-Agent string; also overrides Sec-Ch-Ua client hints via CDP |-| `CHROME_BINARY` | (auto) | Path to Chrome/Chromium binary |-| `CHROME_FLAGS` | (none) | Extra Chrome flags (space-separated) |-| `BRIDGE_CONFIG` | `~/.pinchtab/config.json` | Path to config JSON file |-| `BRIDGE_TIMEOUT` | `15` | Action timeout (seconds) |-| `BRIDGE_NAV_TIMEOUT` | `30` | Navigation timeout (seconds) |-| `CDP_URL` | (none) | Connect to existing Chrome DevTools |-| `BRIDGE_NO_DASHBOARD` | `false` | Disable dashboard endpoints on instance processes |--## CLI client--| Var | Default | Description |-|---|---|---|-| `PINCHTAB_URL` | `http://localhost:9867` | Pinchtab server URL for CLI commands |-| `PINCHTAB_TOKEN` | (none) | Auth token for CLI (sent as `Authorization: Bearer`) |--## Dashboard (`pinchtab`)--| Var | Default | Description |-|---|---|---|-| `PINCHTAB_AUTO_LAUNCH` | `false` | Auto-launch default profile at startup |-| `PINCHTAB_DEFAULT_PROFILE` | `default` | Profile name for auto-launch |-| `PINCHTAB_DEFAULT_PORT` | `9867` | Port for auto-launched profile |-| `PINCHTAB_HEADED` | (unset) | If set, auto-launched profile is headed |-| `PINCHTAB_DASHBOARD_URL` | `http://localhost:$BRIDGE_PORT` | Base URL for `pinchtab connect` |diff --git a/skill/pinchtab/references/profiles.md b/skill/pinchtab/references/profiles.mddeleted file mode 100644index 8e4b54d1..00000000--- a/skill/pinchtab/references/profiles.md+++ /dev/null@@ -1,107 +0,0 @@-# Profile Management--When running `pinchtab`, profiles are managed via the dashboard API on port 9867.--## List profiles--```bash-curl http://localhost:9867/profiles-```--Returns array of profiles with `id`, `name`, `accountEmail`, `useWhen`, etc.--## Start a profile--```bash-# Auto-allocate port (recommended)-curl -X POST http://localhost:9867/profiles/<ID>/start--# With specific port and headless mode-curl -X POST http://localhost:9867/profiles/<ID>/start \- -H 'Content-Type: application/json' \- -d '{"port": "9868", "headless": true}'--# Short alias-curl -X POST http://localhost:9867/start/<ID>-```--Returns instance info including allocated `port`. Use that port for all subsequent API calls.--## Stop a profile--```bash-curl -X POST http://localhost:9867/profiles/<ID>/stop--# Short alias-curl -X POST http://localhost:9867/stop/<ID>-```--## Check instance status--```bash-# By profile ID (recommended)-curl http://localhost:9867/profiles/<ID>/instance--# By profile name-curl http://localhost:9867/profiles/My%20Profile/instance-```--## Launch by name--```bash-curl -X POST http://localhost:9867/instances/launch \- -H 'Content-Type: application/json' \- -d '{"name": "work", "port": "9868"}'-```--## CLI usage with profiles--The CLI doesn't have profile subcommands yet — use `curl` for profile management.-Once a profile instance is running, point the CLI at it:--```bash-# Get the instance port, then use CLI-PINCHTAB_URL=http://localhost:9868 pinchtab snap -i-```--## Typical agent flow--```bash-# 1. List profiles-PROFILES=$(curl -s http://localhost:9867/profiles)--# 2. Start profile (auto-allocates port)-INSTANCE=$(curl -s -X POST http://localhost:9867/profiles/$PROFILE_ID/start)-PORT=$(echo $INSTANCE | jq -r .port)--# 3. Use the instance-curl -X POST http://localhost:$PORT/navigate -H 'Content-Type: application/json' \- -d '{"url": "https://mail.google.com"}'-curl http://localhost:$PORT/snapshot?maxTokens=4000--# 4. Stop when done-curl -s -X POST http://localhost:9867/profiles/$PROFILE_ID/stop-```--## Profile IDs--Each profile gets a stable 12-char hex ID (SHA-256 of name, truncated) stored in `profile.json`. IDs are URL-safe and never change — use them instead of names in automation.--## Headed mode--Headed mode = real visible Chrome window managed by Pinchtab.--- Human can log in, pass 2FA/captcha, validate state-- Agent calls HTTP APIs against the same running instance-- Session state persists in profile directory (cookies/storage carry over)--Recommended human + agent flow:--```bash-# Human starts dashboard and sets up profile-pinchtab--# Agent resolves the profile endpoint-PINCHTAB_BASE_URL="$(pinchtab connect <profile-name>)"-curl "$PINCHTAB_BASE_URL/health"-```diff --git a/skills/pinchtab/SKILL.md b/skills/pinchtab/SKILL.mdnew file mode 100644index 00000000..5c6c46a4--- /dev/null+++ b/skills/pinchtab/SKILL.md@@ -0,0 +1,322 @@+---+name: pinchtab+description: "Use this skill when a task needs browser automation through PinchTab: open a website, inspect interactive elements, click through flows, fill out forms, scrape page text, log into sites with a persistent profile, export screenshots or PDFs, manage multiple browser instances, or fall back to the HTTP API when the CLI is unavailable. Prefer this skill for token-efficient browser work driven by stable accessibility refs such as `e5` and `e12`."+---++# Browser Automation with PinchTab++PinchTab gives agents a browser they can drive through stable accessibility refs, low-token text extraction, and persistent profiles or instances. Treat it as a CLI-first browser skill; use the HTTP API only when the CLI is unavailable or you need profile-management routes that do not exist in the CLI yet.++Preferred tool surface:++- Use `pinchtab` CLI commands first.+- Use `curl` for profile-management routes or non-shell/API fallback flows.+- Use `jq` only when you need structured parsing from JSON responses.++## Core Workflow++Every PinchTab automation follows this pattern:++1. Ensure the correct server, profile, or instance is available for the task.+2. Navigate with `pinchtab nav <url>` or `pinchtab instance navigate <instance-id> <url>`.+3. Observe with `pinchtab snap -i -c`, `pinchtab snap --text`, or `pinchtab text`, then collect the current refs such as `e5`.+4. Interact with those fresh refs using `click`, `fill`, `type`, `press`, `select`, `hover`, or `scroll`.+5. Re-snapshot or re-read text after any navigation, submit, modal open, accordion expand, or other DOM-changing action.++Rules:++- Never act on stale refs after the page changes.+- Default to `pinchtab text` when you need content, not layout.+- Default to `pinchtab snap -i -c` when you need actionable elements.+- Use screenshots only for visual verification, UI diffs, or debugging.+- Start multi-site or parallel work by choosing the right instance or profile first.++## Command Chaining++Use `&&` only when you do not need to inspect intermediate output before deciding the next step.++Good:++```bash+pinchtab nav https://example.com && pinchtab snap -i -c+pinchtab click --wait-nav e5 && pinchtab snap -i -c+pinchtab nav https://example.com --block-images && pinchtab text+```++Run commands separately when you must read the snapshot output first:++```bash+pinchtab nav https://example.com+pinchtab snap -i -c+# Read refs, choose the correct e#+pinchtab click e7+pinchtab snap -i -c+```++## Handling Authentication and State++Pick one of these five patterns before you start interacting with the site.++### 1. One-off public browsing++Use a temporary instance for public pages, scraping, or tasks that do not need login persistence.++```bash+pinchtab instance start+pinchtab instances+# Point CLI commands at the instance port you want to use.+PINCHTAB_URL=http://localhost:9868 pinchtab nav https://example.com+PINCHTAB_URL=http://localhost:9868 pinchtab text+```++### 2. Reuse an existing named profile++Use this for recurring tasks against the same authenticated site.++```bash+pinchtab profiles+pinchtab instance start --profile work --mode headed+PINCHTAB_URL=http://localhost:9868 pinchtab nav https://mail.google.com+```++If the login is already stored in that profile, you can switch to headless later:++```bash+pinchtab instance stop inst_ea2e747f+pinchtab instance start --profile work --mode headless+```++### 3. Create a dedicated auth profile over HTTP++Use this when you need a durable profile and it does not exist yet.++```bash+curl -X POST http://localhost:9867/profiles \+ -H "Content-Type: application/json" \+ -d '{"name":"billing","description":"Billing portal automation","useWhen":"Use for billing tasks"}'++curl -X POST http://localhost:9867/profiles/billing/start \+ -H "Content-Type: application/json" \+ -d '{"headless":false}'+```++Then target the returned port with `PINCHTAB_URL`.++### 4. Human-assisted headed login, then agent reuse++Use this for CAPTCHA, MFA, or first-time setup.++```bash+pinchtab instance start --profile work --mode headed+# Human completes login in the visible Chrome window.+PINCHTAB_URL=http://localhost:9868 pinchtab nav https://app.example.com/dashboard+PINCHTAB_URL=http://localhost:9868 pinchtab snap -i -c+```++Once the session is stored, reuse the same profile for later tasks.++### 5. Remote or non-shell agent with tokenized HTTP API++Use this when the agent cannot call the CLI directly.++```bash+curl http://localhost:9867/health+curl -X POST http://localhost:9867/instances/launch \+ -H "Content-Type: application/json" \+ -d '{"name":"work","headless":true}'+curl -X POST http://localhost:9868/action \+ -H "Content-Type: application/json" \+ -d '{"kind":"click","ref":"e5"}'+```++If the server is exposed beyond localhost, require a token and use a dedicated automation profile. See [TRUST.md](./TRUST.md) and [config.md](../../docs/reference/config.md).++## Essential Commands++### Server and targeting++```bash+pinchtab server+pinchtab daemon+pinchtab health+pinchtab instances+pinchtab profiles+PINCHTAB_URL=http://localhost:9868 pinchtab snap -i -c+```++### Navigation and tabs++```bash+pinchtab nav <url>+pinchtab nav <url> --new-tab+pinchtab nav <url> --tab <tab-id>+pinchtab nav <url> --block-images+pinchtab nav <url> --block-ads+pinchtab tab+pinchtab tab new <url>+pinchtab tab close <tab-id>+pinchtab instance navigate <instance-id> <url>+```++### Observation++```bash+pinchtab snap+pinchtab snap -i+pinchtab snap -i -c+pinchtab snap -d+pinchtab snap --selector <css>+pinchtab snap --max-tokens <n>+pinchtab snap --text+pinchtab text+pinchtab text --raw+pinchtab find <query>+pinchtab find --ref-only <query>+```++Guidance:++- `snap -i -c` is the default for finding actionable refs.+- `snap -d` is the default follow-up snapshot for multi-step flows.+- `text` is the default for reading articles, dashboards, reports, or confirmation messages.+- `find --ref-only` is useful when the page is large and you already know the semantic target.++### Interaction++```bash+pinchtab click <ref>+pinchtab click --wait-nav <ref>+pinchtab click --css <selector>+pinchtab type <ref> <text>+pinchtab fill <ref|selector> <text>+pinchtab press <key>+pinchtab hover <ref>+pinchtab select <ref> <value>+pinchtab scroll <ref|pixels>+```++Rules:++- Prefer `fill` for deterministic form entry.+- Prefer `type` only when the site depends on keystroke events.+- Prefer `click --wait-nav` when a click is expected to navigate.+- Re-snapshot immediately after `click`, `press Enter`, `select`, or `scroll` if the UI can change.++### Export, debug, and verification++```bash+pinchtab screenshot+pinchtab screenshot -o page.jpg+pinchtab screenshot -q 60+pinchtab pdf+pinchtab pdf -o report.pdf+pinchtab pdf --landscape+pinchtab eval <expression>+pinchtab download <url> -o out.bin+pinchtab upload <file> -s <css>+```++### HTTP API fallback++```bash+curl -X POST http://localhost:9868/navigate \+ -H "Content-Type: application/json" \+ -d '{"url":"https://example.com"}'++curl "http://localhost:9868/snapshot?filter=interactive&format=compact"++curl -X POST http://localhost:9868/action \+ -H "Content-Type: application/json" \+ -d '{"kind":"fill","ref":"e3","text":"[email protected]"}'++curl http://localhost:9868/text+```++Use the API when:++- the agent cannot shell out,+- profile creation or mutation is required,+- or you need explicit instance- and tab-scoped routes.++## Common Patterns++### Open a page and inspect actions++```bash+pinchtab nav https://pinchtab.com && pinchtab snap -i -c+```++### Fill and submit a form++```bash+pinchtab nav https://example.com/login+pinchtab snap -i -c+pinchtab fill e3 "[email protected]"+pinchtab fill e4 "correct horse battery staple"+pinchtab click --wait-nav e5+pinchtab text+```++### Search, then extract the result page cheaply++```bash+pinchtab nav https://example.com+pinchtab snap -i -c+pinchtab fill e2 "quarterly report"+pinchtab press Enter+pinchtab text+```++### Use diff snapshots in a multi-step flow++```bash+pinchtab nav https://example.com/checkout+pinchtab snap -i -c+pinchtab click e8+pinchtab snap -d -i -c+```++### Bootstrap an authenticated profile++```bash+pinchtab profiles+pinchtab instance start --profile work --mode headed+# Human signs in once.+PINCHTAB_URL=http://localhost:9868 pinchtab text+```++### Run separate instances for separate sites++```bash+pinchtab instance start --profile work --mode headless+pinchtab instance start --profile staging --mode headless+pinchtab instances+```++Then point each command stream at its own `PINCHTAB_URL`.++## Security and Token Economy++- Use a dedicated automation profile, not a daily browsing profile.+- If PinchTab is reachable off-machine, require a token and bind conservatively.+- Prefer `text`, `snap -i -c`, and `snap -d` before screenshots.+- Use `--block-images` for read-heavy tasks that do not need visual assets.+- Stop or isolate instances when switching between unrelated accounts or environments.++## Diffing and Verification++- Use `pinchtab snap -d` after each state-changing action in long workflows.+- Use `pinchtab text` to confirm success messages, table updates, or navigation outcomes.+- Use `pinchtab screenshot` only when visual regressions, CAPTCHA, or layout-specific confirmation matters.+- If a ref disappears after a change, treat that as expected and fetch fresh refs instead of retrying the stale one.++## References++- Command surface: [commands.md](../../docs/commands.md)+- CLI overview: [cli.md](../../docs/reference/cli.md)+- Profiles: [profiles.md](../../docs/reference/profiles.md)+- Instances: [instances.md](../../docs/reference/instances.md)+- Full API: [api.md](./references/api.md)+- Minimal env vars: [env.md](./references/env.md)+- Config reference: [config.md](../../docs/reference/config.md)+- Security model: [TRUST.md](./TRUST.md)diff --git a/skill/pinchtab/TRUST.md b/skills/pinchtab/TRUST.mdsimilarity index 93%rename from skill/pinchtab/TRUST.mdrename to skills/pinchtab/TRUST.mdindex 48b4d863..8a5933e5 100644--- a/skill/pinchtab/TRUST.md+++ b/skills/pinchtab/TRUST.md@@ -34,7 +34,7 @@ Binaries are built automatically from tagged commits via GitHub Actions (publicl- **Source**: https://github.com/pinchtab/pinchtab (MIT)- **Releases**: https://github.com/pinchtab/pinchtab/releases-- **Latest**: v0.7.0 (Feb 2026)+- **Latest**: v0.8.0 (March 2026)If you're concerned, audit the source—it's 12MB, zero external dependencies, mostly Go stdlib.@@ -60,7 +60,7 @@ Pinchtab runs a separate Chrome process with:- No access to your user's home files (unless you explicitly navigate to `file://` URLs)- Standard Chrome security model (site isolation, CSP, etc.)-Set `BRIDGE_PROFILE_DIR` to use a custom directory if needed.+Use `profiles.baseDir`, `profiles.defaultProfile`, or `PINCHTAB_CONFIG` if you need to control where PinchTab stores browser state.## Questions?diff --git a/skills/pinchtab/agents/openai.yaml b/skills/pinchtab/agents/openai.yamlnew file mode 100644index 00000000..bd2140ca--- /dev/null+++ b/skills/pinchtab/agents/openai.yaml@@ -0,0 +1,4 @@+interface:+ display_name: "PinchTab"+ short_description: "Control browsers and access sites with PinchTab"+ default_prompt: "Use $pinchtab to navigate a site, inspect fresh refs, and complete the browser task efficiently."diff --git a/skills/pinchtab/references/env.md b/skills/pinchtab/references/env.mdnew file mode 100644index 00000000..e795a1a3--- /dev/null+++ b/skills/pinchtab/references/env.md@@ -0,0 +1,32 @@+# PinchTab Environment Variables++This reference is intentionally narrow.++For agent workflows, most runtime behavior should be configured through `config.json` or the `pinchtab config` commands, not environment variables.++## Agent-relevant variables++| Var | Typical use | Notes |+|---|---|---|+| `PINCHTAB_URL` | Point CLI commands at a specific server or instance | Example: `PINCHTAB_URL=http://localhost:9868 pinchtab snap -i -c` |+| `PINCHTAB_TOKEN` | Authenticate CLI or MCP requests to a protected server | Sent as `Authorization: Bearer ...` |+| `PINCHTAB_CONFIG` | Override the config file path | Prefer this over ad hoc env overrides when automating |+| `PINCHTAB_BIND` | Override bind address for the main server | Operator-level knob; avoid exposing beyond localhost without a token |+| `PINCHTAB_PORT` | Override the main server port | Main server only, not per-instance targeting |+| `PINCHTAB_ENGINE` | Select runtime engine when explicitly needed | Defaults to `chrome` |++## What is intentionally not listed++- Browser tuning should generally live in `config.json`, not in ad hoc env vars.+- Internal process wiring and inherited env passthrough are implementation details, not part of the skill contract.++## Recommended default++For most agent tasks, the only variables you need are:++```bash+PINCHTAB_URL=http://localhost:9867+PINCHTAB_TOKEN=...+```++Everything else should be handled through profiles, instances, and config.