Oma mobile

From gracefullight/stock-checker · View interactive version

Oma mobile is an AI agent skill from the GitHub repository gracefullight/stock-checker. Implement Flutter, React Native, native Swift, or native Kotlin Android apps. Use for mobile screens, widgets, platform integrations, and application data flows.

How to use this skill

Skill file

Mobile Agent - Cross-Platform Mobile Specialist

Scheduling

Goal

Build, modify, and verify cross-platform mobile application features with clean architecture, platform-appropriate UI, state management, performance, and E2E coverage.

Intent signature

When to use

When NOT to use

Expected inputs

Expected outputs

Dependencies

Structural Flow

Transitions

Failure and recovery

Exit

Logical Operations

Canonical workflow path

  1. Detect the platform and stack (see Stack Detection) and identify the target platform(s), screen or feature, architecture layer, state boundary, platform constraints, and acceptance criteria. State assumptions where a required SDK, permission, or API contract is unavailable.
  2. Locate files and inspect symbols or content with the configured code-intelligence provider. For Serena, use find_file, search_for_pattern, get_symbols_overview, and find_symbol. Native search is limited to the provider exclusions and non-code paths permitted by the project's search policy.
  3. Read the existing domain, data, and presentation code: widgets or screens, providers or blocs, API clients, tests, and dependencies.
  4. Implement the mobile UI, state, platform integration, offline handling, and tests, following the Guardrails. Check resource disposal, permissions, and offline behavior.

<!-- oma-docs:ignore-start -->

  1. Determine the test level and verification environment, then select the project's mobile verification commands (the verify: block of stack/stack.yaml when present, otherwise the variant's): typically unit/widget tests and E2E for critical flows. Run them only when the user or the active workflow requires it, never build unless the user asked for a build, and report what was not verified.

<!-- oma-docs:ignore-end -->

  1. Check the applicable checklist items and report the behavior, the platforms covered, what was verified, and what was not.

Resource scope and effects

Reads and edits mobile source, tests, and platform configuration; reads the stack reference, snippets, and resources. A change may affect permissions, app lifecycle, offline data, or performance. Test, emulator, simulator, and E2E commands run only when the user or the active workflow requires them; builds run only on explicit request. Backend APIs are called when the feature integrates remotely.

Guardrails

Apply framework, library, architecture, and data-model defaults only when the target project has no established choice. Scoped edits do not authorize a stack migration or unrelated infrastructure.

  1. Clean Architecture: domain -> data -> presentation (Swift native: App/Core/Features/Shared; Kotlin native: app/{ui,data,di} + api-client); business logic never lives in widgets, views, or composables
  2. State management is the variant's solution — Flutter: Riverpod/Bloc; React Native: Zustand + TanStack Query; Swift: @MainActor @Observable; Kotlin: @HiltViewModel + StateFlow. No raw setState or ad-hoc state for complex logic
  3. Material Design 3 (Android) + iOS HIG (iOS)
  4. Release resources with the platform's lifecycle: Flutter controllers in dispose(); React Native effect cleanups; Swift structured .task {}; Kotlin viewModelScope
  5. Use the platform transport with auth/retry/logging interception and offline handling: Flutter uses Dio, React Native uses axios behind TanStack Query, Swift uses generated Client middleware, and Kotlin uses Ktor plugins on the generated *Api client.
  6. 60fps target; cover the supported target platforms (Swift iOS needs iOS only; Kotlin Android needs Android only). Secrets live in secure storage only (flutter_secure_storage / Keychain / react-native-keychain / Android Keystore-backed storage) — never plain prefs or MMKV
  7. E2E for critical user flows: Maestro (Flutter / React Native / Kotlin) or XCUITest (Swift native)
  8. Swift native: SwiftUI + @MainActor @Observable view models (Observation framework, iOS 17+) — non-isolated VMs mutating observed state from a Task are a Swift 6 strict-concurrency error
  9. Swift native: use the existing API layer. When the project adopts OpenAPI generation, use its generated Client for covered endpoints; a UI-only edit does not introduce a generator.
  10. Swift native: when response caching is required, use the existing Repository cache; for a new hyperoslo/Cache implementation, use a ResponseCache actor — cache DECODED models (never HTTPBody), serve stale-while-revalidate on reads, invalidate keys on writes; view models depend on a protocol seam, not the concrete service (see variants/swift-ios/snippets.md §10)
  11. Swift native: follow App/Core/Features/Shared project layout
  12. Swift native: iOS Human Interface Guidelines for all UI decisions
  13. Swift native: XCTest or Swift Testing for units, XCUITest for critical flows; cancel work via structured .task {} (auto-cancels on disappear) — never in deinit, which is nonisolated and cannot touch @MainActor state under Swift 6 (isolated deinit requires Swift 6.2+)
  14. Swift native: restore edge swipe-back at the route layer — nav-bar-hidden screens (.toolbar(.hidden, for: .navigationBar)) lose it, so register push routes via a swipeBackDestination wrapper, not per-screen (see variants/swift-ios/snippets.md §9)
  15. Flutter: when offline response caching is required, use the existing repository cache; if adding Drift, read cached entities then revalidate (stale-while-revalidate), and invalidate/refresh affected rows on every write; cache decoded entities at the data layer, never at the Dio transport (see variants/flutter/snippets.md §3 and the Response Cache rules in variants/flutter/tech-stack.md)
  16. React Native: preserve the existing server-state layer; for TanStack Query with explicit staleTime/gcTime — invalidate affected query keys on every mutation, persist account-scoped cache to MMKV only when offline persistence is required; screens consume query/mutation hooks, never call axios directly (see variants/react-native/snippets.md)
  17. Kotlin native: Jetpack Compose + @HiltViewModel exposing one StateFlow<UiState> collected with collectAsStateWithLifecycle; network work in viewModelScope, CancellationException always rethrown
  18. Kotlin native: use the existing API layer. When the project adopts OpenAPI generation (org.openapi.generator, kotlin / jvm-ktor), call the generated *Api for covered endpoints and keep the Ktor engine (OkHttp on device, MockEngine in tests) injected where the client is constructed — Ktor is an engine-agnostic layer, not an OkHttp replacement; a UI-only edit does not introduce a generator (see variants/kotlin-android/snippets.md §1, §3)
  19. Kotlin native: when response caching is required, use the existing repository cache; for a new Room implementation cache DECODED models with explicit TTL, stale-while-revalidate on reads, upsert/delete on writes — never OkHttp Cache or Ktor HttpCache; view models depend on an interface seam, not the concrete repository (see variants/kotlin-android/snippets.md §4, §8)
  20. Kotlin native: follow the app/{ui,data,di} + api-client layout; type-safe Navigation Compose routes; Material Design 3; JUnit + ktor-client-mock contract tests, Compose UI tests or Maestro for critical flows

Stack Detection

<!-- oma-docs:ignore-start -->

  1. Project files first: detect the platform from Package.swift (Swift iOS), settings.gradle.kts + com.android.application (Kotlin Android), pubspec.yaml (Flutter), or package.json + react-native (React Native), and read the existing code.
  2. Stack reference second: use stack/ when it exists; otherwise the matching variants/<platform>/. /stack-set writes stack/ from the detected project, seeded from the variant, and oma verify agent mobile reads stack/stack.yaml. Treat either as supplementary reference for conventions and snippets — the project's own code wins.
  3. Neither applies: ask the user or suggest running /stack-set.

<!-- oma-docs:ignore-end -->

Stack-Specific Reference

File names are relative to the stack reference directory selected above. Load only the selected platform's files.

<!-- oma-docs:ignore-start -->

<!-- oma-docs:ignore-end -->

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.