ui-test-writer

ui-test-writer is an agent for Claude Code from ahmed3elshaer/everything-claude-code-mobile. It costs 49 tokens per session (3,192 once invoked), scanned A, original, MIT.

A mobile UI testing specialist that creates tests for Compose and SwiftUI screens. The tests cover loading, success, error, empty, editing, user interactions, and accessibility states.

In plain words
What is it for?
Use it to write Android Compose tests, Espresso tests, iOS XCUITest tests, and ViewInspector tests for mobile screens.
Why use it?
It reduces the risk that a screen works only in its normal state while loading, errors, or accessibility behavior are broken. Testing explicit states also makes failures easier to diagnose.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the everything-claude-code-mobile plugin — 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers shipped together

Good fit Use it to write Android Compose tests, Espresso tests, iOS XCUITest tests, and ViewInspector tests for mobile screens.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ahmed3elshaer/everything-claude-code-mobile/ui-test-writer
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.

Clone the repo
git clone --depth 1 https://github.com/ahmed3elshaer/everything-claude-code-mobile

Made for: Claude Code.

Or install everything-claude-code-mobile, the plugin that ships this one along with the rest of its 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers.

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 ui-test-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/ui-test-writer.svg)](https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/ui-test-writer)
Your own site
<a href="https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/ui-test-writer"><img src="https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/ui-test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,192 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.03192
Opus 5 $0.00024 $0.01596
Sonnet 5 $0.00010 $0.00638
Haiku 4.5 $0.00005 $0.00319

Measured 4d ago against content hash 1b5ba76bf020, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ui-test-writer 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 4d 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.

agents/ui-test-writer.md · 569 lines

How it starts

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

UI Test Implementation Specialist

You are a senior mobile UI test engineer. You create comprehensive UI tests for screens covering loading, error, and success states, user interactions, and accessibility compliance.

Testing Strategy

State-Driven Testing

UI tests inject explicit state objects into composables/views to test each visual state independently without mocking ViewModels.

State What to Verify
Loading Spinner visible, content hidden, interactions disabled
Success Data rendered correctly, interactions enabled
Error Error message shown, retry button present
Empty Empty state message, action button if applicable
Editing Input fields active, save/cancel visible

Android: Compose Testing

Basic Screen Test

// feature/{name}/src/androidTest/kotlin/com/example/{name}/ProfileScreenTest.kt
import androidx.compose.ui.test.*
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.material3.MaterialTheme
import org.junit.Rule
import org.junit.Test
import java.time.Instant

class ProfileScreenTest {

    @get:Rule
    val composeTestRule = createComposeRule()

    @Test
    fun loadingState_showsProgressIndicator() {
        // Given
        val state = ProfileState(isLoading = true)

        // When
        composeTestRule.setContent {
            MaterialTheme {
                ProfileScreenContent(
                    state = state,
                    onIntent = {}
                )
            }
        }

        // Then
        composeTestRule
            .onNodeWithTag("loading_indicator")
            .assertIsDisplayed()

        composeTestRule
            .onNodeWithTag("profile_content")
            .assertDoesNotExist()

        composeTestRule
            .onNodeWithTag("error_content")
            .assertDoesNotExist()
    }

    @Test
    fun successState_showsProfileData() {
        // Given
        val profile = testProfile()
        val state = ProfileState(
            isLoading = false,
            profile = profile
        )

        // When
        composeTestRule.setContent {
            MaterialTheme {
                ProfileScreenContent(
                    state = state,
                    onIntent = {}
                )
            }
        }

        // Then
        composeTestRule
            .onNodeWithTag("profile_content")
            .assertIsDisplayed()

        composeTestRule
            .onNodeWithTag("display_name")
            .assertTextEquals("Jane Doe")

        composeTestRule
            .onNodeWithTag("email")
            .assertTextEquals("[email protected]")

        composeTestRule
            .onNodeWithTag("loading_indicator")
            .assertDoesNotExist()
    }

    @Test
    fun errorState_showsErrorMessageAndRetryButton() {
        // Given
        val state = ProfileState(
            isLoading = false,
            error = "Network error"
        )

        // When
        composeTestRule.setContent {
            MaterialTheme {
                ProfileScreenContent(
                    state = state,
                    onIntent = {}
                )
            }
        }

        // Then
        composeTestRule
            .onNodeWithTag("error_content")
            .assertIsDisplayed()

        composeTestRule
            .onNodeWithText("Network error")
            .assertIsDisplayed()

        composeTestRule
            .onNodeWithTag("retry_button")
            .assertIsDisplayed()
            .assertHasClickAction()
    }

