* fix: replace find-browse with direct path in SKILL.md setup blocks
Agents were skipping the find-browse binary and guessing bin/browse
(wrong path). Now the setup block explicitly checks browse/dist/browse
with workspace-local priority, global fallback.
Also adds || true to update check to prevent misleading exit code 1.
Adds {{UPDATE_CHECK}} and {{BROWSE_SETUP}} template placeholders to
gen-skill-docs.ts so all skills share a single source of truth.
* refactor: convert qa/ and setup-browser-cookies/ to .tmpl templates
Replaces hardcoded update check and find-browse blocks with
{{UPDATE_CHECK}} and {{BROWSE_SETUP}} placeholders. Both skills
are now generated from templates via gen-skill-docs.
* test: add e2e and LLM eval tests for SKILL.md setup block
- 3 Agent SDK e2e tests: happy path, NEEDS_SETUP, non-git-repo
- LLM eval: setup block clarity + actionability >= 4
- New error pattern: 'no such file or directory.*browse'
These tests catch the exact failure mode where agents can't discover
the browse binary via SKILL.md instructions.
* chore: bump version and changelog (v0.3.5)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Fast headless browser for QA testing and site dogfooding. Navigate any URL, interact with
elements, verify page state, diff before/after actions, take annotated screenshots, check
responsive layouts, test forms and uploads, handle dialogs, and assert element states.
~100ms per command. Use when you need to test a feature, verify a deployment, dogfood a
user flow, or file a bug with evidence.
If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/gstack/gstack-upgrade/SKILL.md and follow the "Inline upgrade flow" (AskUserQuestion → upgrade if yes, touch ~/.gstack/last-update-check if no). If JUST_UPGRADED <from> <to>: tell user "Running gstack v{to} (just updated!)" and continue.
browse: QA Testing & Dogfooding
Persistent headless Chromium. First call auto-starts (~3s), then ~100ms per command.
State persists between calls (cookies, tabs, login sessions).
Tell the user: "gstack browse needs a one-time build (~10 seconds). OK to proceed?" Then STOP and wait.
Run: cd <SKILL_DIR> && ./setup
If bun is not installed: curl -fsSL https://bun.sh/install | bash
Core QA Patterns
1. Verify a page loads correctly
$B goto https://yourapp.com
$B text # content loads?$B console # JS errors?$B network # failed requests?$B is visible ".main-content"# key elements present?
2. Test a user flow
$B goto https://app.com/login
$B snapshot -i # see all interactive elements$B fill @e3 "user@test.com"$B fill @e4 "password"$B click @e5 # submit$B snapshot -D # diff: what changed after submit?$B is visible ".dashboard"# success state present?
3. Verify an action worked
$B snapshot # baseline$B click @e3 # do something$B snapshot -D # unified diff shows exactly what changed
5. Find all clickable elements (including non-ARIA)
$B snapshot -C # finds divs with cursor:pointer, onclick, tabindex$B click @c1 # interact with them
6. Assert element states
$B is visible ".modal"$B is enabled "#submit-btn"$B is disabled "#submit-btn"$B is checked "#agree-checkbox"$B is editable "#name-field"$B is focused "#search-input"$B js "document.body.textContent.includes('Success')"
7. Test responsive layouts
$B responsive /tmp/layout # mobile + tablet + desktop screenshots$B viewport 375x812 # or set specific viewport$B screenshot /tmp/mobile.png
8. Test file uploads
$B upload "#file-input" /path/to/file.pdf
$B is visible ".upload-success"
9. Test dialogs
$B dialog-accept "yes"# set up handler$B click "#delete-button"# trigger dialog$B dialog # see what appeared$B snapshot -D # verify deletion happened
Refs are invalidated on navigation — run snapshot again after goto.
Full Command List
Navigation
Command
Description
back
History back
forward
History forward
goto <url>
Navigate to URL
reload
Reload page
url
Print current URL
Reading
Command
Description
accessibility
Full ARIA tree
forms
Form fields as JSON
html [selector]
innerHTML of selector (throws if not found), or full page HTML if no selector given
links
All links as "text → href"
text
Cleaned page text
Interaction
Command
Description
click <sel>
Click element
cookie <name>=<value>
Set cookie on current page domain
cookie-import <json>
Import cookies from JSON file
cookie-import-browser [browser] [--domain d]
Import cookies from Comet, Chrome, Arc, Brave, or Edge (opens picker, or use --domain for direct import)
dialog-accept [text]
Auto-accept next alert/confirm/prompt. Optional text is sent as the prompt response
dialog-dismiss
Auto-dismiss next dialog
fill <sel> <val>
Fill input
header <name>:<value>
Set custom request header (colon-separated, sensitive values auto-redacted)
hover <sel>
Hover element
press <key>
Press key — Enter, Tab, Escape, ArrowUp/Down/Left/Right, Backspace, Delete, Home, End, PageUp, PageDown, or modifiers like Shift+Enter
scroll [sel]
Scroll element into view, or scroll to page bottom if no selector
select <sel> <val>
Select dropdown option by value, label, or visible text
type <text>
Type into focused element
upload <sel> <file> [file2...]
Upload file(s)
useragent <string>
Set user agent
viewport <WxH>
Set viewport size
`wait <sel
--networkidle
Inspection
Command
Description
`attrs <sel
@ref>`
`console [--clear
--errors]`
cookies
All cookies as JSON
css <sel> <prop>
Computed CSS value
dialog [--clear]
Dialog messages
eval <file>
Run JavaScript from file and return result as string (path must be under /tmp or cwd)
is <prop> <sel>
State check (visible/hidden/enabled/disabled/checked/editable/focused)
js <expr>
Run JavaScript expression and return result as string
network [--clear]
Network requests
perf
Page load timings
storage [set k v]
Read all localStorage + sessionStorage as JSON, or set to write localStorage
Visual
Command
Description
diff <url1> <url2>
Text diff between pages
pdf [path]
Save as PDF
responsive [prefix]
Screenshots at mobile (375x812), tablet (768x1024), desktop (1280x720). Saves as {prefix}-mobile.png etc.
screenshot [path]
Save screenshot
Snapshot
Command
Description
snapshot [flags]
Accessibility tree with @e refs for element selection. Flags: -i interactive only, -c compact, -d N depth limit, -s sel scope, -D diff vs previous, -a annotated screenshot, -o path output, -C cursor-interactive @c refs
Meta
Command
Description
chain
Run commands from JSON stdin. Format: [["cmd","arg1",...],...]