Controls Firefox browser on macOS via AppleScript and UI scripting. Open URLs, manage tabs (close, switch, get info), focus window, send keystrokes. Use for any Firefox automation task.
Ships in meain-dotfiles. Installing the plugin adds it to Claude Code.
Automate Firefox via AppleScript + System Events UI scripting.
All
osascriptcalls requiredangerouslyDisableSandbox: true.
Works natively:
Works via UI scripting (System Events):
Cmd+W)%<query> in address bar)Does NOT work:
tabs as AppleScript objects)tell application "Firefox"
activate
open location "https://example.com"
end tell
tell application "Firefox"
set names to {}
repeat with i from 1 to (count windows)
try
set end of names to (i as string) & ": " & name of window i
end try
end repeat
return names
end tell
tell application "Firefox"
close window 2
end tell
tell application "Firefox"
activate
end tell
delay 0.3
tell application "System Events"
tell process "Firefox"
keystroke "l" using command down
delay 0.3
keystroke "a" using command down
delay 0.1
keystroke "c" using command down
delay 0.2
end tell
end tell
do shell script "pbpaste"
-- Uses Firefox's built-in tab search: type "% <query>" in address bar
-- Must open a new tab first so the address bar is focused and ready
tell application "Firefox"
activate
end tell
delay 0.5
tell application "System Events"
tell process "Firefox"
keystroke "t" using command down -- open new tab (address bar auto-focused)
delay 1
keystroke "% YOUR_QUERY_HERE"
delay 1.5
key code 125 -- arrow down to first result
delay 0.5
key code 36 -- Enter to switch
end tell
end tell
-- Open a new tab, search for the tab, switch to it, then close it
tell application "Firefox"
activate
end tell
delay 0.5
tell application "System Events"
tell process "Firefox"
keystroke "t" using command down
delay 1
keystroke "% YOUR_QUERY_HERE"
delay 1.5
key code 125 -- arrow down to first result
delay 0.5
key code 36 -- Enter to switch to the found tab
delay 0.8
keystroke "w" using command down -- close it
end tell
end tell
tell application "Firefox"
activate
end tell
delay 0.2
tell application "System Events"
tell process "Firefox"
keystroke "w" using command down
end tell
end tell
tell application "Firefox"
activate
end tell
delay 0.2
tell application "System Events"
tell process "Firefox"
keystroke "r" using command down -- e.g. Cmd+R to reload
end tell
end tell
Before closing any tab or window, confirm with the user which one to close. Prefer identifying by title. Never assume which window index is which without first listing window names.
To identify windows before acting:
tell application "Firefox"
set names to {}
repeat with i from 1 to (count windows)
try
set end of names to (i as string) & ": " & name of window i
end try
end repeat
return names
end tell
What the agent file sets; muted values are Claude Code's defaults
7-day visitors to each agent page
@agent-meain-dotfiles:.agents:skills:firefox:firefoxfrom meain-dotfiles
meain-dotfiles@cascade-code-general-misc-2 is listed by joshuarweaver/cascade-code-general-misc-2 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-2 --plugin meain-dotfiles41 agents in this plugin
.agents:AGENTSFile & Output Conventions- When the user specifically asks to generate a markdown file, open it once right after first creating it using `open -a Firefox <filepath>` (with `dangerouslyDisableSandbox: true`) — do not reopen it after subsequent edits, since a browser refresh picks up changes. For HTML or other file formats, use `open <filepath>` with `dangerouslyDisableSandbox: true` — the sandbox blocks `open` from launching GUI apps..agents:skills:address-review-comments:address-review-commentsaddress-review-commentsWork through review comments across a stack of jj-managed PRs, one PR at a time — pull comments, present them with proposed fixes, apply only what's approved, and manage the commit/rebase/push flow..agents:skills:advisor:advisoradvisorConsult a stronger model (Opus) as an advisor when stuck or facing a hard decision. Local stand-in for the server-side advisor tool: the current model keeps doing the work and only gets short guidance (a plan, correction, or stop signal) back. Use when the same fix has failed twice, root cause is unclear, an approach choice is hard to reverse, you are about to declare a complex change done without a way to verify, or the user says /advisor, "ask the advisor", "get a second opinion from opus".
.agents:skills:android-adb-connect:android-adb-connectandroid-adb-connectConnect to an Android phone over ADB wireless (Galaxy S25 at meain's setup), install/launch APKs, take screenshots, and drive the UI via uiautomator. Triggers: "connect to phone", "adb connect", "test on phone", "screenshot the phone", "install on phone", "phone is at 192.168.1.3", any task that needs to drive an Android device from the host.
.agents:skills:backlog:backlogbacklogDaily backlog management — full planning review OR add a single entry from a URL. Full review: gathers Jira sprint, GitHub PRs, checked-off items, and collaboratively plans the day. Add from URL: looks up a Teams message, Jira ticket, GitHub PR/issue, or incident.io alert and creates a concise backlog entry with a [ref] link. Triggers: /backlog-review, /update-backlog, "update my backlog", "plan my backlog", "what should I work on today", "refresh backlog", "backlog update", /backlog-add, "add this link to backlog", "backlog from link", "look up and add to backlog"
.agents:skills:concern-review:concern-reviewconcern-reviewGenerate an interactive local HTML review page for a large PR or diff, grouping the changed files by logical concern (not just by file) so a reviewer can go through one theme at a time instead of a flat file list. Each concern gets its own section with a description, per-file summaries, the real diff (sliced to just the hunks relevant to that concern when a file serves more than one), and callouts for anything genuinely non-obvious. Triggers: /concern-review, "review this PR by concern", "review this large PR", "build a review dashboard", "group this diff by concern", "concern review", "help me review this PR".
Other plugins' agents for the same job