Provides development commands, architecture overview, and PR workflow for the PinchTab browser control server (Go + React dashboard). Use when contributing to the PinchTab project.
Ships in pinchtab-pinchtab. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
PinchTab is a browser control server for AI agents — Small Go binary with HTTP API.
Run everything from the repository root (a clone of github.com/pinchtab/pinchtab).
All development commands run via ./dev:
| Command | Description |
|---|---|
./dev build | Build the application |
./dev dev | Build & run |
./dev dashboard | Hot-reload dashboard development (Vite + Go) |
./dev run | Run the application |
./dev check | All checks (Go + Dashboard + Plugin) |
./dev check go | Go checks only |
./dev check dashboard | Dashboard checks only |
./dev test unit | Go unit tests |
./dev test dashboard | Dashboard unit tests |
./dev e2e basic | Basic suite (api + cli + infra) |
./dev e2e extended | Extended suite (all extended) |
./dev e2e smoke | Smoke suite |
./dev smoke | Host Docker smoke checks (--browser=chrome|cloak|all) |
./dev e2e test "<name>" | Run a single E2E test by start_test name |
./dev all | check + test + e2e extended (pre-push gate) |
./dev binaries | Build the full release binary matrix into dist/ |
./dev doctor | Setup dev environment |
cmd/pinchtab/ CLI entry point
internal/
bridge/ Chrome CDP communication
handlers/ HTTP API handlers
server/ HTTP server
dashboard/ Embedded React dashboard
config/ Configuration
routes/ API route catalogue
assets/ Embedded assets (stealth.js)
dashboard/ React dashboard source (Vite + TypeScript)
tests/e2e/ E2E runner, fixtures, scenarios/{api,cli,infra,plugin}/
Create branch from main:
git checkout main && git pull
git checkout -b feat/my-feature # or fix/my-bug
Make changes — follow code patterns in existing files
Run checks locally:
./dev all # check + test + e2e (one-shot pre-push gate)
# …or individually:
./dev check # Lint + format + typecheck
./dev test unit # Go unit tests
./dev e2e basic # E2E tests (Docker required)
Commit with conventional commits, usually scoped — fix(extract): … (PIN-394):
feat: new featurefix: bug fixrefactor: code change without behavior changetest: adding testsdocs: documentationchore: maintenancePush and create PR
%w, no silent failures./dev e2e basic (or ./dev all for the full chain)npm pack and npm install work| File | Purpose |
|---|---|
internal/assets/stealth.js | Bot detection evasion (light/medium/full levels) |
internal/bridge/bridge.go | Chrome CDP bridge |
internal/handlers/*.go | HTTP API endpoints |
dashboard/src/ | React dashboard source |
internal/routes/routes.go | API route catalogue |
tests/e2e/scenarios/api/ | API E2E tests |
tests/e2e/scenarios/cli/ | CLI E2E tests |
./dev test unit # All Go tests
go test ./internal/handlers # Specific package
./dev e2e basic # Basic suite (api + cli + infra)
./dev e2e api # API basic tests
./dev e2e cli # CLI basic tests
./dev e2e infra # Infra basic tests
./dev e2e api-extended # API extended tests (multi-instance)
./dev e2e cli-extended # CLI extended tests
./dev e2e infra-extended # Infra extended tests (multi-instance)
./dev e2e extended # Full extended suite (all extended tests)
./dev smoke # Host Docker smoke checks (not an e2e suite)
# Run specific test file(s) with filter (second argument)
./dev e2e api clipboard # Run only clipboard-basic.sh
./dev e2e api-extended tabs # Run tabs-extended.sh
./dev e2e cli browser # Run browser-basic.sh in CLI suite
# Run a single test by its start_test name (fastest debug loop)
./dev e2e test "click with humanize: click input by ref"
./dev e2e test "scroll (down)"
./dev e2e test "low-level mouse"
The scenario filter is one plain substring (no regex, no |) matched against scenario file names, groups, tiers, helpers and tags. Requires Docker daemon running.
dev e2e test "<name>")Use this when iterating on one specific E2E failure. The runner:
tests/e2e/scenarios/**/*.sh for start_test "...<name substring>...".api/cli/infra/plugin) and -extended variant (or smoke for *-smoke.sh) from the matching scenario file's path.compose build, then up) and runs, inside that scenario file, only the start_test...end_test blocks whose name contains the substring — the scenario preamble (helper sourcing, FIXTURES_URL, etc.) is preserved, every other test in the file is skipped.Notes:
go run ./tests/tools/runner e2e --suite <suite> --filter <stem>.scripts/dev-e2e.sh → go run ./tests/tools/runner e2e --suite … --filter <stem> --test "<name>", which passes E2E_TEST_FILTER to tests/e2e/run.sh../dev test dashboard # Vitest
cd dashboard && npm test
Start hot-reload development:
./dev dashboard
This runs:
:9867:5173 with hot-reloadhttp://localhost:5173/dashboard/Do not assume changes worked. Use pinchtab itself to verify changes visually:
Start dev mode:
./dev dashboard
Make changes to files in dashboard/src/
Verify with pinchtab — use the pinchtab skill to inspect the dashboard:
# ./dev dashboard runs the backend with token "dev"
# Navigate to the page under development
curl -X POST http://localhost:9867/navigate -H "Authorization: Bearer dev" \
-d '{"url":"http://localhost:5173/dashboard/settings"}'
# Take a screenshot (written under the state dir; response carries "path")
curl -H "Authorization: Bearer dev" "http://localhost:9867/screenshot?output=file"
# Or get a snapshot to inspect elements
curl -s -H "Authorization: Bearer dev" http://localhost:9867/snapshot | jq .
Provide evidence — when reporting changes, include:
http://localhost:5173/dashboard/{page}# Navigate to settings
curl -X POST http://localhost:9867/navigate -H "Authorization: Bearer dev" \
-d '{"url":"http://localhost:5173/dashboard/settings"}'
# Screenshot the result (beyondViewport=true captures the full page)
curl -H "Authorization: Bearer dev" \
"http://localhost:9867/screenshot?output=file&beyondViewport=true"
# Find an element by description (semantic match, not a CSS selector)
curl -X POST http://localhost:9867/find -H "Authorization: Bearer dev" \
-d '{"query":"stealth level setting"}'
| Page | URL | Purpose |
|---|---|---|
| Monitoring | /dashboard/monitoring | Instance overview (/dashboard/ redirects here) |
| Activity | /dashboard/activity | Activity log |
| Profiles | /dashboard/profiles | Browser profiles |
| Agents | /dashboard/agents | Agents |
| Settings | /dashboard/settings | Configuration |
The stealth module (internal/assets/stealth.js) has three levels:
| Level | Features | Trade-offs |
|---|---|---|
light | webdriver, CDP markers, plugins, hardware | None — safe |
medium | + userAgentData, chrome.runtime.connect, puppeteer/playwright marker cleanup | May affect error monitoring, extension messaging |
full | + screen/window realism, headless-only WebGL vendor/renderer spoofing (canvas/audio/WebRTC stay native) | May break graphics-dependent sites in headless mode |
Configure in ~/.pinchtab/config.json:
{
"instanceDefaults": {
"stealthLevel": "medium"
}
}
internal/handlers/internal/routes/routes.go and bind it in the routeBinding table in internal/handlers/handlers.gotests/e2e/scenarios/api/internal/assets/stealth.js./dev build (embeds via go:embed)./dev e2e infra stealth (infra scenarios matching stealth; infra-extended stealth for the extended ones)./dev dashboard for hot-reloaddashboard/src/./dev check dashboard before commitWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Go, React, TypeScript, Vite, Docker
pinchtab, go-development, browser-control, e2e-testing, react-dashboard
/pinchtab-pinchtab:pinchtab-devfrom pinchtab-pinchtab
pinchtab-pinchtab@cascade-productivity is listed by joshuarweaver/cascade-productivity — review the source before installing
npx claudepluginhub joshuarweaver/cascade-productivity --plugin pinchtab-pinchtab5 skills in this plugin
/pinchtabUse 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, reuse a dedicated automation profile with user approval, 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`./pinchtab-mcpUse this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools./pinchtab-optRun the PinchTab optimization loop (Docker, 3 blind subagents on the runner's HIGH model, 108 steps across 47 groups) against chrome, cloak, ghost-chrome, or all three providers. Pass `setup` (optionally followed by a provider or `all`) to run only the setup test (native binary, single subagent forced to the runner's LOW model) that validates the fresh-install OOTB flow per provider. Use when asked to 'run optimization', 'run the opt loop', 'benchmark the agent', '/pinchtab-opt', '/pinchtab-opt cloak', '/pinchtab-opt ghost-chrome', '/pinchtab-opt setup', '/pinchtab-opt setup all', or 'test pinchtab agent'./pinchtab-stealth-scoreRun the PinchTab stealth-score sweep against 15 bot-detection / fingerprint sites (sannysoft, rebrowser, deviceandbrowserinfo, iphey, whoer, browserscan, pixelscan, fingerprint-scan, incolumitas, fvision, amiunique, browserleaks, creepjs, coveryourtracks, fingerprint-demo). Starts a Docker PinchTab container per browser (chrome / cloak / both), spawns a blind agent that drives PinchTab through plain-English per-site playbooks, captures structured metrics, prints a side-by-side comparison highlighting divergent metrics, and appends to history.jsonl for cross-session tracking. Use when asked to 'run stealth score', 'compare cloak vs chrome detection', 'measure stealth', or '/pinchtab-stealth-score'.Other plugins' skills for the same job