safari-extension

safari-extension is a skill for Claude Code, Codex from Abdullah4AI/apple-developer-toolkit. It costs 65 tokens per session (370 once invoked), scanned A, original, MIT.

A Safari Web Extension that combines JavaScript, HTML, and CSS with an optional native Swift wrapper. It can inject scripts into web pages and pass messages between the page and the app extension.

In plain words
What is it for?
Use it to build Safari extensions with toolbar actions, content scripts, popups, background code, and native communication.
Why use it?
It provides the structure needed to connect browser-page behavior with native macOS or iOS code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/abdullah4ai/apple-developer-toolkit/safari-extension
Any agent
npx skills add Abdullah4AI/apple-developer-toolkit --skill safari-extension
Clone the repo
git clone --depth 1 https://github.com/Abdullah4AI/apple-developer-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for safari-extension

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/safari-extension.svg)](https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/safari-extension)
Your own site
<a href="https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/safari-extension"><img src="https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/safari-extension.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 370 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.00370
Opus 5 $0.00032 $0.00185
Sonnet 5 $0.00013 $0.00074
Haiku 4.5 $0.00006 $0.00037

Measured 6d ago against content hash 9eb5122de80a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

safari-extension scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

swiftship/internal/skills/data/extensions/safari-extension/SKILL.md · 40 lines

What it actually says

Safari Extension

SAFARI WEB EXTENSION: SETUP: Requires separate extension target (kind: "safari" in plan extensions array). Safari Web Extensions use web technologies (JS/HTML/CSS) plus a native Swift wrapper.

SWIFT EXTENSION HANDLER (optional — for native communication): class SafariExtensionHandler: SFSafariExtensionHandler { // Called when toolbar button is clicked override func toolbarItemClicked(in window: SFSafariWindow) { window.getActiveTab { tab in tab?.getActivePage { page in page?.dispatchMessageToScript(withName: "buttonClicked", userInfo: [:]) } } }

// Receive messages from JavaScript content scripts
override func messageReceived(withName messageName: String, from page: SFSafariPage, userInfo: [String: Any]?) {
    // Handle message from JS: page.dispatchMessageToExtension(...)
}

}

INFO.PLIST KEYS (extension): NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).SafariExtensionHandler NSExtensionAttributes: SFSafariWebsiteAccess: { Level: All }

WEB EXTENSION RESOURCES (in extension bundle):

  • manifest.json (Web Extension manifest v3)
  • background.js (service worker)
  • content.js (injected into pages)
  • popup.html (toolbar popup)

ENABLE IN SAFARI: User must enable in Safari → Settings → Extensions.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 40 lines · 65 tokens per session scan A 9eb5122de80a

Subscribe to this mod's changes

safari-extension is a skill published in the GitHub repository Abdullah4AI/apple-developer-toolkit (10 stars, last pushed 2d ago), licensed MIT. It adds 65 tokens to every session and 370 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

next-dev-loop

Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines /next/mcp (Next.js's view) with agent-browser (the browser's view). Requires a running next dev.

vercel/next.js · 68 tokens

playwright-component-testing

Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.

microsoft/playwright · 69 tokens

a11y-debugging

Uses Chrome DevTools MCP for accessibility (a11y) debugging and auditing based on web.dev guidelines. Use when testing semantic HTML, ARIA labels, focus states, keyboard navigation, tap targets, and color contrast.

ChromeDevTools/chrome-devtools-mcp · 50 tokens