detox
Skill15 starsChanged 45 days agoMITView on GitHub
Expert Detox mobile E2E automation for React Native applications on iOS and Android. Use when running gray-box integration tests, simulating device interactions, or debugging mobile flakiness.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- anithomas/claude-skillstheir own version, first seen Nov 15, 2026
- tokyubevoxelverse/detoxtheir own version, first seen Jul 22, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- tokyubevoxelverse/detox★ 1same name
- anithomas/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 86
Problem: Test flakiness due to timing differences across mobile platforms.
- Very specific: line 110
Use testID for Element Matching: Assign testID="my_element" on React Native components for unambiguous cross-platform matching.
- Very specific: line 112
Run on Release/Staging Builds in CI: Test release configurations (configuration: "ios.sim.release") for accurate performance metrics.
- Distinctive: line 113
Use Mock Servers (MSW or MockServer): Keep external API calls deterministic and isolated from external network outages.
- Distinctive: line 117
Use sleep timeouts: Trust Detox's automatic idle synchronization instead of arbitrary delays.
- Distinctive: line 118
Test third-party social auth webviews with Detox: Mock the auth response in the React Native state layer.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Detox
Detox is designed for React Native. Unlike Appium (Black-box), Detox works "Gray-box" by running inside your app, monitoring the main thread. It knows when the app is busy/idle, eliminating flaky waits.
When to Use
- Gray-Box Mobile E2E Automation: Testing React Native mobile apps with internal synchronization on iOS and Android.
- Flake-Free Mobile Testing: Eliminating manual
sleep()calls by synchronizing automatically with React Native's bridge and event queue. - High-Velocity Release Validation: Validating critical user journeys on simulators and emulators in mobile CI/CD pipelines.
- Fast Local Feedback: Running automated mobile UI tests alongside the React Native packager.
Quick Start
describe("Example", () => {
beforeAll(async () => {
await device.launchApp();
});
it("should show hello screen after tap", async () => {
await element(by.id("hello_button")).tap();
await expect(element(by.text("Hello!!!"))).toBeVisible();
});
});Core Concepts
Gray-Box Synchronization Architecture
Detox monitors the app internally (network requests, animations, timers, UI layout passes) and executes actions only when the app is completely idle:
[ Detox Test Runner ] ──(WebSocket)──→ [ Native Detox Agent (Inside App) ]
├── Monitors React Native Bridge
├── Tracks Ongoing Network Requests
└── Waits for Zero Pending AnimationsMatchers & Actions Hierarchy
Interacts with native elements using accessibility IDs:
// e2e/checkout.test.ts
import { by, element, expect } from "detox";
describe("Checkout Flow", () => {
beforeAll(async () => {
await device.launchApp({ newInstance: true });
});
it("adds item to cart and proceeds to payment", async () => {
await element(by.id("item_card_101")).tap();
await element(by.id("add_to_cart_btn")).tap();
await expect(element(by.id("cart_badge"))).toHaveText("1");
await element(by.id("cart_icon")).tap();
await element(by.id("checkout_button")).tap();
await expect(element(by.text("Payment Options"))).toBeVisible();
});
});Device Control & Deep Linking
Controls simulator state, permissions, and URL schemes:
it("handles incoming deep links", async () => {
await device.openURL({ url: "myapp://promo/summer2026" });
await expect(element(by.id("promo_banner"))).toBeVisible();
});Common Patterns
Synchronized User Flow with Test IDs
Problem: Test flakiness due to timing differences across mobile platforms.
Solution:
Assign testID props in React Native and query using by.id:
describe("Authentication Flow", () => {
beforeAll(async () => {
await device.launchApp({ delete: true });
});
it("logs in with valid credentials", async () => {
await element(by.id("email_input")).typeText("user@example.com");
await element(by.id("password_input")).typeText("secret123");
await element(by.id("login_button")).tap();
await expect(element(by.id("welcome_header"))).toBeVisible();
});
});Best Practices
Do:
- Use
testIDfor Element Matching: AssigntestID="my_element"on React Native components for unambiguous cross-platform matching. - Disable Infinite Animations during Tests: Infinite loops keep the app permanently busy, preventing Detox from synchronizing.
- Run on Release/Staging Builds in CI: Test release configurations (
configuration: "ios.sim.release") for accurate performance metrics. - Use Mock Servers (MSW or MockServer): Keep external API calls deterministic and isolated from external network outages.
Don't:
- Use sleep timeouts: Trust Detox's automatic idle synchronization instead of arbitrary delays.
- Test third-party social auth webviews with Detox: Mock the auth response in the React Native state layer.
- Ignore detox build artifacts: Capture videos and artifacts on failure (
--record-videos failing --take-screenshots failing).
Troubleshooting
| Error | Cause | Solution |
DetoxRuntimeError: App synchronization failed | Continuous background loops, animations, or timers blocking sync. | Disable indefinite timers in test mode or use device.disableSynchronization(). |
Cannot find simulator/emulator | Device name in detox configuration does not exist in local SDK. | Run xcrun simctl list or emulator -list-avds and update .detoxrc.js. |
Test failed: Element not found | Native view missing testID or collapsed in hierarchy. | Ensure testID is passed to the underlying native component and visible on screen. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

