本文へ移動
cccskills
無料GitHub で公開

gstack

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.

インストール方法を見る

含まれるファイル(79)

  • SKILL.md12.5 KB
  • .env.example171 B
  • .github/workflows/skill-docs.yml365 B
  • .gitignore127 B
  • ARCHITECTURE.md13.9 KB
  • bin/dev-setup1.9 KB
  • bin/dev-teardown946 B
  • bin/gstack-update-check3.0 KB
  • browse/bin/find-browse722 B
  • browse/SKILL.md9.3 KB
  • browse/SKILL.md.tmpl3.0 KB
  • browse/src/browser-manager.ts14.6 KB
  • browse/src/buffers.ts4.2 KB
  • browse/src/cli.ts10.7 KB
  • browse/src/commands.ts7.6 KB
  • browse/src/config.ts2.9 KB
  • browse/src/cookie-import-browser.ts15.3 KB
  • browse/src/cookie-picker-routes.ts7.5 KB
  • browse/src/cookie-picker-ui.ts16.4 KB
  • browse/src/find-browse.ts1.6 KB
  • browse/src/meta-commands.ts7.5 KB
  • browse/src/read-commands.ts10.4 KB
  • browse/src/server.ts13.3 KB
  • browse/src/snapshot.ts14.7 KB
  • browse/src/write-commands.ts11.2 KB
  • browse/test/commands.test.ts57.5 KB
  • browse/test/config.test.ts4.9 KB
  • browse/test/cookie-import-browser.test.ts16.1 KB
  • browse/test/cookie-picker-routes.test.ts7.4 KB
  • browse/test/find-browse.test.ts782 B
  • browse/test/fixtures/basic.html914 B
  • browse/test/fixtures/cursor-interactive.html883 B
  • browse/test/fixtures/dialog.html603 B
  • browse/test/fixtures/empty.html43 B
  • browse/test/fixtures/forms.html1.8 KB
  • browse/test/fixtures/responsive.html1.4 KB
  • browse/test/fixtures/snapshot.html1.5 KB
  • browse/test/fixtures/spa.html638 B
  • browse/test/fixtures/states.html567 B
  • browse/test/fixtures/upload.html849 B
  • browse/test/gstack-update-check.test.ts7.7 KB
  • browse/test/snapshot.test.ts17.6 KB
  • browse/test/test-server.ts1.7 KB
  • BROWSER.md13.8 KB
  • CHANGELOG.md14.0 KB
  • conductor.json87 B
  • CONTRIBUTING.md10.2 KB
  • gstack-upgrade/SKILL.md3.1 KB
  • LICENSE1.0 KB
  • package.json1.6 KB
  • plan-ceo-review/SKILL.md33.3 KB
  • plan-eng-review/SKILL.md12.8 KB
  • qa/references/issue-taxonomy.md3.5 KB
  • qa/SKILL.md13.2 KB
  • qa/SKILL.md.tmpl12.0 KB
  • qa/templates/qa-report-template.md1.7 KB
  • README.md29.2 KB
  • retro/SKILL.md18.7 KB
  • review/checklist.md6.7 KB
  • review/greptile-triage.md4.3 KB
  • review/SKILL.md5.2 KB
  • scripts/dev-skill.ts2.4 KB
  • scripts/gen-skill-docs.ts7.6 KB
  • scripts/skill-check.ts3.7 KB
  • setup2.8 KB
  • setup-browser-cookies/SKILL.md3.2 KB
  • setup-browser-cookies/SKILL.md.tmpl2.0 KB
  • ship/SKILL.md14.4 KB
  • SKILL.md.tmpl6.1 KB
  • test/gen-skill-docs.test.ts6.2 KB
  • test/helpers/session-runner.ts5.0 KB
  • test/helpers/skill-parser.ts3.4 KB
  • test/skill-e2e.test.ts6.2 KB
  • test/skill-llm-eval.test.ts8.2 KB
  • test/skill-parser.test.ts5.3 KB
  • test/skill-validation.test.ts5.9 KB
  • TODO.md6.9 KB
  • TODOS.md1.8 KB
  • VERSION6 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->

Update Check (run first)

_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true

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.

gstack browse: QA Testing & Dogfooding

Persistent headless Chromium. First call auto-starts (~3s), then ~100-200ms per command. Auto-shuts down after 30 min idle. State persists between calls (cookies, tabs, sessions).

SETUP (run this check BEFORE any browse command)

_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
B=""
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/gstack/browse/dist/browse"
[ -z "$B" ] && B=~/.claude/skills/gstack/browse/dist/browse
if [ -x "$B" ]; then
  echo "READY: $B"
