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 agents/callstack/agent-device/selector-capturegit clone --depth 1 https://github.com/callstack/agent-deviceWhat 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.00496 |
| Opus 5 | $0.00000 | $0.00248 |
| Sonnet 5 | $0.00000 | $0.00099 |
| Haiku 4.5 | $0.00000 | $0.00050 |
Grade A, and why
selector-capture 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.
What it actually says
Selector Capture Reliability
Read this before changing selector capture, polling, snapshot caching, or interaction fast paths. These are cross-route behavior requirements; their rationale and owning decisions live in ADRs 0002, 0004, 0005, 0011, 0014, and 0015.
- Direct iOS selectors are a narrow fast path for simple one-term selectors and are disabled while post-gesture stabilization is pending. A structured selector miss may return to snapshot resolution; ambiguity and other runner failures remain failures.
- Regular selector reads are capture-backed.
@refresolves against its authorized ref frame, whileget,is,find, andwaitselectors capture through the backend. Polling bypasses the snapshot cache, as do active freshness recovery and stabilization. - Sparse capture verdicts are observable failures and never replace the session snapshot. Only a user-facing snapshot may publish a fallback screenshot; internal polling must not create one artifact per attempt.
- Apple accessibility failures are not proof of an empty UI. Recovery plans may serve regular snapshots, while raw and strict paths preserve the failure. Fatal runner evidence invalidates the cached target.
- A recorded XCTest failure after a tap is an ambiguous outcome. Only a usable same-presentation capture with a changed accessibility digest may corroborate success; missing, sparse, mismatched, or unchanged evidence remains failure.
- Android helper reuse is not snapshot-result caching. Freshness is short-lived, action-triggered, and learned only from route-safe complete observations.
- Pending interaction outcome retry precedes stabilization; Android freshness recovery composes afterward when required. Gesture-like mutations mark stabilization and disable direct iOS selector shortcuts while it is pending.
- Session snapshot writes go through the shared snapshot mutation boundary. Sparse observations and empty ref-scoped projections do not overwrite stored evidence.
- Maestro matching remains snapshot- and policy-owned. Coordinate dispatch uses fresh geometry; an exact same-generation iOS target may use atomic selector activation, and a structured live miss returns to fresh Maestro resolution. Never add fuzzy matching, synthetic geometry, hierarchy heuristics, or error-message classification that changes authored selector meaning.
When changing one of these rules, update the relevant ADR, guarantee-matrix cell, contract scenario, and TypeScript/Swift parity table rather than describing a new exception here.
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 · 36 lines · 0 tokens per session scan A fc07d87fd0c3
selector-capture is an agent published in the GitHub repository callstack/agent-device (4,300 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 496 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-08-30.
Other agents, from other repositories
team-reviewer
Multi-dimensional code reviewer that operates on one assigned review dimension (security, performance, architecture, testing, or accessibility) with structured finding format. Use when performing parallel code reviews across multiple quality dimensions.
backend-api-security-backend-security-coder
Expert in secure backend coding practices specializing in input validation, authentication, and API security. Use PROACTIVELY for backend security implementations or security code reviews.
agent-orchestration-context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…
basic-agents
A basic agent uses a predefined strategy with a simple execution flow that works for most common use cases. It accepts a string input (a question, request, or task description) and sends this input to the configured LLM. The LLM may decide to call provided tools. The agent will execute the tools and send the results…
explainer
Code explanation and architecture walkthroughs. Helps developers understand complex code and systems.
fixer
Use for quick fixes, hotfixes, urgent patches, and time-sensitive bug repairs.