Skip to content
Development
Skill

/android-networking

Integrate Retrofit, OkHttp, and Kotlinx Serialization for type-safe API communication in Android. Use when building API clients, adding interceptors, or configuring network security—not standalone MockWebServer or API-test setup.

From plugin
agent-skills-standard
583200 skills21 agents33 commands1 MCP

Claude Code

$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill android-networking --agent claude-code

SKILL.md

android-networking.SKILL.md
name: android-networking
description: Integrate Retrofit, OkHttp, and Kotlinx Serialization for type-safe API communication in Android. Use when building API clients, adding interceptors, or configuring network security—not standalone MockWebServer or API-test setup.
metadata:
  triggers:
    files:
    - '**/*Api.kt'
    - '**/*Service.kt'
    - '**/*Client.kt'
    keywords:
    - Retrofit
    - OkHttpClient
    - "@GET"
    - "@POST"

Android Networking Standards

**Priority: P0 (CRITICAL)**

1. Configure HTTP Stack

  • Use **Retrofit 2** with **OkHttp 4** for all backend communication.
  • Use **Kotlinx Serialization** with `@SerialName` for JSON field mapping.
  • Implement **Certificate Pinning** for sensitive production domains.

See [setup & wrappers](references/implementation.md) for DTO and API examples.

2. Define API Endpoints

  • All API calls must `suspend` functions.
  • Declare endpoints only in API interface — handle errors in Repository.

See [setup & wrappers](references/implementation.md) for API endpoint definitions.

3. Add Cross-Cutting Concerns

  • Use OkHttp Interceptors for `Bearer token` injection and `HttpLoggingInterceptor` (debug only).
  • Wrap responses with `Result` wrapper or `Either` in Repository layer.
  • Define R8/ProGuard rules for Retrofit/OkHttp when `isMinifyEnabled = true`.
  • Use **MockWebServer** for unit/integration tests — cover 500, 401, 403 error cases.

Anti-Patterns

  • **No Blocking Network Calls**: All API functions must suspend.
  • **No Logic in API Interface**: Only declare endpoints — handle errors in Repository.
  • **No Raw Converter Factory**: Explicitly set "application/json" MediaType with kotlinx.serialization.

References

  • [Setup & Wrappers](references/implementation.md)
Read more
@hoangnguyen0403
Ships withagent-skills-standard

The portable standards layer for AI coding agents. Sync once, then work in your own runtime.

583200 skills21 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
583
Star history of hoangnguyen0403/agent-skills-standard on GitHub, a chart by star-history.com

Other skills on agent-skills-standard.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about android-networking.

Which coding agents can use android-networking?
android-networking installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.