else
  echo "NEEDS_SETUP"
fi

If NEEDS_SETUP:

  1. Tell the user: "gstack browse needs a one-time build (~10 seconds). OK to proceed?" Then STOP and wait.
  2. Run: cd <SKILL_DIR> && ./setup
  3. If bun is not installed: curl -fsSL https://bun.sh/install | bash

IMPORTANT

  • Use the compiled binary via Bash: $B <command>
  • NEVER use mcp__claude-in-chrome__* tools. They are slow and unreliable.
  • Browser persists between calls — cookies, login sessions, and tabs carry over.
  • Dialogs (alert/confirm/prompt) are auto-accepted by default — no browser lockup.

QA Workflows

Test a user flow (login, signup, checkout, etc.)

# 1. Go to the page
$B goto https://app.example.com/login

# 2. See what's interactive
$B snapshot -i

# 3. Fill the form using refs
$B fill @e3 "test@example.com"
$B fill @e4 "password123"
$B click @e5

# 4. Verify it worked
$B snapshot -D              # diff shows what changed after clicking
$B is visible ".dashboard"  # assert the dashboard appeared
$B screenshot /tmp/after-login.png

Verify a deployment / check prod

$B goto https://yourapp.com
$B text                          # read the page — does it load?
$B console                       # any JS errors?
$B network                       # any failed requests?
$B js "document.title"           # correct title?
$B is visible ".hero-section"    # key elements present?
$B screenshot /tmp/prod-check.png

Dogfood a feature end-to-end

# Navigate to the feature
$B goto https://app.example.com/new-feature

# Take annotated screenshot — shows every interactive element with labels
$B snapshot -i -a -o /tmp/feature-annotated.png

# Find ALL clickable things (including divs with cursor:pointer)
$B snapshot -C

# Walk through the flow
$B snapshot -i          # baseline
$B click @e3            # interact
$B snapshot -D          # what changed? (unified diff)

# Check element states
$B is visible ".success-toast"
$B is enabled "#next-step-btn"
$B is checked "#agree-checkbox"

# Check console for errors after interactions
$B console

Test responsive layouts

# Quick: 3 screenshots at mobile/tablet/desktop
$B goto https://yourapp.com
$B responsive /tmp/layout

# Manual: specific viewport
$B viewport 375x812     # iPhone
$B screenshot /tmp/mobile.png
$B viewport 1440x900    # Desktop
$B screenshot /tmp/desktop.png

Test file upload

$B goto https://app.example.com/upload
$B snapshot -i
$B upload @e3 /path/to/test-file.pdf
$B is visible ".upload-success"
$B screenshot /tmp/upload-result.png

Test forms with validation

$B goto https://app.example.com/form
$B snapshot -i

# Submit empty — check validation errors appear
$B click @e10                        # submit button
$B snapshot -D                       # diff shows error messages appeared
$B is visible ".error-message"

# Fill and resubmit
$B fill @e3 "valid input"
$B click @e10
$B snapshot -D                       # diff shows errors gone, success state

Test dialogs (delete confirmations, prompts)

# Set up dialog handling BEFORE triggering
$B dialog-accept              # will auto-accept next alert/confirm
$B click "#delete-button"     # triggers confirmation dialog
$B dialog                     # see what dialog appeared
$B snapshot -D                # verify the item was deleted

# For prompts that need input
$B dialog-accept "my answer"  # accept with text
$B click "#rename-button"     # triggers prompt

Test authenticated pages (import real browser cookies)

# Import cookies from your real browser (opens interactive picker)
$B cookie-import-browser

# Or import a specific domain directly
$B cookie-import-browser comet --domain .github.com

# Now test authenticated pages
$B goto https://github.com/settings/profile
$B snapshot -i
$B screenshot /tmp/github-profile.png

Compare two pages / environments

$B diff https://staging.app.com https://prod.app.com

Multi-step chain (efficient for long flows)

echo '[
  ["goto","https://app.example.com"],
  ["snapshot","-i"],
  ["fill","@e3","test@test.com"],
  ["fill","@e4","password"],
  ["click","@e5"],
  ["snapshot","-D"],
  ["screenshot","/tmp/result.png"]
]' | $B chain

Quick Assertion Patterns

# Element exists and is visible
$B is visible ".modal"

# Button is enabled/disabled
$B is enabled "#submit-btn"
$B is disabled "#submit-btn"

# Checkbox state
$B is checked "#agree"

