google-ai-search

Run Google searches and capture AI Overview responses via Chrome DevTools Protocol.

4.4k|1.3k|Updated Jan 23, 2012
One-click install
npx skills add https://github.com/paulirish/dotfiles --skill google-ai-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-ai-search
Source: https://github.com/paulirish/dotfiles/tree/main/agents/skills/google-ai-search
Command: npx skills add https://github.com/paulirish/dotfiles --skill google-ai-search

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) components.

What problem does it solve?

Capturing Google's AI Overview (SGE) responses programmatically is difficult because they require an authenticated browser session and are rendered dynamically. This Skill connects to your running Chrome instance to execute searches and save the AI-generated response as an HTML file.

Core Features & Use Cases

  • Authenticated Session Reuse: Connects to a running Chrome instance via Chrome DevTools Protocol (CDP) using Playwright, leveraging your existing login state.
  • Dual Capture Strategy: Extracts the AI response either from intercepted network traffic (the folif async endpoint) or from the SGE DOM container as a fallback.
  • Use Case: A researcher wants to archive Google's AI Overview answers for a set of queries. They run the script with each query, and each AI response is saved as an HTML file in their Downloads folder.

Quick Start

Run a Google search for "how to use webusb in chrome extension" and save the AI Overview response to my Downloads folder.

Frequently Asked Questions about google-ai-search

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

FAQPage Schema
How do I capture Google AI Overview responses programmatically?

Launch Chrome with --remote-debugging-port=51673, then run the script with your search query. It connects via Chrome DevTools Protocol, performs the search, and saves the AI response HTML to your Downloads folder.

How to automate Google searches with Playwright using an existing Chrome session?

Use Playwright's chromium.connectOverCDP to attach to a Chrome instance started with remote debugging enabled. This reuses your authenticated session instead of launching a fresh browser profile.

Does this require a Google API key or special authentication?

No API key is required. The script connects to your locally running Chrome browser via CDP on port 51673, so it uses whatever Google session is already active in that browser.

Why does the script fail to connect to Chrome?

Connection fails if Chrome is not running with remote debugging enabled on the expected port. Start Chrome with --remote-debugging-port=51673, or pass a custom port using the --port flag.

What happens if no AI Overview appears for my search query?

The script first tries to capture the AI response from network traffic, then falls back to reading the SGE DOM container. If neither source contains an AI response, it exits with an error and saves nothing.