apple-browsers: Skill for Claude Code

.claude/skills/ddg-add-feature-flag/SKILL.md

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

A procedure for adding or changing feature flags and A/B/N experiments in iOS or macOS apps. A feature flag turns a feature on or off, while an experiment compares different versions for different users.

In plain words
What is it for?
Use it to add, remove, or modify a flag or experiment and define whether it is disabled, internal-only, or remotely controlled.
Why use it?
It keeps flag definitions, remote configuration, platform-specific code, defaults, and task links aligned. Remote configuration means the service can control a setting without shipping a new app version.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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-feature-flag/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-feature-flag

README.md
[![agentmods](https://agentmods.dev/badge/skills/duckduckgo/apple-browsers/ddg-add-feature-flag/github.svg)](https://agentmods.dev/skills/duckduckgo/apple-browsers/ddg-add-feature-flag)
Your own site
<a href="https://agentmods.dev/skills/duckduckgo/apple-browsers/ddg-add-feature-flag"><img src="https://agentmods.dev/badge/skills/duckduckgo/apple-browsers/ddg-add-feature-flag/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-feature-flag

Your own site · 80×15
<a href="https://agentmods.dev/skills/duckduckgo/apple-browsers/ddg-add-feature-flag"><img src="https://agentmods.dev/badge/skills/duckduckgo/apple-browsers/ddg-add-feature-flag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 823 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.00030 $0.00823
Opus 5.5 $0.00012 $0.00329
Sonnet 5.5 $0.00006 $0.00165
Haiku 4.5 $0.00003 $0.00082

Measured 1mo ago against content hash 1a5598c9a21b, 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-feature-flag 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 1mo 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-feature-flag/SKILL.md · 49 lines

What it actually says

Add or change a feature flag

Flags live in FeatureFlag.swift in iOS/LocalPackages/FeatureFlags-iOS/Sources/FeatureFlags/ and macOS/LocalPackages/FeatureFlags-macOS/Sources/FeatureFlags/. Copy the shape of the neighbouring cases; the steps below cover what the neighbours don't show.

  1. Get the flag's Asana task URL from the user. The flag case carries it as a /// doc comment, and so does its subfeature.
  2. Add the subfeature the remote config controls:
    • iOS only: iOSBrowserConfigSubfeature.swift, next to FeatureFlag.swift.
    • macOS only: MacOSBrowserConfigSubfeature in SharedPackages/BrowserServicesKit/Sources/PrivacyConfig/Features/PrivacyFeature.swift.
    • A feature with its own parent, such as AIChatSubfeature: that parent's enum in the same PrivacyFeature.swift.
  3. Add the flag case and its Config(...) entry in the config switch. source is .remoteReleasable(<Subfeature>.case), or .disabled to switch the flag off everywhere.
    • defaultValue applies only while the remote config doesn't list the subfeature. Once the config lists it, the config decides for everyone, internal users included. .internalOnly is the usual starting point.
    • Keep supportsLocalOverriding at its default true unless the flag must not be toggled from the debug menu. macOS UI tests crash at launch when they set a flag that doesn't allow it.
    • macOS: pass category: (FeatureFlagCategory.swift) to group the flag in the debug menu.
  4. Gate the code with featureFlagger.isFeatureOn(.flag) on an injected FeatureFlagger; on iOS, default the parameter to AppDependencyProvider.shared.featureFlagger. When the flag picks between two UI implementations that bind at launch, read it once at startup instead, as FireModeCapability.resolve(using:) does in MainCoordinator, so a mid-session toggle can't leave the UI half-switched.
  5. Experiment (A/B/N):
    • Nest a <Name>Cohort: String, FeatureFlagCohortDescribing enum in FeatureFlag and pass it as cohortType:.
    • featureFlagger.resolveCohort(for: .flag) enrolls the device, so call it only where the user meets the difference. Anywhere else, read with assignedCohort(for:), which never enrolls.
    • Fire metrics with PixelKit.fireExperimentPixel (PixelExperimentKit), and declare them under the experiment in {iOS,macOS}/PixelDefinitions/pixels/native_experiments.json5.
  6. Test both states with the platform's mock: on iOS, MockFeatureFlagger(enabledFeatureFlags: [.flag]) from iOS/SharedTestUtils; on macOS and in SharedPackages, the PrivacyConfig MockFeatureFlagger with featuresStub[flag.rawValue] set.
  7. Tell the user that the rollout happens in the duckduckgo/privacy-configuration repository, under the subfeature name from step 2. The embedded config files in this repository are generated copies, so editing them turns nothing on.

Done when the flag compiles on every platform it targets, both of its states are tested, and the user has the subfeature name to add to privacy-configuration.

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. 1mo ago First seen · 49 lines · 30 tokens per session scan A 1a5598c9a21b

Subscribe to this mod's changes

ddg-add-feature-flag is a skill published in the GitHub repository duckduckgo/apple-browsers (270 stars, last pushed today), licensed Apache-2.0. It adds 30 tokens to every session and 823 once invoked, about $0.0001 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-feature-flag compared with skills from other repositories

ddg-add-feature-flag next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ddg-add-feature-flagduckduckgo/apple-browsersSkill270todayApache-2.0A30Claude Code
verify-vibebuddysemantic-craft/iOS-vibebuddySkill9224d agoMITC77Claude Code
argent-screenshot-diffsoftware-mansion/argentSkill3.2kyesterdayApache-2.0A59Claude Code, Codex
mobile-automationmobile-next/mobile-mcpSkill10k4d agoApache-2.0A58Claude Code, Codex
ios-simulator-skillconorluddy/ios-simulator-skillSkill1.3kyesterdayMITA106Claude Code, Codex
boutique-best-practicesmergesort/BoutiqueSkill1.1k5d agoMITA56Claude Code
boutique-swiftuimergesort/BoutiqueSkill1.1k5d agoMITA45Claude Code