AGENT SKILL

safari-browser

Use Safari (never Playwright/Chromium) for all browser automation on this Mac. The user is authenticated in Safari for X, Grok, Google Drive, GitHub, and other web services required by research workflows. Trigger on any browser task: open a URL, scrape a page, read a Grok share, log into a site, fill a form, take a screenshot, debug a web UI, or when Playwright would otherwise be chosen. Happy path: safari_read_page.sh or safari_extract_fast.py (AppleScript innerText). Interactive grok.com chat (modes, send, harvest): see references/grok-com-computer-use.md. Interactive gemini.google.com chat: see references/gemini-google-computer-use.md. Do NOT use Playwright unless the user explicitly overrides this preference.

License 许可
MIT
最近更新
2026-07-19
Stars
★ 1
Forks
1

01 前言 Front Matter

name
safari-browser
metadata
{ "version": "1.2.0", "short-description": "Always use Safari for browser automation (authenticated session)" }
description
Use Safari (never Playwright/Chromium) for all browser automation on this Mac. The user is authenticated in Safari for X, Grok, Google Drive, GitHub, and other web services required by research workflows. Trigger on any browser task: open a URL, scrape a page, read a Grok share, log into a site, fill a form, take a screenshot, debug a web UI, or when Playwright would otherwise be chosen. Happy path: safari_read_page.sh or safari_extract_fast.py (AppleScript innerText). Interactive grok.com chat (modes, send, harvest): see references/grok-com-computer-use.md. Interactive gemini.google.com chat: see references/gemini-google-computer-use.md. Do NOT use Playwright unless the user explicitly overrides this preference.

02 资源文件 6

03 SKILL.md 正文

Safari Browser (Global Preference)

Hard rule: When a task needs a real browser on this Mac, use Safari only. Do not open Playwright, Chromium, or headless Chrome unless the user explicitly asks.

Why: Safari carries the user's live sessions for X, Grok, Google, GitHub, and other services.

Interactive grok.com (computer use)

For live chat on https://grok.com (model mode Fast/Expert/Heavy, paste prompts, wait for generation, harvest answers), do not invent a new approach. Follow the learned playbook:

references/grok-com-computer-use.md

Summary of hard-won rules:

  • NEVER BATCH. Batch is strictly prohibited. One Act only, then screenshot + analyze.
  • ALWAYS screenshot, then analyze. Decisions come from the image, not key logs.
  • Screenshot every 3–5 seconds while operating; determine state each time; then decide.
  • OODA Loop mandatory: Observe → Orient → Decide → Act → Observe again.
  • Scroll the full reply only if shots prove content moved; action bar must be visible in the image before Copy.
  • Never retype the URL if already on grok.com; new chat via Home page link.
  • Address bar only when needed: Meta+l → Meta+a → Backspace → type URL → verify field → Return (OCU type_text appends even when selected).
  • Mode: Model select + real cursor (not avatar F).
  • Harvest after each round: action bar visible in shot → Copy at end of that response → clipboard (pbpaste). Not full-page scrape as default.

Happy path (use this first)

Validated on x.com/i/grok/share/... Grok conversations (2026-07-08):

bash "$HOME/.grok/skills/safari-browser/scripts/safari_read_page.sh" \
  'https://x.com/i/grok/share/<id>' \
  --output experiments/<topic>/safari_transcript.txt \
  --wait 12

What it does: safari_open.sh → wait 12s → AppleScript document.body.innerText in 5k chunks → clean text (~21k chars in <2s after load).

Do not use: Playwright, web_fetch, raw source AppleScript (pre-JS shell), Cmd+A copy (gets URL only), or WebDriver body.text (pulls HTML junk). WebDriver innerText works but is slower (~22s); reserve for --method webdriver.

One-shot Python (same happy path)

python3 "$HOME/.grok/skills/safari-browser/scripts/safari_extract_fast.py" \
  '<url>' --output transcript.txt --wait 12

Read current tab (already open in Safari)

python3 "$HOME/.grok/skills/safari-browser/scripts/safari_extract_fast.py" \
  '<url>' --no-open --output transcript.txt --wait 2

Prerequisites (enabled on this machine)

Safari → Settings → Developer:

Setting Required for happy path
Allow JavaScript from Apple Events Yes — safari_extract_fast.py
Allow remote automation Optional — WebDriver fallback only

Decision order

  1. safari_read_page.sh / safari_extract_fast.py — default for all page reads
  2. safari_open.sh — navigation only
  3. safari_extract.py --method webdriver — scroll-heavy pages if fast path insufficient
  4. UI scripting — last resort only
  5. Playwright — forbidden unless user explicitly overrides

Agent workflow

  1. Do not reach for Playwright or read_share.sh (Playwright) for X-hosted Grok shares.
  2. Run safari_read_page.sh with --output under experiments/<topic>/.
  3. If fast path fails, check Developer toggles; do not silently fall back to Playwright.
  4. Save artifact; summarize conversation from the clean transcript file.

Grok share links

For x.com/i/grok/share/<id> or grok.com/share/...:

bash "$HOME/.grok/skills/safari-browser/scripts/safari_read_page.sh" \
  'https://x.com/i/grok/share/<id>' \
  -o experiments/grok-share-<id>/safari_transcript.txt

Script files

File Role
scripts/safari_read_page.sh Happy path entry point
scripts/safari_extract_fast.py AppleScript innerText extraction
scripts/safari_open.sh Navigate Safari to URL
scripts/safari_extract.py Wrapper; --method fast (default) or webdriver
references/grok-com-computer-use.md Interactive grok.com OCU/Safari playbook (modes, Copy harvest, OODA)
references/gemini-google-computer-use.md Interactive Gemini UI map (modes, tools, Stop/Copy/Redo, Temporary chat)

Limits

  • macOS only
  • Requires authenticated Safari session for gated X/Grok content
  • Cannot run inside Linux CI

04 同仓库更多 Skills

zfifteen
zfifteen/skills-catalog

Zotero

Use Zotero Desktop from Codex to enable/probe the local API, search a local Zotero library, list items/collections/tags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text when requested, and import BibTeX/RIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.

★ 1
zfifteen
zfifteen/skills-catalog

zoom-apps-sdk

Use when using Apps SDK.

★ 1
zfifteen
zfifteen/skills-catalog

youtube

Obtain accurate, timestamped YouTube video transcripts (preferring manual captions over auto-generated) as the primary deliverable, then derive summaries, key claims, or notes from that transcript. Use when the user provides a YouTube URL (or video ID) and wants the transcript, a faithful summary, key claims with attribution, timestamped notes, or "what does this video actually say". The skill is transcript-first: never substitute metadata, title, description, or search snippets for the spoken content. Triggers: "youtube transcript", "get the transcript of this video", "summarize this youtube video", "what did they say in https://youtube.com/...", "key claims from this talk".

★ 1
zfifteen
zfifteen/skills-catalog

yeet

Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.

★ 1
zfifteen
zfifteen/skills-catalog

x-post-creator

Create X-ready post threads and co-located story packages from the active conversation or referenced project material. Use when the user says turn this into an X-post, /x-post, make this into an X thread, or wants plain-language social posts with supporting images saved to docs/x-posts/[story-name]/.

★ 1
zfifteen
zfifteen/skills-catalog

x-api

Search, read, and write X posts through the local X API MCP server (the same backend used by the Codex x-api skill). Use for searching X/x.com, reading threads and replies, creating lists, staging/publishing posts for @alltheputs, finding high-visibility reply targets for research outreach, ingesting public context, or any request that mentions /x-api or "search X".

★ 1