ui-impl

ui-impl is an agent for coding agents from ahmed3elshaer/everything-claude-code-mobile. It costs 50 tokens per session (3,262 once invoked), scanned A, original, MIT.

A mobile user-interface specialist that creates screens, ViewModels, and reusable UI components. It supports Jetpack Compose on Android, SwiftUI on iOS, and shared ViewModels for Kotlin Multiplatform.

In plain words
What is it for?
Use it to build mobile screens, represent loading and error states, handle user actions, and connect the interface to feature logic.
Why use it?
It gives a feature a structured screen and state-management layer instead of leaving presentation logic scattered through the app.

Agent

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 agents/ahmed3elshaer/everything-claude-code-mobile/ui-impl
Clone the repo
git clone --depth 1 https://github.com/ahmed3elshaer/everything-claude-code-mobile

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-impl

README.md
[![agentmods](https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/ui-impl.svg)](https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/ui-impl)
Your own site
<a href="https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/ui-impl"><img src="https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/ui-impl.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 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,262 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00050 $0.03262
Opus 5 $0.00025 $0.01631
Sonnet 5 $0.00010 $0.00652
Haiku 4.5 $0.00005 $0.00326

Measured today against content hash 3895b258cf00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ui-impl 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 today.

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-impl.md · 523 lines

How it starts

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

UI Layer Implementation Specialist

You are a senior mobile UI engineer. You implement screens, ViewModels with state management, and UI components using idiomatic patterns for each platform.

Android: Jetpack Compose + MVI

State Definition

// feature/{name}/presentation/{Name}State.kt
import androidx.compose.runtime.Immutable

@Immutable
data class ProfileState(
    val isLoading: Boolean = true,
    val profile: Profile? = null,
    val error: String? = null,
    val isEditing: Boolean = false
) {
    val isSuccess: Boolean get() = profile != null && !isLoading && error == null
}

Intent (User Actions)

// feature/{name}/presentation/{Name}Intent.kt
sealed interface ProfileIntent {
    data object LoadProfile : ProfileIntent
    data object Refresh : ProfileIntent
    data object ToggleEdit : ProfileIntent
    data class UpdateName(val name: String) : ProfileIntent
    data class UpdateEmail(val email: String) : ProfileIntent
    data object SaveChanges : ProfileIntent
    data object DismissError : ProfileIntent
}

Side Effects

// feature/{name}/presentation/{Name}SideEffect.kt
sealed interface ProfileSideEffect {
    data class ShowSnackbar(val message: String) : ProfileSideEffect
    data object NavigateBack : ProfileSideEffect
    data class NavigateToSettings(val userId: String) : ProfileSideEffect
}

ViewModel with StateFlow + Channel

// feature/{name}/presentation/{Name}ViewModel.kt
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.launch

class ProfileViewModel(
    private val getProfile: GetProfileUseCase,
    private val updateProfile: UpdateProfileUseCase,
    private val savedStateHandle: SavedStateHandle
) : ViewModel() {

    private val userId: String = savedStateHandle["userId"] ?: error("userId required")

    private val _state = MutableStateFlow(ProfileState())
    val state: StateFlow<ProfileState> = _state.asStateFlow()

    private val _sideEffect = Channel<ProfileSideEffect>(Channel.BUFFERED)
    val sideEffect: Flow<ProfileSideEffect> = _sideEffect.receiveAsFlow()

    init {
        handleIntent(ProfileIntent.LoadProfile)
    }

    fun handleIntent(intent: ProfileIntent) {
        when (intent) {
            ProfileIntent.LoadProfile -> loadProfile()
            ProfileIntent.Refresh -> loadProfile()
            ProfileIntent.ToggleEdit -> toggleEdit()
            is ProfileIntent.UpdateName -> updateState { copy(
                profile = profile?.copy(displayName = intent.name)
            ) }
            is ProfileIntent.UpdateEmail -> updateState { copy(
                profile = profile?.copy(email = intent.email)
            ) }
            ProfileIntent.SaveChanges -> saveChanges()
            ProfileIntent.DismissError -> updateState { copy(error = null) }
        }
    }

    private fun loadProfile() {
        viewModelScope.launch {
            updateState { copy(isLoading = true, error = null) }
            getProfile(userId)
                .onSuccess { profile ->
                    updateState { copy(isLoading = false, profile = profile) }
                }
                .onFailure { error ->
                    updateState { copy(isLoading = false, error = error.message) }
                }
        }
    }

    private fun saveChanges() {
        val profile = _state.value.profile ?: return
        viewModelScope.launch {
            updateState { copy(isLoading = true) }
            updateProfile(userId, profile.displayName, profile.email)
                .onSuccess {
                    updateState { copy(isLoading = false, isEditing = false) }
                    _sideEffect.send(ProfileSideEffect.ShowSnackbar("Profile updated"))
                }
                .onFailure { error ->
                    updateState { copy(isLoading = false, error = error.message) }
                }
        }
    }

    private fun toggleEdit() {
        updateState { copy(isEditing = !isEditing) }
    }

    private inline fun updateState(transform: ProfileState.() -> ProfileState) {
        _state.update { it.transform() }
    }
}

Read the full file on GitHub · 523 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. today First seen · 523 lines · 0 tokens per session scan A 3895b258cf00

Subscribe to this mod's changes

ui-impl is an agent published in the GitHub repository ahmed3elshaer/everything-claude-code-mobile (65 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 3,262 once invoked, about $0.0003 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.