maestro-device-selection

maestro-device-selection is a cursor rule for Cursor from duckduckgo/apple-browsers. It costs 0 tokens per session (942 once invoked), scanned A, original, Apache-2.0.

A rule for choosing iPhone or iPad simulators when running Maestro mobile UI tests. The test file’s tags decide which device and iOS simulator configuration is used.

In plain words
What is it for?
Use it when writing or running Maestro tests that need to target iPad-specific or standard iPhone interfaces.
Why use it?
It lets one test suite cover different screen layouts without duplicating the test files.

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

Made for: Cursor.

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 maestro-device-selection

README.md
[![agentmods](https://agentmods.dev/badge/rules/duckduckgo/apple-browsers/maestro-device-selection.svg)](https://agentmods.dev/rules/duckduckgo/apple-browsers/maestro-device-selection)
Your own site
<a href="https://agentmods.dev/rules/duckduckgo/apple-browsers/maestro-device-selection"><img src="https://agentmods.dev/badge/rules/duckduckgo/apple-browsers/maestro-device-selection.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 942 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00942
Opus 5 $0.00000 $0.00471
Sonnet 5 $0.00000 $0.00188
Haiku 4.5 $0.00000 $0.00094

Measured 3d ago against content hash 5e9e6f47ef0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

maestro-device-selection 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 3d 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.

.cursor/rules/maestro-device-selection.mdc · 132 lines

How it starts

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

Maestro Test Device Selection (iPhone/iPad)

Overview

Maestro tests can run on either iPhone or iPad simulators based on tags in the test YAML files. This allows you to test iPad-specific UI layouts and features while maintaining a single test suite.

How It Works

  • Default: Tests run on iPhone 16 with iOS 18.2
  • iPad Tests: Add ipad tag to run on iPad 10th generation with iOS 18.2

Usage

For Individual iPad Tests

Add the ipad tag to your test file:

appId: com.duckduckgo.mobile.ios
tags:
    - ipad
    - your-other-tags
name: Your iPad Test

---
# Your test steps here

Running Tests

The same commands work as before:

# Run a single test (device selected based on tags)
./run_ui_tests.sh path/to/test.yaml

# Run all tests in a folder (each test runs on appropriate device)
./run_ui_tests.sh path/to/tests/

Implementation Details

Setup Phase (setup_ui_tests.sh)

  1. Creates both iPhone and iPad simulators upfront
  2. Boots and configures both simulators with English locale
  3. Installs the app on both devices
  4. Saves both simulator UUIDs for test execution

Test Execution (run_ui_tests.sh)

  1. Opens Simulator app if not already running
  2. Checks each test file for the ipad tag using grep
  3. Boots the required simulator if it's not already running
  4. Uses the pre-created simulator based on the tag
  5. Reinstalls the app before each test for clean state
  6. Reports which device type was used in test results

Simulator Specifications

  • iPhone: iPhone 16, iOS 18.2
  • iPad: iPad (10th generation), iOS 18.2

Both simulators are configured with:

  • Language: English (en)
  • Locale: en_US
  • Name suffix: "(maestro)" for easy identification

Example Test Structure

appId: com.duckduckgo.mobile.ios
tags:
    - ipad
    - duckplayer
name: DuckPlayer iPad Layout Test

---
# This test will automatically run on iPad simulator

- runFlow: 
    file: ../shared/setup.yaml

# Test iPad-specific UI elements
- assertVisible: "Split View"  # Example iPad-specific element

Read the full file on GitHub · 132 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. 3d ago First seen · 132 lines · 0 tokens per session scan A 5e9e6f47ef0f

Subscribe to this mod's changes

maestro-device-selection 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 942 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.