

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Content Scope Scripts (C-S-S)23Shared JavaScript projects powering privacy features and special pages in DuckDuckGo's native apps (macOS, Windows, iOS, Android).45## Workspaces67This is an npm workspace monorepo with four sub-projects:89### `injected/` - Browser Privacy Features1011JavaScript features injected into web pages for privacy protections. Features extend `ConfigFeature` and integrate with remote configuration for per-site enable/disable.1213**Features** (in `injected/src/features/`):14- `api-manipulation` - API behavior modifications15- `autofill-import` - Credential import support16- `breakage-reporting` - Site breakage reports17- `broker-protection` - Data broker removal automation18- `click-to-load` - Social embed blocking19- `cookie` - Cookie management20- `duck-player` / `duck-player-native` - YouTube privacy player21- `element-hiding` - Hide page elements22- `exception-handler` - Error handling23- `favicon` - Favicon privacy24- `fingerprinting-*` - Audio, battery, canvas, hardware, screen, storage fingerprint protection25- `google-rejected` - Google rejection handling26- `gpc` - Global Privacy Control27- `harmful-apis` - Dangerous API restrictions28- `message-bridge` - Page↔content script messaging29- `navigator-interface` - Navigator API modifications30- `performance-metrics` - Performance tracking31- `referrer` - Referrer protection32- `web-compat` - Site compatibility fixes33- `web-interference-detection` / `web-telemetry` - Monitoring3435**Docs:** `injected/docs/README.md` (index to all docs)3637### `special-pages/` - Embedded Browser Pages3839Preact-based HTML/CSS/JS applications embedded in browsers. Each page lives in `special-pages/pages/<name>/`.4041**Pages:**42- `duckplayer` - YouTube privacy player UI43- `errorpage` - Browser error pages44- `example` - Template for new pages45- `history` - Browsing history viewer46- `new-tab` - New Tab Page47- `onboarding` - First-run experience48- `release-notes` - Browser release notes49- `special-error` - SSL/certificate error pages5051**Docs:** `special-pages/README.md`, plus `readme.md` in each page directory5253### `messaging/` - Web-Native Communication5455Abstraction layer for web↔native messaging: `notify` (fire-and-forget), `request` (async response), `subscribe` (push updates).5657**Docs:** `messaging/docs/messaging.md`5859### `types-generator/` - Schema to TypeScript6061Generates TypeScript types from JSON Schema files. Used by other workspaces.6263## Commands6465Run from root. Use `nvm use` to set the correct Node version.6667| Command | Purpose |68|---------|---------|69| `npm run build` | Build all workspaces |70| `npm run test-unit` | Unit tests (all workspaces) |71| `npm run test-int` | Integration tests (Playwright) |72| `npm run lint` | ESLint + TypeScript + Prettier |73| `npm run lint-fix` | Auto-fix lint issues |74| `npm run serve` | Serve injected test pages (port 3220) |75| `npm run serve-special-pages` | Serve special pages (port 3221) |7677## Coding Standards7879Follow the error handling guidelines in [`guides/error-handling.md`](guides/error-handling.md). Key rules:80- Errors are for **exceptional conditions** (invariant violations, unreachable code), not control flow81- Never leave promises unhandled — use `.catch()` or `try/catch` with `await`82- Return `null`/sentinel values for expected missing data instead of throwing8384### Strict TypeScript8586All **new** source files under `injected/src/` must be added to the `CORE_FILES` set in `scripts/check-strict-core.js`. This enforces TypeScript strict mode (`strict: true`, `noUncheckedIndexedAccess`). Run `npm run tsc-strict-core` to verify. Do not remove existing entries from the set.8788## Debugging8990See [`guides/debugging.md`](guides/debugging.md) for debugging resources including script integrity validation, feature triage checklist, and platform-specific troubleshooting.9192## Notes9394- When running Playwright commands, use `--reporter list` to prevent the Shell tool from hanging95- Use `.github/pull_request_template.md` when creating a pull request.9697## Local dev quick wins (common pain points)9899- **Special Pages CSS local dev**: use `npm run serve-special-pages` (repo root) + `npm run watch -- --page=<page>` (inside `special-pages/`) for hot CSS reload (usually `http://localhost:8000/`). The `build/` output does **not** auto-update in watch mode.100- **Release workflow**: releases are created from GitHub Actions (see `CONTRIBUTING.md` → “Release Process”). For most iteration, prefer Netlify preview URLs or `npm link` into native apps; only cut a release when you need native consumption via the `releases` branch artifacts.101102## Cursor Cloud specific instructions103104- Node 22 and npm are pre-installed. Playwright browsers + system deps are pre-installed. Just run `npm ci` to refresh dependencies.105- `npm run serve-special-pages` actually serves on **port 3210** (not 3221 as the Commands table above states). The injected test pages serve on port 3220 as documented.106- Integration tests for injected workspace may show 2 flaky iOS mobile drawer timeouts (`duckplayer-mobile-drawer.spec.js`); these are pre-existing timing issues, not environment problems.107- No Docker, databases, or external services are needed. All tests are self-contained with local HTTP servers and mocked native messaging.108- On headless Linux, `xvfb` is pre-installed. The injected workspace provides `npm run test-int-x` which wraps Playwright with `xvfb-run`, but standard `npm run test-int` also works in this environment.109
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| duckduckgo/content-scope-scriptstypes-generator/AGENTS.md · 70 | AGENTS.md | testarchtypesdo-not | 73/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-broker-protection-actions.mdc · 70 | Cursor rules | buildteststyletypes+4 | 93/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-broker-protection-rest.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-click-to-load.mdc · 70 | Cursor rules | teststyletypesgit+2 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-detectors.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-duckplayer-native.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-duckplayer.mdc · 70 | Cursor rules | setupteststyletypes+4 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-fingerprinting.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-message-bridge.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-a.mdc · 70 | Cursor rules | teststyletypesgit+4 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-b.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-c.mdc · 70 | Cursor rules | teststyletypesgit+4 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-web-compat-and-telemetry.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-zero-errors-batch.mdc · 70 | Cursor rules | testtypesgitdo-not+1 | 81/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsinjected/AGENTS.md · 70 | AGENTS.md | buildteststylearch+2 | 92/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsmessaging/AGENTS.md · 70 | AGENTS.md | testarchtesting-strategyapi | 66/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/duckduckgo-content-scope-scripts-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.