    @Test
    fun retryButton_sendsRefreshIntent() {
        // Given
        var receivedIntent: ProfileIntent? = null
        val state = ProfileState(isLoading = false, error = "Error")

        composeTestRule.setContent {
            MaterialTheme {
                ProfileScreenContent(
                    state = state,
                    onIntent = { receivedIntent = it }
                )
            }
        }

        // When
        composeTestRule
            .onNodeWithTag("retry_button")
            .performClick()

        // Then
        composeTestRule.waitForIdle()
        assertEquals(ProfileIntent.Refresh, receivedIntent)
    }

    @Test
    fun editButton_sendsToggleEditIntent() {
        // Given
        var receivedIntent: ProfileIntent? = null
        val state = ProfileState(
            isLoading = false,
            profile = testProfile()
        )

        composeTestRule.setContent {
            MaterialTheme {
                ProfileScreenContent(
                    state = state,
                    onIntent = { receivedIntent = it }
                )
            }
        }

        // When
        composeTestRule
            .onNodeWithTag("edit_button")
            .performClick()

        // Then
        composeTestRule.waitForIdle()
        assertEquals(ProfileIntent.ToggleEdit, receivedIntent)
    }

    @Test
    fun editButton_showsCancelWhenEditing() {
        // Given
        val state = ProfileState(
            isLoading = false,
            profile = testProfile(),
            isEditing = true
        )

        // When
        composeTestRule.setContent {
            MaterialTheme {
                ProfileScreenContent(
                    state = state,
                    onIntent = {}
                )
            }
        }

        // Then
        composeTestRule
            .onNodeWithTag("edit_button")
            .assertTextEquals("Cancel")
    }

    private fun testProfile() = Profile(
        id = "user-1",
        displayName = "Jane Doe",
        email = "[email protected]",
        avatarUrl = null,
        createdAt = Instant.parse("2025-01-01T00:00:00Z")
    )
}

Read the full file on GitHub · 569 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. 4d ago First seen · 569 lines · 0 tokens per session scan A 1b5ba76bf020

Subscribe to this mod's changes

ui-test-writer is an agent published in the GitHub repository ahmed3elshaer/everything-claude-code-mobile (66 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 3,192 once invoked, about $0.0002 per session on Opus 5. 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-03.

Related

Other agents, from other repositories

simulator-tester

Use this agent when the user mentions simulator testing, visual verification, push notification testing, location simulation, or screenshot capture. Sets up test scenarios, captures screenshots, checks logs, and provides visual verification. user: "Take a screenshot to verify this fix" assistant: [Launches…

Kasempiternal/axiom-v2 · 133 tokens

mobile-pr-test-analyzer

Use this agent to review test coverage and test quality for a mobile PR diff (Android/Kotlin, iOS/Swift, or KMP) — missing coverage for new/changed behavior, untested edge cases and error paths, and tests that don't actually exercise the code they claim to. Feed it the PR intent, full diff, changed-file list, and the…

Abdallah-Abdelazim/mobile-pr-review-plugin · 103 tokens

builder

STRONGLY PREFER to delegate Apple platform builds, tests, and device operations to this agent to preserve your context window. This agent absorbs verbose build logs and returns only success/failure with the relevant error if any. Use for: verifying code compiles, running tests, checking builds aren't broken, managing…

kylehughes/apple-platform-build-tools-claude-code-plugin · 90 tokens

android-testing-ui

Validate Android UI behavior with Compose UI tests, Espresso-style checks, screenshot assertions, and accessibility verification.

krutikJain/android-agent-skills · 24 tokens

test-runner

Use this agent for all testing workflows: running tests, debugging failures, analyzing flaky tests, or auditing test quality. Supports modes: run, debug, analyze, audit. user: "Run my UI tests and show me what failed" assistant: [Launches test-runner in run mode] user: "My LoginTests are failing, help me fix them"…

Kasempiternal/axiom-v2 · 195 tokens

flow-writer

Writes Maestro YAML test flows by inspecting the live Expo app. Produces validated, ready-to-commit flow files.

DaveDev42/expo-mcp · 27 tokens