# Input is editable
$B is editable "#name-field"

# Element has focus
$B is focused "#search-input"

# Page contains text
$B js "document.body.textContent.includes('Success')"

# Element count
$B js "document.querySelectorAll('.list-item').length"

# Specific attribute value
$B attrs "#logo"    # returns all attributes as JSON

# CSS property
$B css ".button" "background-color"

Snapshot System

The snapshot is your primary tool for understanding and interacting with pages.

-i        --interactive           Interactive elements only (buttons, links, inputs) with @e refs
-c        --compact               Compact (no empty structural nodes)
-d <N>    --depth                 Limit tree depth (0 = root only, default: unlimited)
-s <sel>  --selector              Scope to CSS selector
-D        --diff                  Unified diff against previous snapshot (first call stores baseline)
-a        --annotate              Annotated screenshot with red overlay boxes and ref labels
-o <path> --output                Output path for annotated screenshot (default: /tmp/browse-annotated.png)
-C        --cursor-interactive    Cursor-interactive elements (@c refs — divs with pointer, onclick)

All flags can be combined freely. -o only applies when -a is also used. Example: $B snapshot -i -a -C -o /tmp/annotated.png

Ref numbering: @e refs are assigned sequentially (@e1, @e2, ...) in tree order. @c refs from -C are numbered separately (@c1, @c2, ...).

After snapshot, use @refs as selectors in any command:

$B click @e3       $B fill @e4 "value"     $B hover @e1
$B html @e2        $B css @e5 "color"      $B attrs @e6
$B click @c1       # cursor-interactive ref (from -C)

Output format: indented accessibility tree with @ref IDs, one element per line.

  @e1 [heading] "Welcome" [level=1]
  @e2 [textbox] "Email"
  @e3 [button] "Submit"

Refs are invalidated on navigation — run snapshot again after goto.

Command Reference

Navigation

CommandDescription
backHistory back
forwardHistory forward
goto <url>Navigate to URL
reloadReload page
urlPrint current URL

Reading

CommandDescription
accessibilityFull ARIA tree
formsForm fields as JSON
html [selector]innerHTML of selector (throws if not found), or full page HTML if no selector given
linksAll links as "text → href"
textCleaned page text

Interaction

CommandDescription
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-dismissAuto-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

CommandDescription
`attrs <sel@ref>`
`console [--clear--errors]`
cookiesAll 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
perfPage load timings
storage [set k v]Read all localStorage + sessionStorage as JSON, or set <key> <value> to write localStorage

Visual

CommandDescription
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

CommandDescription
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

CommandDescription
chainRun commands from JSON stdin. Format: [["cmd","arg1",...],...]

Tabs

CommandDescription
closetab [id]Close tab
newtab [url]Open new tab
tab <id>Switch to tab
tabsList open tabs

Server

CommandDescription
restartRestart server
statusHealth check
stopShutdown server

Tips

  1. Navigate once, query many times. goto loads the page; then text, js, screenshot all hit the loaded page instantly.
  2. Use snapshot -i first. See all interactive elements, then click/fill by ref. No CSS selector guessing.
  3. Use snapshot -D to verify. Baseline → action → diff. See exactly what changed.
  4. Use is for assertions. is visible .modal is faster and more reliable than parsing page text.
  5. Use snapshot -a for evidence. Annotated screenshots are great for bug reports.
  6. Use snapshot -C for tricky UIs. Finds clickable divs that the accessibility tree misses.
  7. Check console after actions. Catch JS errors that don't surface visually.
  8. Use chain for long flows. Single command, no per-step CLI overhead.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

2d-games

無料

2D game development principles. Sprites, tilemaps, physics, camera.

日本語の概要は準備中です。原文の説明を表示しています。

umairinayat/Specter-AI182026年9月29日 更新

3d-games

無料

3D game development principles. Rendering, shaders, physics, cameras.

日本語の概要は準備中です。原文の説明を表示しています。

umairinayat/Specter-AI182026年9月29日 更新

API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.

日本語の概要は準備中です。原文の説明を表示しています。

umairinayat/Specter-AI182026年9月29日 更新

Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.

日本語の概要は準備中です。原文の説明を表示しています。

umairinayat/Specter-AI182026年9月29日 更新

Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.

日本語の概要は準備中です。原文の説明を表示しています。

umairinayat/Specter-AI182026年9月29日 更新

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

日本語の概要は準備中です。原文の説明を表示しています。

umairinayat/Specter-AI182026年9月29日 更新

umairinayat のスキルをすべて見る

このスキルの問題を報告する