setup-browser-cookies

Import cookies from a real Chromium browser into a headless Playwright browse session.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill setup-browser-cookies-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-browser-cookies
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/setup-browser-cookies
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill setup-browser-cookies-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Headless browser sessions start with no login state, so QA testing authenticated pages requires manually recreating sessions. This Skill imports cookies directly from your installed Chromium browsers so the headless session inherits your real logins. ## Core Features & Use Cases - Interactive Cookie Picker: Opens a browser-based UI to search domains and select which cookies to import, without exposing cookie values. - Direct Domain Import: Import cookies for a specific domain (e.g., github.com) from a chosen browser via a single command. - CDP Detection: Detects when the session is already connected to your real browser via CDP and skips unnecessary imports. - Use Case: Before running QA tests against a staging site that requires login, import your authenticated cookies so the headless browser can access protected pages immediately. ## Quick Start Ask the agent to import your browser cookies so you can log in to the test site, then pick the domains in the picker UI that opens.

Frequently Asked Questions about setup-browser-cookies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import browser cookies into a headless browser session?

Run the cookie-import-browser command from the gstack browse binary. It detects installed Chromium browsers and opens a picker UI where you select domains to import into the Playwright session.

How to test authenticated pages with Playwright without logging in again?

Import cookies from your real Chromium browser into the headless session first. The browse session persists cookies between commands, so imported logins work immediately for subsequent QA commands.

Can I import cookies for only one specific domain?

Yes. Pass the domain directly, for example cookie-import-browser comet --domain github.com, replacing the browser name as needed. This skips the interactive picker UI entirely.

Does cookie import work if the session uses CDP mode?

No import is needed in CDP mode. When the browse session is already connected to your real browser via CDP, your cookies and sessions are available directly, and the skill stops with that message.

Why does macOS show a Keychain dialog during cookie import?

Chromium encrypts cookies with a key stored in the macOS Keychain, so the first import per browser triggers an access prompt. Click Allow or Always Allow to let the decryption proceed.

Are my cookie values exposed in the picker UI?

No. The picker UI shows only domain names and cookie counts. Cookie values are decrypted locally and loaded into the session without being displayed.