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.
npx agentmods add rules/duckduckgo/apple-browsers/swiftui-stylegit clone --depth 1 https://github.com/duckduckgo/apple-browsersWrote 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.
[](https://agentmods.dev/rules/duckduckgo/apple-browsers/swiftui-style)<a href="https://agentmods.dev/rules/duckduckgo/apple-browsers/swiftui-style"><img src="https://agentmods.dev/badge/rules/duckduckgo/apple-browsers/swiftui-style.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01748 |
| Opus 5 | $0.00000 | $0.00874 |
| Sonnet 5 | $0.00000 | $0.00350 |
| Haiku 4.5 | $0.00000 | $0.00175 |
Grade A, and why
swiftui-style 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Style Guide with Design System Integration for DuckDuckGo Browser
View Structure
View Organization
struct FeatureView: View {
// MARK: - Environment and State
@Environment(\.colorScheme) var colorScheme
@EnvironmentObject var appSettings: AppSettings
// MARK: - State and Binding
@State private var localState = false
@Binding var externalState: Bool
// MARK: - View Model
@StateObject private var viewModel: FeatureViewModel
// MARK: - Body
var body: some View {
content
.onAppear { viewModel.onAppear() }
}
// MARK: - Subviews
@ViewBuilder
private var content: some View {
// Main content here
}
}
Design System Integration
REQUIRED: Use DesignResourcesKit Colors
ALWAYS use semantic colors from DesignResourcesKit instead of hardcoded or system colors:
// ✅ CORRECT - DesignResourcesKit semantic colors
Text("Title")
.foregroundColor(Color(designSystemColor: .textPrimary))
.background(Color(designSystemColor: .surface))
VStack {
Rectangle()
.fill(Color(designSystemColor: .accent))
Button("Action") { }
.foregroundColor(Color(designSystemColor: .controlsFillPrimary))
}
.background(Color(designSystemColor: .background))
// ❌ INCORRECT - Hardcoded or system colors
Text("Title")
.foregroundColor(.black) // Don't use hardcoded colors
.background(.gray) // Don't use system colors
// ❌ INCORRECT - Manual dark mode handling
@Environment(\.colorScheme) var colorScheme
let textColor = colorScheme == .dark ? Color.white : Color.black // Use semantic colors instead
REQUIRED: Use DesignResourcesKit Icons
ALWAYS use icons from DesignResourcesKitIcons package:
// ✅ CORRECT - DesignResourcesKit icons
Button(action: addAction) {
Image(uiImage: DesignSystemImages.Glyphs.Size16.add)
.foregroundColor(Color(designSystemColor: .accent))
}
Image(uiImage: DesignSystemImages.Color.Size24.bookmark)
.resizable()
.frame(width: 24, height: 24)
// ❌ INCORRECT - System or custom icons
Button(action: addAction) {
Image(systemName: "plus") // Use DesignResourcesKit icons
}
Image("custom_icon") // Use DesignResourcesKit icons instead
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.
- 4d ago First seen · 332 lines · 0 tokens per session scan A 7e9154daf0ab
swiftui-style is a cursor rule published in the GitHub repository duckduckgo/apple-browsers (251 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,748 tokens. 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.
Other cursor rules, from other repositories
react-native-debugger-mcp
使用 react-native-debugger-mcp 工具讀取 React Native 台日誌.
storage-rules
本地儲存規範 - 禁止直接使用 AsyncStorage.
create-ios-release
As an AI assistant helping with iOS app releases, I should guide through the following process for successfully deploying iOS applications to the App Store.
203-healthkit-integration-detailed
HealthKit & WorkoutKit 集成规范 - 详细参考.
010-healthkit-workoutkit
010: HealthKit and WorkoutKit integration patterns for iOS health apps.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.