Send prompts to Grok 4.20 via browser CDP and capture responses. Used for multi-model council discussions.
Automate interaction with Grok 4.20 through Chrome DevTools Protocol.
Chrome must be running with remote debugging. Start with the Arthur profile:
skills/web-browser/scripts/start.js --profile "Arthur"
skills/web-browser/scripts/nav.js https://grok.com
# Simple prompt
skills/grok-council/scripts/ask-grok.js "your question"
# From file
skills/grok-council/scripts/ask-grok.js --file prompt.txt
# From stdin
echo "your question" | skills/grok-council/scripts/ask-grok.js --stdin
# New conversation first
skills/grok-council/scripts/ask-grok.js --new "your question"
# JSON output with metadata
skills/grok-council/scripts/ask-grok.js --json "your question"
# Custom timeout (seconds)
skills/grok-council/scripts/ask-grok.js --timeout 300 "your question"
Set DEBUG=1 for verbose logging:
DEBUG=1 skills/grok-council/scripts/ask-grok.js "test"
Inspect the current grok.com page state:
skills/grok-council/scripts/discover.js inspect # textarea, buttons, model
skills/grok-council/scripts/discover.js response # response containers after a message
skills/grok-council/scripts/discover.js model # model selector dropdown
skills/grok-council/scripts/discover.js full # DOM tree dump