ibz-04/gloamy/automating-chrome
Claude Code and agent skill by ibz-04/gloamy
- community
Checking that the SKILL.md file is still in the repository.
Automates Google Chrome and Chromium-based browsers via JXA with AppleScript dictionary discovery. Use when asked to "automate Chrome tabs", "control browser with JXA", "Chrome AppleScript automation", "Chromium browser scripting", or "browser tab management". Covers windows, tabs, execute(), tunneling patterns, and permissions.
Install
npx vskill@latest install ibz-04/gloamy/automating-chromeSKILL.md
Automating Chrome / Chromium Browsers (JXA-first, AppleScript discovery)
Technology Status
JXA/AppleScript browser automation is legacy. JavaScript injection is disabled by default in modern Chrome. Modern alternatives: Selenium/ChromeDriver, Puppeteer, PyXA.
Related Skills: web-browser-automation, automating-mac-apps
PyXA Installation: See automating-mac-apps skill (PyXA Installation section).
Contents
Scope
- Primary target: Google Chrome (bundle ID: com.google.Chrome).
- Chromium-based variants (Brave: com.brave.Browser, Edge: com.microsoft.edgemac, Arc: company.thebrowser.Browser) often expose similar dictionaries but may differ by bundle name and permissions.
- Always verify dictionary availability in Script Editor for target browser before automation.
Security Note: JavaScript injection via AppleScript is disabled by default in Chrome. Enable via: View → Developer → Allow JavaScript from Apple Events (not recommended for production use).
Core framing
- AppleScript dictionaries define the automation surface.
- JXA provides logic and data handling.
execute()runs JavaScript in page context but doesn't reliably return values—use tunneling patterns (save to clipboard/localStorage) for data extraction instead.
⚠️ Security Warning: The tunneling approach (clipboard/localStorage) can expose sensitive data. Use modern APIs for production automation.
- Tunneling Patterns Explained: Since
execute()doesn't return JavaScript results directly, work around this by having your injected script save data to accessible locations like the system clipboard (navigator.clipboard.writeText()) or localStorage (localStorage.setItem()). Then retrieve the data in your JXA script using system commands or by reading back from localStorage via anotherexecute()call.
Workflow (default)
1) Discover dictionary terms in Script Editor (Chrome or target browser). 2) Prototype minimal AppleScript commands in target browser. 3) Port to JXA and add defensive checks:
- Wrap operations in try/catch blocks
- Check browser process status:
chrome.running() - Verify window/tab indices exist before access
- Handle permission dialogs programmatically when possible
4) Use batch URL reads and reverse-order deletes for tab operations. 5) Use tunneling patterns for DOM data extraction. 6) Validate results: Log tab counts, URLs, or extracted data to confirm operations succeeded.
Quick Examples
Open new tab and navigate:
Execute JavaScript in current tab:
Batch close tabs (reverse order):
Extract page data via tunneling:
Check browser permissions:
Modern Alternatives
For production Chrome automation, see the web-browser-automation skill for comprehensive guides covering:
- PyXA: macOS-native Chrome automation with full integration
- Selenium: Cross-platform automation with automatic ChromeDriver management
- Puppeteer: Node.js automation with bundled Chrome
- Multi-browser workflows: Chrome, Edge, Brave, and Arc coordination
Quick PyXA Example (see web-browser-automation skill for details):
PyObjC with Selenium (Cross-Platform with macOS Integration)
Selenium with ChromeDriver (Recommended for Cross-Platform)
Advanced Configuration:
Manual ChromeDriver Setup (for specific versions):
Note: Selenium 4.11+ automatically downloads compatible ChromeDriver. Manual setup only needed for specific version requirements or CI/CD environments.
Puppeteer (Recommended for Node.js)
Advanced Puppeteer Configuration:
Chrome DevTools Protocol (Advanced)
Setup Requirements:
- ChromeDriver: Download from Chrome for Testing
- Puppeteer:
npm install puppeteer - CDP: Launch Chrome with
--remote-debugging-port=9222
Validation Checklist
- [ ] Browser automation permissions granted (System Settings > Privacy & Security)
- [ ] Chrome running and accessible:
chrome.running()returns true - [ ] JavaScript injection enabled (View > Developer > Allow JavaScript from Apple Events)
- [ ] Tab/window indices verified before access
- [ ] Error handling wraps all operations
- [ ] Data extraction via tunneling confirmed
- [ ] Results logged and validated
When Not to Use
- Cross-platform browser automation (use Selenium or Playwright)
- Production web scraping or testing (use ChromeDriver/Puppeteer)
- JavaScript injection disabled (default in modern Chrome)
- Non-macOS platforms
- Heavy DOM manipulation (use Puppeteer/Playwright)
What to load
- Chrome JXA basics:
automating-chrome/references/chrome-basics.md - Recipes (tabs, URLs, windows):
automating-chrome/references/chrome-recipes.md - Advanced patterns (execute tunneling, incognito):
automating-chrome/references/chrome-advanced.md - Dictionary translation table:
automating-chrome/references/chrome-dictionary.md - Browser name mapping:
automating-chrome/references/chromium-browser-names.md - Form automation basics:
automating-chrome/references/chrome-form-automation.md
Related Skills for Modern Chrome Automation:
web-browser-automation: Complete guide for Chrome, Edge, Brave, and Arc automationautomating-mac-apps: PyXA fundamentals and conversion guides
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/automating-chrome/SKILL.md
Popularity
- Repository stars
- 63
- Repository forks
- 12
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Aug 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ibz-04/gloamy/automating-chrome)