diff --git a/.agents/skills/gstack-browse/SKILL.md b/.agents/skills/gstack-browse/SKILL.md index db405e47b..8649aef91 100644 --- a/.agents/skills/gstack-browse/SKILL.md +++ b/.agents/skills/gstack-browse/SKILL.md @@ -469,6 +469,9 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`. ### Server | Command | Description | |---------|-------------| +| `connect [browser] [--port N]` | Connect to real Chrome/Comet browser via CDP | +| `disconnect` | Disconnect from real browser, return to headless mode | +| `focus [@ref]` | Bring connected browser window to foreground (macOS) | | `handoff [message]` | Open visible Chrome at current page for user takeover | | `restart` | Restart server | | `resume` | Re-snapshot after user takeover, return control to AI | diff --git a/.agents/skills/gstack-design-review/SKILL.md b/.agents/skills/gstack-design-review/SKILL.md index 2a7d26b23..affdc2161 100644 --- a/.agents/skills/gstack-design-review/SKILL.md +++ b/.agents/skills/gstack-design-review/SKILL.md @@ -235,6 +235,12 @@ You are a senior product designer AND a frontend engineer. Review live sites wit **If no URL is given and you're on main/master:** Ask the user for a URL. +**CDP mode detection:** Check if browse is connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: skip cookie import steps — the real browser already has cookies and auth sessions. Skip headless detection workarounds. + **Check for DESIGN.md:** Look for `DESIGN.md`, `design-system.md`, or similar in the repo root. If found, read it — all design decisions must be calibrated against it. Deviations from the project's stated design system are higher severity. If not found, use universal design principles and offer to create one from the inferred system. diff --git a/.agents/skills/gstack-qa/SKILL.md b/.agents/skills/gstack-qa/SKILL.md index 0617c447a..205acc6a1 100644 --- a/.agents/skills/gstack-qa/SKILL.md +++ b/.agents/skills/gstack-qa/SKILL.md @@ -260,6 +260,12 @@ You are a QA engineer AND a bug-fix engineer. Test web applications like a real **If no URL is given and you're on a feature branch:** Automatically enter **diff-aware mode** (see Modes below). This is the most common case — the user just shipped code on a branch and wants to verify it works. +**CDP mode detection:** Before starting, check if the browse server is connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: skip cookie import prompts (the real browser already has cookies), skip user-agent overrides (real browser has real user-agent), and skip headless detection workarounds. The user's real auth sessions are already available. + **Check for clean working tree:** ```bash diff --git a/.agents/skills/gstack-setup-browser-cookies/SKILL.md b/.agents/skills/gstack-setup-browser-cookies/SKILL.md index 34f95391c..f05312351 100644 --- a/.agents/skills/gstack-setup-browser-cookies/SKILL.md +++ b/.agents/skills/gstack-setup-browser-cookies/SKILL.md @@ -217,6 +217,14 @@ never blocks the user. Import logged-in sessions from your real Chromium browser into the headless browse session. +## CDP mode check + +First, check if browse is already connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: tell the user "Not needed — you're connected to your real browser via CDP. Your cookies and sessions are already available." and stop. No cookie import needed. + ## How it works 1. Find the browse binary diff --git a/.agents/skills/gstack/SKILL.md b/.agents/skills/gstack/SKILL.md index 4bb9ba170..414fa2f37 100644 --- a/.agents/skills/gstack/SKILL.md +++ b/.agents/skills/gstack/SKILL.md @@ -597,6 +597,9 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`. ### Server | Command | Description | |---------|-------------| +| `connect [browser] [--port N]` | Connect to real Chrome/Comet browser via CDP | +| `disconnect` | Disconnect from real browser, return to headless mode | +| `focus [@ref]` | Bring connected browser window to foreground (macOS) | | `handoff [message]` | Open visible Chrome at current page for user takeover | | `restart` | Restart server | | `resume` | Re-snapshot after user takeover, return control to AI | diff --git a/SKILL.md b/SKILL.md index 46b7a558b..97bc51dde 100644 --- a/SKILL.md +++ b/SKILL.md @@ -603,6 +603,9 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`. ### Server | Command | Description | |---------|-------------| +| `connect [browser] [--port N]` | Connect to real Chrome/Comet browser via CDP | +| `disconnect` | Disconnect from real browser, return to headless mode | +| `focus [@ref]` | Bring connected browser window to foreground (macOS) | | `handoff [message]` | Open visible Chrome at current page for user takeover | | `restart` | Restart server | | `resume` | Re-snapshot after user takeover, return control to AI | diff --git a/browse/SKILL.md b/browse/SKILL.md index 2acf60b0e..ca0a0d431 100644 --- a/browse/SKILL.md +++ b/browse/SKILL.md @@ -475,6 +475,9 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`. ### Server | Command | Description | |---------|-------------| +| `connect [browser] [--port N]` | Connect to real Chrome/Comet browser via CDP | +| `disconnect` | Disconnect from real browser, return to headless mode | +| `focus [@ref]` | Bring connected browser window to foreground (macOS) | | `handoff [message]` | Open visible Chrome at current page for user takeover | | `restart` | Restart server | | `resume` | Re-snapshot after user takeover, return control to AI | diff --git a/design-review/SKILL.md b/design-review/SKILL.md index cbc0d5e87..5dc474fe8 100644 --- a/design-review/SKILL.md +++ b/design-review/SKILL.md @@ -245,6 +245,12 @@ You are a senior product designer AND a frontend engineer. Review live sites wit **If no URL is given and you're on main/master:** Ask the user for a URL. +**CDP mode detection:** Check if browse is connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: skip cookie import steps — the real browser already has cookies and auth sessions. Skip headless detection workarounds. + **Check for DESIGN.md:** Look for `DESIGN.md`, `design-system.md`, or similar in the repo root. If found, read it — all design decisions must be calibrated against it. Deviations from the project's stated design system are higher severity. If not found, use universal design principles and offer to create one from the inferred system. diff --git a/design-review/SKILL.md.tmpl b/design-review/SKILL.md.tmpl index 84119c268..3188df31e 100644 --- a/design-review/SKILL.md.tmpl +++ b/design-review/SKILL.md.tmpl @@ -41,6 +41,12 @@ You are a senior product designer AND a frontend engineer. Review live sites wit **If no URL is given and you're on main/master:** Ask the user for a URL. +**CDP mode detection:** Check if browse is connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: skip cookie import steps — the real browser already has cookies and auth sessions. Skip headless detection workarounds. + **Check for DESIGN.md:** Look for `DESIGN.md`, `design-system.md`, or similar in the repo root. If found, read it — all design decisions must be calibrated against it. Deviations from the project's stated design system are higher severity. If not found, use universal design principles and offer to create one from the inferred system. diff --git a/qa/SKILL.md b/qa/SKILL.md index 92799a0d0..342c3d3e4 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -270,6 +270,12 @@ You are a QA engineer AND a bug-fix engineer. Test web applications like a real **If no URL is given and you're on a feature branch:** Automatically enter **diff-aware mode** (see Modes below). This is the most common case — the user just shipped code on a branch and wants to verify it works. +**CDP mode detection:** Before starting, check if the browse server is connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: skip cookie import prompts (the real browser already has cookies), skip user-agent overrides (real browser has real user-agent), and skip headless detection workarounds. The user's real auth sessions are already available. + **Check for clean working tree:** ```bash diff --git a/qa/SKILL.md.tmpl b/qa/SKILL.md.tmpl index a3d02abcf..ac8d0a9e0 100644 --- a/qa/SKILL.md.tmpl +++ b/qa/SKILL.md.tmpl @@ -49,6 +49,12 @@ You are a QA engineer AND a bug-fix engineer. Test web applications like a real **If no URL is given and you're on a feature branch:** Automatically enter **diff-aware mode** (see Modes below). This is the most common case — the user just shipped code on a branch and wants to verify it works. +**CDP mode detection:** Before starting, check if the browse server is connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: skip cookie import prompts (the real browser already has cookies), skip user-agent overrides (real browser has real user-agent), and skip headless detection workarounds. The user's real auth sessions are already available. + **Check for clean working tree:** ```bash diff --git a/setup-browser-cookies/SKILL.md b/setup-browser-cookies/SKILL.md index ac2d873cb..facbefeb7 100644 --- a/setup-browser-cookies/SKILL.md +++ b/setup-browser-cookies/SKILL.md @@ -222,6 +222,14 @@ never blocks the user. Import logged-in sessions from your real Chromium browser into the headless browse session. +## CDP mode check + +First, check if browse is already connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: tell the user "Not needed — you're connected to your real browser via CDP. Your cookies and sessions are already available." and stop. No cookie import needed. + ## How it works 1. Find the browse binary diff --git a/setup-browser-cookies/SKILL.md.tmpl b/setup-browser-cookies/SKILL.md.tmpl index 4496d11c5..78cae80b9 100644 --- a/setup-browser-cookies/SKILL.md.tmpl +++ b/setup-browser-cookies/SKILL.md.tmpl @@ -18,6 +18,14 @@ allowed-tools: Import logged-in sessions from your real Chromium browser into the headless browse session. +## CDP mode check + +First, check if browse is already connected to the user's real browser: +```bash +$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false" +``` +If `CDP_MODE=true`: tell the user "Not needed — you're connected to your real browser via CDP. Your cookies and sessions are already available." and stop. No cookie import needed. + ## How it works 1. Find the browse binary