From pinchtab-pinchtab
Develops and contributes to PinchTab Go browser control server with React dashboard. Runs dev commands, unit/E2E tests, git workflow, checks, and PR checklists.
npx claudepluginhub joshuarweaver/cascade-productivity --plugin pinchtab-pinchtabThis skill uses the workspace's default tool permissions.
PinchTab is a browser control server for AI agents — Small Go binary with HTTP API.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
PinchTab is a browser control server for AI agents — Small Go binary with HTTP API.
cd ~/dev/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) |
./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 pr | PR suite (api + cli + infra) |
./dev e2e release | Release suite (all extended) |
./dev e2e docker | Build local image and Docker smoke test |
./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
assets/ Embedded assets (stealth.js)
dashboard/ React dashboard source (Vite + TypeScript)
tests/e2e/ E2E test suites
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 check # Lint + format + typecheck
./dev test unit # Go unit tests
./dev e2e pr # E2E tests (Docker required)
Commit with conventional commits:
feat: new featurefix: bug fixrefactor: code change without behavior changetest: adding testsdocs: documentationchore: maintenancePush and create PR
%w, no silent failures./dev e2e prnpm 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 |
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 pr # PR suite (api + cli + infra basic tests)
./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 release # Full release suite (all extended tests)
./dev e2e docker # Docker smoke test only
# Run specific test file(s) with filter (second argument)
./dev e2e api clipboard # Run only clipboard-basic.sh
./dev e2e api-extended "clipboard|console" # Run clipboard and console tests
./dev e2e cli browser # Run browser-basic.sh in CLI suite
The filter is a regex pattern matched against scenario filenames. Requires Docker daemon running.
./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:
# Navigate to the page under development
curl -X POST http://localhost:9867/navigate \
-d '{"url":"http://localhost:5173/dashboard/settings"}'
# Take a screenshot to verify the change
curl -X POST http://localhost:9867/screenshot \
-d '{"path":"/tmp/dashboard-check.png"}'
# Or get a snapshot to inspect elements
curl -s 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 \
-d '{"url":"http://localhost:5173/dashboard/settings"}'
# Screenshot the result
curl -X POST http://localhost:9867/screenshot \
-d '{"path":"./dashboard-settings.png","fullPage":true}'
# Find specific element
curl -X POST http://localhost:9867/find \
-d '{"selector":"[data-testid=stealth-level]"}'
| Page | URL | Purpose |
|---|---|---|
| Home | /dashboard/ | Instance overview |
| Settings | /dashboard/settings | Configuration |
| Profiles | /dashboard/profiles | Browser profiles |
| Tabs | /dashboard/tabs | Active tabs |
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, csi/loadTimes | May affect error monitoring |
full | + WebGL/canvas noise, WebRTC relay | May break WebRTC, canvas apps |
Configure in ~/.pinchtab/config.json:
{
"instanceDefaults": {
"stealthLevel": "medium"
}
}
internal/handlers/internal/server/routes.gotests/e2e/scenarios-api/internal/assets/stealth.js./dev build (embeds via go:embed)./dev e2e api-fast (includes stealth tests)./dev dashboard for hot-reloaddashboard/src/./dev check dashboard before commit