cmux Browser ChatGPT
Send a question to the ChatGPT browser surface open in cmux and capture the response as a screenshot.
Workflow
Discovery: Find the ChatGPT surface across all workspaces by scanning the cmux tree for chatgpt.com.
Interaction: Fill the prompt input, submit, wait for the response, screenshot.
Run the bundled script, passing the question as a single quoted argument:
bash <skill_base_dir>/scripts/ask-chatgpt.sh "<question>"
The script prints the surface ref it found and the path to the response screenshot.
After the script completes, read the screenshot and relay ChatGPT's answer to the user.
Key Implementation Notes
- ChatGPT uses a
contenteditablediv with id#prompt-textarea— usecmux browser fill, nottype cmux browser evalandcmux browser press Enterraise a JS exception on chatgpt.com — use the send-button click fallback chain insteadcmux browser snapshotreturns almost nothing on chatgpt.com (heavy JS app) — screenshots are the only reliable way to read the response- Surface refs change between sessions — always discover fresh via
cmux tree --all, never hardcode