android-networking-retrofit-okhttp
Android Networking Retrofit OkHttp
When To Use
- Use this skill when the request is about: retrofit android setup, okhttp interceptor android, api error mapping android.
- Primary outcome: Build Android networking stacks with Retrofit, OkHttp, interceptors, API contracts, and resilient error handling.
- Handoff skills when the scope expands:
android-serialization-offline-syncandroid-security-best-practices
Workflow
- Confirm the data source, persistence boundary, sync model, and device capability involved.
- Model contracts explicitly before wiring network, storage, media, or background APIs.
- Apply the recommended AndroidX or platform pattern with migration-safe defaults.
- Validate offline, retry, and process death behavior against the sample apps and scenarios.
- Escalate security, performance, or release risk to the linked supporting skills when needed.
Guardrails
- Prefer typed models and explicit serializers over ad-hoc maps or bundles.
- Keep background work idempotent and cancellation-aware.
- Do not leak storage, media, or networking details into presentation code.
- Treat user data durability, privacy, and migration paths as part of the implementation.
Anti-Patterns
- Blocking the main thread with disk or network calls.
- Treating retryable sync failures as terminal user-facing errors.
- Mixing cache models and wire models without a mapping layer.
- Requesting broad storage or notification capabilities when a narrower API exists.
Examples
Happy path
- Scenario: Model sync requests and network failures for task refresh.
- Command:
cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest
Edge case
- Scenario: Handle stale cache and retry behavior in the XML fixture.
- Command:
cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest
Failure recovery
- Scenario: Differentiate networking prompts from serialization, security, and offline-sync requests.
- Command:
python3 scripts/eval_triggers.py --skill android-networking-retrofit-okhttp
Done Checklist
- The implementation path is explicit, minimal, and tied to the right Android surface.
- Relevant example commands and benchmark prompts have been exercised or updated.
- Handoffs to adjacent skills are documented when the request crosses boundaries.
- Official references cover the chosen pattern and the main migration or troubleshooting path.
Official References
More from midudev/autoskills
bun
Use when building, testing, and deploying JavaScript/TypeScript applications. Reach for Bun when you need to run scripts, manage dependencies, bundle code, or test applications with a single unified tool.
14pydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
11react-hook-form
React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, and useFieldArray. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form handling (use react-19 skill for those).
10azure-deploy
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: \"run azd up\", \"run azd deploy\", \"execute deployment\", \"push to production\", \"push to cloud\", \"go live\", \"ship it\", \"bicep deploy\", \"terraform apply\", \"publish to Azure\", \"launch on Azure\". DO NOT USE WHEN: \"create and deploy\", \"build and deploy\", \"create a new app\", \"set up infrastructure\", \"create and deploy to Azure using Terraform\" — use azure-prepare for these.
8sqlalchemy-orm
SQLAlchemy Python SQL toolkit and ORM with powerful query builder, relationship mapping, and database migrations via Alembic
8clerk
Clerk authentication router. Use when user asks about adding authentication,
8