Run Google searches and fetch JS-rendered web pages as Markdown via `google-search-cli`, a Patchright-based CLI invoked through `uvx` from its GitHub repo (no local install needed). Use when the agent needs (1) fresh Google search results from a query, (2) the Markdown of a URL that plain HTTP fetch (curl/WebFetch) cannot render because it requires JavaScript or evades bots, or (3) inspection of the raw HTML of a Google results page. Trigger phrases include "google for ...", "search the web for ...", "fetch this page as markdown", "this page needs JS to render". Do not use for static doc URLs that WebFetch handles cleanly, or when Chromium cannot be installed on the machine.
90
88%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Critical
Do not install without reviewing
A thin wrapper around the google-search-cli tool from github.com/ceshine/python-playwright-google-search. Invoke it via uvx so the user does not need a local checkout of the repo. The CLI uses patchright (a Playwright fork with anti-bot patches) under the hood.
The first time the CLI runs on a machine, Chromium must be downloaded.
Do not auto-run this — it downloads ~150 MB and may need sudo for --with-deps. Instead, when the CLI errors with a message like Executable doesn't exist at ..., tell the user to run:
uvx --from git+https://github.com/ceshine/python-playwright-google-search.git patchright install chromiumOn Linux, add --with-deps if the system is missing shared libraries (needs sudo). Routing the install through the same --from URL ensures the patchright version used to install the browser matches the version that will later run it. Chromium lands in ~/.cache/ms-playwright/, so subsequent uvx invocations reuse it.
./browser-state.json is read/written in the CWD; reusing it across calls keeps cookies/session alive and lowers rate-limit risk.
Do NOT modify the uvx command templates — do not add anything before or after the command, including the &&, ;, | operators (e.g., DO NOT use a cd command before the uvx command`). Altering the template breaks sandbox whitelist pattern detection. Use the exact forms shown below.
Both commands output their results to stdout. You can use the redirect operator (>) to write the results to a temporary file.
uvx --from git+https://github.com/ceshine/python-playwright-google-search.git google-search-cli search "<query>" [-l 10]uvx --from git+https://github.com/ceshine/python-playwright-google-search.git google-search-cli fetch-markdown "<url>" [--max-n-chars 250000] [-w 0]-w / --wait: seconds to wait after the page loads before capturing content. Increase this (e.g. -w 5 or -w 10) if the Markdown looks incomplete or anomalous (lazy-loaded scripts, late-rendered content).uvx --from git+https://github.com/ceshine/python-playwright-google-search.git google-search-cli search "<query>" --get-htmlsearch: JSON array of {title, link, snippet} objects on stdout. With --get-html, JSON metadata including originalHtmlLength, cleanedHtmlLength, and a 500-char htmlPreview.fetch-markdown: plain Markdown text on stdout. When content exceeds --max-n-chars, the literal suffix \n\n... (truncated) is appended. Detect this string to decide whether to re-invoke with a larger limit.Error: ..., exit code 1.The two subcommands have asymmetric headless defaults. This is intentional; do not flip them without a specific reason.
search defaults to headless=True — mimics human browsing for anti-bot evasion. Override with --no-headless only when debugging.fetch-markdown defaults to headless=False — some pages render incorrectly headless. Pass --headless only in no-display environments (containers/CI without X)../browser-state.json by default. Keeping it preserves cookies/session across invocations.--no-save-state and --state-file <unique-path>.search (for a query) or fetch-markdown (for a specific URL).Bash using the uvx --from git+... form above. The bash command should start with uvx --from git+. Use the given command template exactly. DO NOT use any other commands (e.g., cd).search, Markdown text for fetch-markdown.fetch-markdown output ends with ... (truncated) and the user needs more, re-invoke once with a larger --max-n-chars. Do not loop.fetch-markdown output looks anomalous (e.g. empty, missing expected sections, or clearly incomplete), re-invoke once with a higher -w value (e.g. -w 10) to allow late-rendered content to settle. Do not loop.Stop and report to the user when:
search calls in a row return empty results — likely rate-limited. Back off and surface the issue rather than retrying in a tight loop.search "recent papers on retrieval-augmented generation" -l 5fetch-markdown "<url>"--max-n-chars 500000.348c2c1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.