~cytrogen/gstack

ref: 1b60acd5768e37509e7dc09357cd2ca7567b6135 gstack/connect-chrome/SKILL.md.tmpl -rw-r--r-- 4.5 KiB
1b60acd5 — Garry Tan fix: Codex hang fixes — plan visibility, stdout buffering, reasoning effort (v0.12.4.0) (#536) 14 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
name: connect-chrome
version: 0.1.0
description: |
  Launch real Chrome controlled by gstack with the Side Panel extension auto-loaded.
  One command: connects Claude to a visible Chrome window where you can watch every
  action in real time. The extension shows a live activity feed in the Side Panel.
  Use when asked to "connect chrome", "open chrome", "real browser", "launch chrome",
  "side panel", or "control my browser".
allowed-tools:
  - Bash
  - Read
  - AskUserQuestion

---

{{PREAMBLE}}

# /connect-chrome — Launch Real Chrome with Side Panel

Connect Claude to a visible Chrome window with the gstack extension auto-loaded.
You see every click, every navigation, every action in real time.

{{BROWSE_SETUP}}

## Step 1: Connect

```bash
$B connect
```

This launches your system Chrome via Playwright with:
- A visible window (headed mode, not headless)
- The gstack Chrome extension pre-loaded
- A green shimmer line + "gstack" pill so you know which window is controlled

If Chrome is already running, the server restarts in headed mode with a fresh
Chrome instance. Your regular Chrome stays untouched.

After connecting, print the output to the user.

## Step 2: Verify

```bash
$B status
```

Confirm the output shows `Mode: cdp`. Print the port number — the user may need
it for the Side Panel.

## Step 3: Guide the user to the Side Panel

Use AskUserQuestion:

> Chrome is launched with gstack control. You should see a green shimmer line at the
> top of the Chrome window and a small "gstack" pill in the bottom-right corner.
>
> The Side Panel extension is pre-loaded. To open it:
> 1. Look for the **puzzle piece icon** (Extensions) in Chrome's toolbar
> 2. Click it → find **gstack browse** → click the **pin icon** to pin it
> 3. Click the **gstack icon** in the toolbar
> 4. Click **Open Side Panel**
>
> The Side Panel shows a live feed of every browse command in real time.
>
> **Port:** The browse server is on port {PORT} — the extension auto-detects it
> if you're using the Playwright-controlled Chrome. If the badge stays gray, click
> the gstack icon and enter port {PORT} manually.

Options:
- A) I can see the Side Panel — let's go!
- B) I can see Chrome but can't find the extension
- C) Something went wrong

If B: Tell the user:
> The extension should be auto-loaded, but Chrome sometimes doesn't show it
> immediately. Try:
> 1. Type `chrome://extensions` in the address bar
> 2. Look for "gstack browse" — it should be listed and enabled
> 3. If not listed, click "Load unpacked" → navigate to the extension folder
>    (press Cmd+Shift+G in the file picker, paste this path):
>    `{EXTENSION_PATH}`
>
> Then pin it from the puzzle piece icon and open the Side Panel.

If C: Run `$B status` and show the output. Check if the server is healthy.

## Step 4: Demo

After the user confirms the Side Panel is working, run a quick demo so they
can see the activity feed in action:

```bash
$B goto https://news.ycombinator.com
```

Wait 2 seconds, then:

```bash
$B snapshot -i
```

Tell the user: "Check the Side Panel — you should see the `goto` and `snapshot`
commands appear in the activity feed. Every command Claude runs will show up here
in real time."

## Step 5: Sidebar chat

After the activity feed demo, tell the user about the sidebar chat:

> The Side Panel also has a **chat tab**. Try typing a message like "take a
> snapshot and describe this page." A child Claude instance will execute your
> request in the browser — you'll see the commands appear in the activity feed.
>
> The sidebar agent can navigate pages, click buttons, fill forms, and read
> content. Each task gets up to 5 minutes. It runs in an isolated session, so
> it won't interfere with this Claude Code window.

## Step 6: What's next

Tell the user:

> You're all set! Chrome is under Claude's control with the Side Panel showing
> live activity and a chat sidebar for direct commands. Here's what you can do:
>
> - **Chat in the sidebar** — type natural language instructions and Claude
>   executes them in the browser
> - **Run any browse command** — `$B goto`, `$B click`, `$B snapshot` — and
>   watch it happen in Chrome + the Side Panel
> - **Use /qa or /design-review** — they'll run in the visible Chrome window
>   instead of headless. No cookie import needed.
> - **`$B focus`** — bring Chrome to the foreground anytime
> - **`$B disconnect`** — return to headless mode when done

Then proceed with whatever the user asked to do. If they didn't specify a task,
ask what they'd like to test or browse.