Oma mobile

From gracefullight/krds · View interactive version

Oma mobile is an AI agent skill from the GitHub repository gracefullight/krds. 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

Control-flow features

Structural Flow

Entry

  1. Identify target platform(s), screen/feature, architecture layer, and state boundary.
  2. Inspect existing mobile patterns and dependencies.
  3. Determine test level and verification environment.

Scenes

  1. PREPARE: Load app architecture, platform constraints, and acceptance criteria.
  2. ACQUIRE: Read existing widgets/screens, providers/blocs, API clients, and tests.
  3. ACT: Implement mobile UI, state, platform integration, offline handling, and tests.
  4. VERIFY: Run relevant unit/widget/integration/E2E checks.
  5. FINALIZE: Report behavior, platforms covered, and verification results.

Transitions

Failure and recovery

Exit

Logical Operations

Actions

| Action | SSL primitive | Evidence |

|--------|---------------|----------|

| Inspect mobile architecture | READ | Domain/data/presentation files |

| Select state and platform strategy | SELECT | Riverpod/Bloc and platform constraints |

| Implement mobile code | WRITE | Widgets, screens, providers, clients |

| Validate lifecycle and permissions | VALIDATE | Dispose, permissions, offline behavior |

| Call verification tools | CALL_TOOL | Tests, builds, Maestro |

| Report result | NOTIFY | Final summary |

Tools and instruments

Canonical workflow path

Use the configured code-intelligence provider to locate files and inspect symbols

or content. 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.

Then run the project's mobile verification commands, typically unit/widget tests and Maestro E2E for critical flows.

Resource scope

| Scope | Resource target |

|-------|-----------------|

| CODEBASE | Mobile source, tests, platform config |

| LOCAL_FS | Templates, snippets, resources |

| PROCESS | Build, test, emulator, simulator, E2E commands |

| NETWORK | Backend APIs when the feature integrates remotely |

Preconditions

Effects and side effects

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
  2. Riverpod/Bloc for state management (no raw setState for complex logic)
  3. Material Design 3 (Android) + iOS HIG (iOS)
  4. All controllers disposed in dispose() method
  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; verify supported target platforms (Swift iOS needs iOS only; Kotlin Android needs Android only)
  7. Use Maestro for E2E testing of critical user flows
  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, §10)
  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 §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

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.