google-chromelisted
Install: claude install-skill D1DX/google-chrome-skill
# Google Chrome Skill
macOS-only. Operate Google Chrome programmatically: discover profiles, read/write the Bookmarks JSON, control tabs and windows via AppleScript, and extract live session cookies for authenticated web-API calls.
When invoked as `/google-chrome <domain>`, runs `extract.py <domain>` to pull live cookies for that domain (see Section 7).
---
## 1. Profile discovery
Chrome stores each profile under its own folder. Folder names are stable (`Default`, `Profile 1`, `Profile 2`, …) but the **display name** lives inside `Preferences`.
```bash
ROOT="$HOME/Library/Application Support/Google/Chrome"
ls "$ROOT/" | grep -iE '^(default|profile)'
# Default
# Profile 1
# Profile 3
# ...
```
Map folder → display name:
```bash
for p in "$ROOT"/Default "$ROOT"/Profile\ *; do
[ -f "$p/Preferences" ] || continue
name=$(python3 -c "import json,sys; d=json.load(open(sys.argv[1])); print(d.get('profile',{}).get('name','?'))" "$p/Preferences")
printf '%s → %s\n' "$(basename "$p")" "$name"
done
```
The Chrome window title also exposes the profile in parentheses: `LinkedIn - Google Chrome - Daniel (.D1DX)` → profile name is `.D1DX`.
---
## 2. Bookmarks JSON
### Location
```
$ROOT/<Profile>/Bookmarks # canonical
$ROOT/<Profile>/Bookmarks.bak # Chrome's automatic backup
```
### Top-level structure
```json
{
"checksum": "32-char-md5-hex",
"roots": {
"bookmark_bar": { "id": "1", "type": "folder", "name": "Bookmarks Bar", "children": [ ... ] },