general

This is the DuckDuckGo browser for iOS and macOS, built with privacy-first principles, modern Swift patterns, and cross-platform architecture.

Cursor rule for Cursor

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 rules/duckduckgo/apple-browsers/general
Clone the repo
git clone --depth 1 https://github.com/duckduckgo/apple-browsers

Made for: Cursor.

Per session 1,808 This file is loaded in full into every session.
When invoked 1,808 The same file — it is already loaded in full.
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 $0.01808 $0.01808
Opus 5 $0.00904 $0.00904
Sonnet 5 $0.00362 $0.00362
Haiku 4.5 $0.00181 $0.00181

Measured yesterday against content hash cc958f169c1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

general 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 yesterday.

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.

.cursor/rules/general.mdc · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DuckDuckGo Browser Development Rules Overview

Project Context

This is the DuckDuckGo browser for iOS and macOS, built with privacy-first principles, modern Swift patterns, and cross-platform architecture.

Key Directories:

  • iOS/ - iOS browser app (UIKit + SwiftUI hybrid)
  • macOS/ - macOS browser app (AppKit + SwiftUI hybrid)
  • SharedPackages/ - Cross-platform Swift packages

Architecture Summary

  • Pattern: MVVM + Coordinators + Dependency Injection
  • UI: SwiftUI preferred, UIKit/AppKit for legacy
  • Storage: Core Data + GRDB + Keychain for sensitive data
  • Design: DesignResourcesKit for colors/icons (MANDATORY)
  • Testing: >80% coverage required

Available Rules (.cursor/rules/)

Development rules are stored in .cursor/rules/. You MUST list all the available rules and you MUST consult the appropriate rule file before starting any work!

Core (Always Apply)

  • anti-patterns.mdc - What NOT to do; use with ViewModels, testing, WebView work
  • code-style.mdc - Swift style guide
  • privacy-security.mdc - Privacy requirements; use with network calls, analytics, credentials
  • import-hygiene.mdc - Import management and SwiftUI preview scoping
  • logging-guidelines.mdc - Logger usage (never print())

Architecture & Patterns

  • architecture.mdc - MVVM, DI patterns; use for new ViewModels
  • project-structure.mdc - Directory layout
  • browserserviceskit-integration.mdc - BSK integration; use for cross-platform code
  • shared-packages.mdc - Cross-platform packages; use for cross-platform code
  • subscription-architecture.mdc - Privacy Pro subscription

Feature Development

  • feature-flags.mdc + feature-flags-addition.mdc - Feature flags
  • abn-experiment-framework.mdc - A/B testing
  • user-defaults-storage.mdc - UserDefaults, @UserDefaultsWrapper; use for settings/preferences

UI Development

  • swiftui-style.mdc - SwiftUI + DesignResourcesKit; use for new ViewModels, UI work
  • swiftui-advanced.mdc - Advanced SwiftUI patterns
  • design-system-designresourceskit.mdc - Colors, typography, icons (MANDATORY)
  • webkit-browser.mdc - WebView patterns

Read the full file on GitHub · 174 lines

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. yesterday First seen · 174 lines · 1,808 tokens per session scan A cc958f169c1b

Subscribe to this mod's changes

general is a cursor rule published in the GitHub repository duckduckgo/apple-browsers (252 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,808 tokens to every session, about $0.0090 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-09-01.