Logo von Automating Chrome

Automating Chrome

Organisation
SpillwaveSolutions
automating-chrome

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.

Übersicht

HerausgeberSpillwaveSolutions
Repositoryautomating-mac-apps-plugin
Skill-Nameautomating-chrome
Sterne
49
Forks
4
Mitgelieferte Dateien
6
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 6 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von SpillwaveSolutions auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Automating Chrome in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/SpillwaveSolutions/automating-mac-apps-plugin/tree/main/plugins/automating-mac-apps-plugin/skills/automating-chrome
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SpillwaveSolutions/automating-mac-apps-plugin.git /tmp/automating-mac-apps-plugin
mkdir -p .claude/skills
cp -r /tmp/automating-mac-apps-plugin/plugins/automating-mac-apps-plugin/skills/automating-chrome .claude/skills/automating-chrome
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Automating Chrome in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Automating Chrome automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Automating Chrome nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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 another execute() 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:

javascript
const chrome = Application('Google Chrome');
chrome.windows[0].tabs.push(chrome.Tab());
chrome.windows[0].tabs[chrome.windows[0].tabs.length - 1].url = 'https://example.com';

Execute JavaScript in current tab:

javascript
const result = chrome.execute({javascript: 'document.title'});
// Note: execute() runs JS but doesn't reliably return values

Batch close tabs (reverse order):

javascript
const tabs = chrome.windows[0].tabs;
for (let i = tabs.length - 1; i >= 0; i--) {
  if (tabs[i].url().includes('unwanted')) {
    tabs[i].close();
  }
}

Extract page data via tunneling:

javascript
// Inject script to save title to localStorage
chrome.execute({javascript: 'localStorage.setItem("pageTitle", document.title)'});
// Retrieve via another execute call
chrome.execute({javascript: 'console.log(localStorage.getItem("pageTitle"))'});

Check browser permissions:

javascript
try {
  const chrome = Application('Google Chrome');
  chrome.windows[0].tabs[0].url(); // Test access
  console.log('Permissions OK');
} catch (error) {
  console.log('Permission error:', error.message);
}

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):

python
import PyXA

# Launch Chrome and navigate
chrome = PyXA.Application("Google Chrome")
chrome.activate()
chrome.open_location("https://example.com")

# Get current tab info
current_tab = chrome.current_tab()
print(f"Page title: {current_tab.title()}")
print(f"Current URL: {current_tab.url()}")

PyObjC with Selenium (Cross-Platform with macOS Integration)

python
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from AppKit import NSWorkspace

# Configure Chrome options
options = Options()
options.add_argument("--remote-debugging-port=9222")
options.add_argument('--headless=new')  # Modern headless mode

# Launch Chrome with Selenium (automatic ChromeDriver management)
driver = webdriver.Chrome(options=options)
driver.get('https://example.com')

# macOS integration via PyObjC
workspace = NSWorkspace.sharedWorkspace()
frontmost_app = workspace.frontmostApplication()
print(f"Frontmost app: {frontmost_app.localizedName()}")

print(f"Page title: {driver.title}")
driver.quit()

Selenium with ChromeDriver (Recommended for Cross-Platform)

bash
# Install Selenium (latest: 4.38.0)
pip install selenium

# ChromeDriver is automatically managed by Selenium Manager (v4.11+)
# No manual download needed - compatible version downloaded automatically

# Basic Python example
from selenium import webdriver

driver = webdriver.Chrome()  # Automatic ChromeDriver management
driver.get('https://example.com')
print(driver.title)
driver.quit()

Advanced Configuration:

python
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument('--headless=new')  # Modern headless mode (required)
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')

driver = webdriver.Chrome(options=options)
driver.get('https://example.com')
print(f"Page title: {driver.title}")
driver.quit()

Manual ChromeDriver Setup (for specific versions):

python
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options

# Download from https://googlechromelabs.github.io/chromedriver/
# Match major version with your Chrome installation
service = Service(executable_path='/path/to/chromedriver')
options = Options()
driver = webdriver.Chrome(service=service, options=options)

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)

bash
# Install Puppeteer (latest: 24.35.0)
npm install puppeteer
# Bundles compatible Chrome automatically
javascript
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: 'new'  // Modern headless mode (required in v24+)
  });
  const page = await browser.newPage();
  await page.goto('https://example.com');
  const title = await page.title();
  console.log(title);
  await browser.close();
})();

Advanced Puppeteer Configuration:

javascript
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: 'new',
    args: ['--no-sandbox', '--disable-dev-shm-usage']
  });
  const page = await browser.newPage();

  // Set viewport
  await page.setViewport({ width: 1280, height: 720 });

  await page.goto('https://example.com');

  // Wait for element and interact
  await page.waitForSelector('h1');
  const title = await page.title();

  console.log(`Page title: ${title}`);
  await browser.close();
})();

Chrome DevTools Protocol (Advanced)

javascript
// WebSocket connection to CDP
const WebSocket = require('ws');
const ws = new WebSocket('ws://localhost:9222/devtools/page/{page-id}');

// Send CDP commands
ws.send(JSON.stringify({
  id: 1,
  method: 'Runtime.evaluate',
  params: { expression: 'document.title' }
}));

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 automation
  • automating-mac-apps: PyXA fundamentals and conversion guides

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Automating Chrome?

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.

Warum Automating Chrome in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Automating Chrome besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Automating Chrome in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/SpillwaveSolutions/automating-mac-apps-plugin/tree/main/plugins/automating-mac-apps-plugin/skills/automating-chrome ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Automating Chrome nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Automating Chrome verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Automating Chrome damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Automating Chrome kostenlos?

Ja. Der Skill wird von SpillwaveSolutions auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