mobile-verification
Skill66 starsChanged 6 months agoMITView on GitHub
Automated testing workflow with pass@k metrics for mobile development. Detects flaky tests and ensures code reliability.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- jeremyinthebay/relay-skillstheir own version, first seen Jul 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jeremyinthebay/relay-skills★ 1same 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 repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- examples/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/everything-mobile.mdcCursor rule
- accessibility-patternsSkill
- analytics-patternsSkill
- android-patternsSkill
- app-lifecycleSkill
- ci-cd-patternsSkill
- combine-frameworkSkill
- continuous-learningSkill
- continuous-learning-v2Skill
- core-dataSkill
- coroutines-patternsSkill
- deep-linkingSkill
- expect-actualSkill
- feature-builderSkill
- feature-flagsSkill
- gradle-patternsSkill
- image-loadingSkill
- ios-testingSkill
- jetpack-composeSkill
- kmp-diSkill
- kmp-navigationSkill
- kmp-networkingSkill
- kmp-repositoriesSkill
- koin-patternsSkill
- ktor-patternsSkill
- liquid-glassSkill
- localization-patternsSkill
- m3-expressiveSkill
- mobile-checkpointSkill
- mobile-compactionSkill
- mobile-instinct-v1Skill
- mobile-instinct-v2Skill
- mobile-memorySkill
- mobile-securitySkill
- mobile-testingSkill
- mvi-architectureSkill
- navigation-composeSkill
- offline-firstSkill
- pagination-patternsSkill
- push-notificationsSkill
- room-patternsSkill
- shared-coroutinesSkill
- shared-modelsSkill
- sqldelight-patternsSkill
- swift-patternsSkill
- swiftui-patternsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 227
Look for patterns in failures.
- Very specific: line 244
Add advanceUntilIdle() for coroutines
- Very specific: line 245
Add IdlingResource for network
- Very specific: line 247
Use @UiThreadTest for main thread work
- Distinctive: line 248
Add explicit waits for async operations
- Distinctive: line 262
Create checkpoint before verification:
- Distinctive: line 304
Start High, Go Low: Use k=5 for investigation, k=3 for routine
- Distinctive: line 305
Fix Flaky Fast: Don't tolerate flaky tests
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Mobile Verification Skill
Comprehensive testing workflow with pass@k metrics for Android development reliability.
Philosophy
Single test runs lie.
A test that passes once might fail tomorrow. Verification loops run tests multiple times to reveal:
- Flaky tests (timing issues, async problems)
- Intermittent failures (resource contention)
- Reliability trends (improving vs degrading)
Pass@k Explained
Pass@k = proportion of test iterations that passed
Pass@3(test) = tests_passed / 3
testLogin(): ✓✓✓ → Pass@3 = 3/3 = 1.0 (100%)
testLogout(): ✓✓✗ → Pass@3 = 2/3 = 0.67 (67%)
testRefresh(): ✗✗✗ → Pass@3 = 0/3 = 0.0 (0%)Verification Levels
Quick Verification (k=2)
Purpose: Fast feedback during development
Usage: /mobile-verify --k=2
Time: ~2 minutes
When: After small changes, before commitStandard Verification (k=3)
Purpose: Standard confidence level
Usage: /mobile-verify --k=3
Time: ~5 minutes
When: Before push, after feature completeThorough Verification (k=5)
Purpose: High confidence, flaky detection
Usage: /mobile-verify --k=5
Time: ~10 minutes
When: Before release, after refactorRelease Verification (k=10)
Purpose: Maximum confidence
Usage: /mobile-verify --k=10
Time: ~20 minutes
When: Production release, critical bugsTest Type Strategies
Unit Tests (JUnit)
Characteristics:
- Fast: ~1-2 seconds per test
- Isolated: No Android dependencies
- Reliable: Should be Pass@k = 1.0
Target Pass@k: ≥ 0.95 (95%)
Common Flaky Causes:
- Async operations without proper waiting
- Date/time dependencies
- Random data generation
- Static state leakage
Fix Strategies:
// Bad: Flaky
@Test
fun testLoadData() {
viewModel.loadData()
assert(viewModel.state.value is Loaded)
}
// Good: Stable
@Test
fun testLoadData() = runTest {
viewModel.loadData()
advanceUntilIdle()
assert(viewModel.state.value is Loaded)
}UI Tests (Espresso)
Characteristics:
- Slow: ~5-10 seconds per test
- Device-dependent: Need emulator/device
- Fragile: UI changes break tests
Target Pass@k: ≥ 0.80 (80%)
Common Flaky Causes:
- Idling resource not registered
- Animation interference
- Screen rotation
- Network timeouts
Fix Strategies:
// Register idling resources
@IdlingResource
val countingIdlingResource = CountingIdlingResource("api")
// Disable animations
@get:Rule
val disableAnimationsRule = DisableAnimationsRule()Compose Tests
Characteristics:
- Fast: ~1-3 seconds per test
- UI-level: Tests Composable behavior
- Modern: Uses Compose Testing framework
Target Pass@k: ≥ 0.90 (90%)
Common Flaky Causes:
- Recomposition timing
- State hoisting issues
- Animation interference
Fix Strategies:
@Composable
fun TestComposable(content: @Composable () -> Unit) {
CompositionLocalProvider(
LocalInspectionMode provides true
) {
content()
}
}Verification Workflow
During Development
# 1. Write test
# 2. Quick verify
/mobile-verify --class=NewTest --k=2
# 3. Fix if fails
# 4. Standard verify
/mobile-verify --class=NewTest --k=3Before Commit
# Verify changed modules only
/mobile-verify --module=$(git diff --name-only | head -1) --k=2Before Push
# Full verification
/mobile-verify --k=3Before Release
# Thorough verification with flaky detection
/mobile-verify --k=5 --flakyInterpreting Results
Pass@k Scores
| Score | Meaning | Action |
| 1.0 | Perfect | Celebrate |
| 0.8-0.9 | Excellent | Monitor |
| 0.6-0.7 | Good | Investigate |
| 0.4-0.5 | Fair | Fix needed |
| 0.0-0.3 | Poor | Block release |
Trends
Track pass@k over time:
Week 1: Pass@3 = 0.85
Week 2: Pass@3 = 0.87 ↗ Improving
Week 3: Pass@3 = 0.82 ↘ Degraded - investigate!
Week 4: Pass@3 = 0.88 ↗ RecoveredFlaky Test Patterns
| Pattern | Likely Cause |
| Fails on iteration 1 only | Cold start issue |
| Fails randomly | Async timing |
| Fails on specific iteration | Resource leak |
| Fails in parallel only | Shared state |
Fixing Flaky Tests
Step 1: Identify Pattern
/mobile-verify --flaky --k=10Look for patterns in failures.
Step 2: Add Diagnostics
@Test
fun flakyTest() = runTest {
val startTime = System.currentTimeMillis()
// ... test code ...
val duration = System.currentTimeMillis() - startTime
Log.d("Test", "Duration: $duration ms") // Check for timing issues
}Step 3: Apply Fix
Common fixes:
- Add
advanceUntilIdle()for coroutines - Add
IdlingResourcefor network - Disable animations for UI tests
- Use
@UiThreadTestfor main thread work - Add explicit waits for async operations
Step 4: Verify Fix
/mobile-verify --class=FixedTest --k=5Target: Pass@5 = 1.0
Integration
With Checkpoints
Create checkpoint before verification:
/mobile-checkpoint save pre-verify
/mobile-verify --k=3With Memory
Track pass@k in memory:
{
"test-coverage": {
"passAt3": 0.87,
"trend": "improving",
"flakyTests": []
}
}With Instincts
Learn testing patterns:
{
"id": "test-coroutine-async",
"description": "Always use runTest + advanceUntilIdle for ViewModel tests",
"confidence": 0.95
}Thresholds by Context
| Context | Pass@k Threshold | Rationale |
| Unit tests | 0.95 | Should be deterministic |
| UI tests | 0.80 | More fragile, device-dependent |
| Compose tests | 0.90 | Better than Espresso, more stable |
| Integration tests | 0.70 | Complex, more variables |
| E2E tests | 0.60 | Full system, many variables |
Best Practices
- Start High, Go Low: Use k=5 for investigation, k=3 for routine
- Fix Flaky Fast: Don't tolerate flaky tests
- Track Trends: Monitor pass@k over time
- Context Matters: UI tests can have lower thresholds than unit
- Block Release: Failed verification should block releases
Remember: A test that sometimes passes is worse than no test at all. It gives false confidence.
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.

