apple-browsers: Skill for Claude Code

.claude/skills/ddg-add-pixel/SKILL.md

ddg-add-pixel is a skill for Claude Code from duckduckgo/apple-browsers. It costs 38 tokens per session (942 once invoked), scanned A, original, Apache-2.0.

A procedure for adding or changing tracking events, called pixels, in DuckDuckGo's iOS, macOS, and shared Swift code.

In plain words
What is it for?
Use it when creating, renaming, or changing a pixel or wide event and its JSON5 definition and tests.
Why use it?
It prevents event names, platform differences, sending frequency, definitions, and tests from being handled inconsistently. A pixel is a small piece of analytics tracking that records an app action.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is duckduckgo/apple-browsers's own configuration. It tells Claude Code how to work on apple-browsers itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything apple-browsers configures →

Reuse

Borrowing it

Nothing to install: this file belongs to duckduckgo/apple-browsers. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/duckduckgo/apple-browsers/main/.claude/skills/ddg-add-pixel/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/duckduckgo/apple-browsers

Made for: Claude Code.

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 ddg-add-pixel

README.md
[![agentmods](https://agentmods.dev/badge/skills/duckduckgo/apple-browsers/ddg-add-pixel/github.svg)](https://agentmods.dev/skills/duckduckgo/apple-browsers/ddg-add-pixel)
Your own site
<a href="https://agentmods.dev/skills/duckduckgo/apple-browsers/ddg-add-pixel"><img src="https://agentmods.dev/badge/skills/duckduckgo/apple-browsers/ddg-add-pixel/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ddg-add-pixel

Your own site · 80×15
<a href="https://agentmods.dev/skills/duckduckgo/apple-browsers/ddg-add-pixel"><img src="https://agentmods.dev/badge/skills/duckduckgo/apple-browsers/ddg-add-pixel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 942 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00038 $0.00942
Opus 5.5 $0.00015 $0.00377
Sonnet 5.5 $0.00008 $0.00188
Haiku 4.5 $0.00004 $0.00094

Measured 25d ago against content hash fb18cd6ba328, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ddg-add-pixel 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 25d 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.

.claude/skills/ddg-add-pixel/SKILL.md · 55 lines

What it actually says

Add or change a pixel

These steps cover the usual case. For anything they don't, the Swift API reference is SharedPackages/PixelKit/Sources/PixelKit/README.md, and the definition rules are in REVIEW-pixels.md, which Claude Code Review also applies to the PR.

  1. Find what exists. git grep the feature name in iOS/PixelDefinitions, macOS/PixelDefinitions and *Pixel*.swift. Extend the feature's existing PixelKit.Event enum when there is one; otherwise create one in its own file. iOS/Core/PixelEvent.swift is closed to new cases, and Danger fails a PR that adds one.
  2. Name it feature_action or feature-subfeature_action: descriptive, without an m_ or m- prefix, and without legacy shorthand like ml.
    • iOS: leave ios out of the name. PixelKit appends _ios_phone / _ios_tablet.
    • macOS: end the name with _macos and declare var namePrefix: PixelKitNamePrefix { .none }, otherwise PixelKit prepends m_mac_. See macOS/DuckDuckGo/Statistics/FireButtonPixel.swift.
  3. Pick the frequency:
    • .standard sends every time; .daily once per day per device.
    • .dailyAndCount sends both, for anything that can spike, such as an error.
    • .uniqueByName sends once per install, and the name must end _u.
    • The legacy… cases exist only for pixels that already ship with their suffixes. The README's frequency table lists the rest.
  4. Fire through an injected PixelFiring? that defaults to PixelKit.shared. Spell the concrete type, fire(MyPixel.someCase); the leading-dot form .someCase does not compile. Bucket numbers, and keep PII and URLs out of names and parameters.
    • Three or more pixels for one flow, or a wide event: put them behind a <Feature>Instrumentation protocol with a default implementation, like iOS/DuckDuckGo/AIChat/WideEvent/DuckAISessionInstrumentation.swift.
    • .withRetry or .withATB: stop and ask the user for privacy triage first.
  5. Define it in {iOS,macOS}/PixelDefinitions/pixels/definitions/, starting from the TEMPLATE.json5 in that folder.
    • Set triggers from the event that fires the pixel, using the procedure in the "Triggers" section of REVIEW-pixels.md. Don't default to ["other"].
    • List every parameter the pixel sends: appVersion unless the call opts out, errorCode and errorDomain (plus the underlying pair) when the event carries an error, and pixelSource when the event declares it.
    • List suffixes in the order PixelKit emits them: frequency, then platform, then form_factor (the last two on iOS only).
    • A pixel fired from SharedPackages needs a definition on every platform that fires it.
  6. Wide events also follow the "Wide events" section of REVIEW-pixels.md: both definition files, matching version bumps, anchored keyPatterns, and no edits to generated_schemas/.
  7. Test with PixelKitMock (@_spi(Testing) import PixelKit), asserting on its actualFireCalls.
  8. Validate from iOS/ or macOS/: npm ci --include-workspace-root once, then npm run validate-pixel-defs, npm run check-wide-events, and npm run pixel-lint.fix to format. CI also checks owners against an internal GitHub user map that local runs skip, so use GitHub usernames.

Done when every name the Swift code can send has a definition whose parameters and suffixes match, and the validators pass.

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. 25d ago Changed · +2 lines fb18cd6ba328
  2. 1mo ago First seen · 53 lines · 38 tokens per session scan A 870e73cb70d8

Subscribe to this mod's changes

ddg-add-pixel is a skill published in the GitHub repository duckduckgo/apple-browsers (270 stars, last pushed today), licensed Apache-2.0. It adds 38 tokens to every session and 942 once invoked, about $0.0002 per session on Opus 5.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-10-03.

Related

ddg-add-pixel compared with skills from other repositories

ddg-add-pixel next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ddg-add-pixelduckduckgo/apple-browsersSkill270todayApache-2.0A38Claude Code
cli-anything-nsloggerHKUDS/CLI-AnythingSkill58k1mo agoApache-2.0A36Claude Code, Codex
benchmarksoniqo/speech-swiftSkill1.3kyesterdayApache-2.0A0Claude Code
review-prsoniqo/speech-swiftSkill1.3kyesterdayApache-2.0A71Claude Code
boutique-best-practicesmergesort/BoutiqueSkill1.1k5d agoMITA56Claude Code
boutique-storemergesort/BoutiqueSkill1.1k5d agoMITA52Claude Code
boutique-stored-valuesmergesort/BoutiqueSkill1.1k5d agoMITA68Claude Code