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/logging-guidelinesgit clone --depth 1 https://github.com/duckduckgo/apple-browsersWhat 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 | $0.00000 | $0.03679 |
| Opus 5 | $0.00000 | $0.01840 |
| Sonnet 5 | $0.00000 | $0.00736 |
| Haiku 4.5 | $0.00000 | $0.00368 |
Grade B, and why
logging-guidelines scanned grade B with 1 finding 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo sysdiagnose How it starts
The opening of the file, as written. The whole thing — 577 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Logging Guidelines & Telemetry Capture
Overview
The DuckDuckGo browser apps for iOS and macOS leverage Apple's Unified Logging System for capturing telemetry and debugging information. This system enables efficient tracking of app behavior, issue diagnosis, and performance monitoring in a structured and privacy-conscious manner.
Key Benefits:
- Privacy-first: Built-in privacy controls for sensitive data
- Performance: Optimized for minimal overhead
- Integration: Native Apple ecosystem support
- Debugging: Rich contextual information and filtering
How to Log
Using the Logger Class
We utilize the Logger class from Apple's os framework for all logging activities:
import os
// Basic logging examples
Logger.yourFeatureName.debug("Something to log, with info: \(infoVar)")
Logger.anotherFeatureName.error("Some error happened: \(error.localizedDescription, privacy: .public)")
Logger.networking.info("API request completed for endpoint: \(endpoint, privacy: .public)")
Logger.performance.debug("Operation took \(duration)ms to complete")
Creating Custom Loggers
Single Feature Logger
For new features, create a dedicated logger file named Logger+YourFeatureName.swift:
import os
public extension Logger {
static var yourFeatureName: Logger = {
Logger(subsystem: "Your Feature Name", category: "")
}()
static var anotherFeatureName: Logger = {
Logger(subsystem: "Another feature name", category: "Subsystem in the feature")
}()
}
Multiple Feature Loggers
For related features, add to existing logger extensions (e.g., Logger+Multiple.swift):
import os
public extension Logger {
// Networking loggers
static var networking: Logger = {
Logger(subsystem: "Networking", category: "API")
}()
static var cache: Logger = {
Logger(subsystem: "Networking", category: "Cache")
}()
// UI loggers
static var tabManagement: Logger = {
Logger(subsystem: "UI", category: "Tab Management")
}()
static var bookmarks: Logger = {
Logger(subsystem: "UI", category: "Bookmarks")
}()
}
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.
- yesterday First seen · 577 lines · 0 tokens per session scan B f7e1a4017eac
logging-guidelines is a cursor rule published in the GitHub repository duckduckgo/apple-browsers (252 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,679 tokens. A static security scan graded it B with 1 finding (asks for root). 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
release-policy
Release, versioning, and signing policy for setmac.
on-load-rule
This guide outlines the critical development principles for this Swift project.
visualization-rule
Creates visual representations of project specifications, tasks, and knowledge.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.