跳到正文
cccskills
免费在 GitHub 公开

mobile-networking

Implements and reviews mobile API integration across Flutter, Android, iOS, React Native and Kotlin Multiplatform. Use for HTTP clients, pagination, request cancellation, concurrent token refresh, resumable uploads and WebSocket lifecycle. Durable offline mutation queues belong to mobile-offline-sync.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(6)

  • SKILL.md4.6 KB
  • references/android.md1.3 KB
  • references/flutter.md1.0 KB
  • references/ios.md1.2 KB
  • references/kotlin-multiplatform.md1.1 KB
  • references/react-native.md1.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Mobile Networking

Start from the project brief. Locate the actual client, request/response models, repository, session owner and nearest tests. Read the server contract or observed sanitized responses before designing pagination, retries or upload recovery. Preserve the requested audit/implementation scope.

Pick the reference

ProjectRead
Flutterreferences/flutter.md
Androidreferences/android.md
iOSreferences/ios.md
React Native / Exporeferences/react-native.md
Kotlin Multiplatformreferences/kotlin-multiplatform.md

Define the request contract

  • Record endpoint, method, identity, input bounds, response mapping, timeout/deadline, cancellation owner and observable failure. Keep transport details out of UI components.
  • Validate untrusted responses at the boundary. Distinguish transport, HTTP, decoding and domain failures without exposing bodies or credentials in user messages/logs.
  • Scope cache keys and in-flight results to the account, query and filters. An account change invalidates the old generation; late responses cannot write into the new account's store.
  • Propagate cancellation to the transport when supported and fence late completions regardless. Leaving a screen is not evidence that a mutation was rolled back on the server.

Recover without duplicating work

  • Treat a connection indicator as a hint; still handle request failure. Bound retries by attempt count/deadline, use backoff and honor applicable server retry instructions.
  • Retry reads when their semantics permit it. Replay a mutation only when its server contract makes replay safe, for example an idempotency key retained for the same logical operation. A timed-out purchase/upload may already have succeeded.
  • Coalesce refresh work for one active session. Waiting requests share its result, retry with a fresh credential at most within the declared budget, and do not recursively refresh a failing refresh endpoint.
  • Check session generation before persisting refreshed credentials or replaying requests. Logout/account switch cancels or invalidates the old refresh; do not resurrect that session. Distinguish invalid credentials from temporary network failure.
  • Use offline sync for durable queues, reconciliation and conflict resolution; use security auth guidance for the login protocol.

Pagination, transfers and real time

  • Follow the server's cursor/offset contract. Reset pagination on account/filter change, prevent overlapping page loads and handle an exhausted cursor explicitly. Do not infer the next cursor from item count unless the API specifies it.
  • Avoid buffering large files entirely in memory. Report progress from transferred bytes where available; cancellation and failure must release file/stream resources.
  • Resume only if the server protocol supports it. Persist the upload identity securely, query acknowledged state after interruption, handle expiry, and validate completion before publishing the resulting object. Background continuation depends on native OS APIs, not a timer.
  • Give a WebSocket one owner. Bound reconnection, refresh authentication appropriately, and specify missed-event recovery with the server (cursor/replay/snapshot). Reconnect alone does not recover events lost while suspended.

Verify and deliver

Test concurrent 401s, refresh failure, logout during refresh, late responses after account switch, timeout after server acceptance, malformed response, cancelled pagination, upload interruption and reconnect with missed events. Use a fake transport or local test server and virtual time for deterministic retries; test native background behavior separately.

Return the actual request/state contract, changed symbols, failure-to-UI mapping, tests run and unknown server guarantees. Reference background execution for scheduling and observability for sanitized diagnostics.

Official source: HTTP semantics, including idempotence and Retry-After.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audits and fixes mobile accessibility across Flutter, native Android, native iOS, React Native and Kotlin Multiplatform, including shared Compose UI and native hosts. Covers TalkBack/VoiceOver labels, roles, state, reading order, touch targets, text scaling, contrast and focus. Use for a11y audits, screen-reader bugs or accessible UI implementation.

中文简介正在准备中。当前显示原文说明。

wrsilva/reis-mobile72026年10月14日 更新

Builds native Android apps with the Android team's guides — Jetpack Compose UI, adaptive layouts, edge-to-edge, Compose styles, migrating XML views to Compose, Navigation 3 and predictive back; Android Gradle Plugin 9 upgrades, R8 keep rule analysis, profiling with Android Studio and Perfetto, and the Android CLI; Google Play policy compliance, Play Billing upgrades and the Engage SDK; Credential Manager restore and verified email; CameraX and Media3 Cast; App Functions and the ML Kit GenAI Prompt API; Wear OS, Android TV and display glasses. Use when writing, upgrading or auditing native Android (Kotlin) code for any of these topics, even if the user does not name the library.

中文简介正在准备中。当前显示原文说明。

wrsilva/reis-mobile72026年10月14日 更新

Designs and reviews mobile architecture across Flutter, native Android, native iOS, React Native and Kotlin Multiplatform. Covers state ownership, data flow, modules, dependency boundaries, navigation, offline data and KMP shared source sets versus host apps. Use when structuring a feature, choosing state management, refactoring layers or deciding where a real class or screen belongs.

中文简介正在准备中。当前显示原文说明。

wrsilva/reis-mobile72026年10月14日 更新

Implements and reviews mobile identity and session flows across Flutter, Android, iOS, React Native and Kotlin Multiplatform. Use for sign-in, passkeys, account recovery, provider linking, reauthentication, logout and concurrent refresh. Security audits belong to mobile-security; account deletion belongs to mobile-privacy.

中文简介正在准备中。当前显示原文说明。

wrsilva/reis-mobile72026年10月14日 更新

Reviews mobile code for production bugs across Flutter, native Android, native iOS, React Native and Kotlin Multiplatform, including KMP source-set and host API contracts. Covers lifecycle, concurrency, UI state and native boundaries with file:line evidence. Use for a code review, PR, project audit, quality check or /reis-mobile:review.

中文简介正在准备中。当前显示原文说明。

wrsilva/reis-mobile72026年10月14日 更新

Diagnoses build and runtime failures across Flutter, native Android, native iOS, React Native and Kotlin Multiplatform. Covers pub/Dart, Gradle/AGP, Xcode/CocoaPods, Metro, KMP source sets and iOS frameworks, crashes and deep links. Use for failing builds, app launches, stack traces or /reis-mobile:debug.

中文简介正在准备中。当前显示原文说明。

wrsilva/reis-mobile72026年10月14日 更新

查看 wrsilva 的全部技能

报告此技能的问题