Skip to content

Ask Gemini/ChatGPT

Verified

Use when the user wants to interact with Google Gemini or ChatGPT via browser automation. Triggers on phrases like "ask Gemini", "ask ChatGPT", "ask GPT", "让...

58 downloads
$ Add to .claude/skills/

About This Skill

# Web Chat

Send messages to AI chatbots (Gemini, ChatGPT) via Playwright browser automation and return responses with citations.

| Chatbot | Script | Website | |---------|--------|---------| | Google Gemini | `scripts/ask_gemini.py` | gemini.google.com | | ChatGPT | `scripts/ask_chatgpt.py` | chatgpt.com |

Workflow

Step 1: Ensure Chrome is Running with CDP

If the script fails to connect (Chrome not running or no `--remote-debugging-port`), start Chrome:

```bash {baseDir}/scripts/start_chrome.sh ```

The start script has built-in locking and CDP detection to handle concurrent starts safely. It launches Chrome with `--remote-debugging-port=9222` and `--user-data-dir=~/.openclaw/workspace/chrome_profile`. Login sessions persist across restarts.

Step 2: Choose Chatbot and Extract Query

Choose chatbot: Use the one the user names ("ask Gemini", "用 ChatGPT 查"). "GPT" means ChatGPT. Default to Gemini if unspecified.

Extract query: Strip only the trigger prefix. Do NOT rephrase, translate, summarize, or add context. Pass the rest verbatim:

| User says | Extracted query | |-----------|----------------| | "ask Gemini what is MCP protocol" | "what is MCP protocol" | | "问一下 ChatGPT,transformer 的注意力机制怎么工作" | "transformer 的注意力机制怎么工作" | | "用 GPT 查一下 React 19 有什么新特性" | "React 19 有什么新特性" |

Step 3: Send the Query

```bash # Gemini {baseDir}/.venv/bin/python3 {baseDir}/scripts/ask_gemini.py "extracted query"

# ChatGPT {baseDir}/.venv/bin/python3 {baseDir}/scripts/ask_chatgpt.py "extracted query" ```

| Flag | Description | Default | |------|-------------|---------| | `--port PORT` | Chrome CDP port | `9222` | | `--timeout SECS` | Max wait for response | `120` | | `--new-chat` | Force new chat session | `false` | | `--json` | JSON output | `false` |

Return the script output to the user VERBATIM. Do NOT summarize, rephrase, translate, or otherwise alter the response. Present the full, unmodified text exactly as the script printed it.

Error Handling

| Error | Action | |-------|--------| | "Cannot connect to Chrome on port 9222" | Run `{baseDir}/scripts/start_chrome.sh` (has built-in lock and CDP check), wait 5 seconds, retry. Do NOT kill Chrome manually. | | "You are not logged in" | Inform user to log in manually in the Chrome window | | "Could not find input field" | Selectors may be outdated; inform user the script may need updating | | Response timeout | Retry with `--timeout 300` |

Rebuilding .venv

```bash cd {baseDir} && rm -rf .venv && python3 -m venv .venv && .venv/bin/pip install -r requirements.txt ```

Use Cases

  • Query Google Gemini through browser automation for second opinions
  • Ask ChatGPT questions via browser to leverage different AI perspectives
  • Compare responses from multiple AI models for the same question
  • Access AI chatbots that require browser interaction rather than API calls
  • Get real-time AI responses from services without API access

Pros & Cons

Pros

  • +Access multiple AI models through browser without API credentials
  • +Useful for comparing responses across different AI systems
  • +Browser-based approach works with any chatbot that has a web interface

Cons

  • -Browser automation is slower and less reliable than direct API calls
  • -Depends on chatbot UI remaining unchanged — brittle to layout updates

FAQ

What does Ask Gemini/ChatGPT do?
Use when the user wants to interact with Google Gemini or ChatGPT via browser automation. Triggers on phrases like "ask Gemini", "ask ChatGPT", "ask GPT", "让...
What platforms support Ask Gemini/ChatGPT?
Ask Gemini/ChatGPT is available on Claude Code, OpenClaw.
What are the use cases for Ask Gemini/ChatGPT?
Query Google Gemini through browser automation for second opinions. Ask ChatGPT questions via browser to leverage different AI perspectives. Compare responses from multiple AI models for the same question.

100+ free AI tools

Writing, PDF, image, and developer tools — all in your browser.

Next Step

Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.