android-retrofit

Implement type-safe Retrofit networking with coroutines and Hilt in Android apps.

1|2|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/jhparktime/OnGuard --skill android-retrofit-jhparktime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-retrofit
Source: https://github.com/jhparktime/OnGuard/tree/main/.claude/skills/android-retrofit
Command: npx skills add https://github.com/jhparktime/OnGuard --skill android-retrofit-jhparktime

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds type-safe, maintainable Android network layers using Retrofit, reducing boilerplate and runtime errors.

Core Features & Use Cases

  • Typed service definitions with Retrofit annotations for clear contracts
  • Coroutines support for asynchronous, cancellable network calls
  • OkHttp configuration & DI with Hilt for predictable, testable networking

Quick Start

Create a Retrofit service interface and initialize it with Hilt in your Android project.

Frequently Asked Questions about android-retrofit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement type-safe Android networking with Retrofit and coroutines?

Retrofit supports dynamic URL handling by allowing endpoint paths and base URLs to be configured at runtime. Combined with OkHttp interceptors, it manages dynamic headers and routing while maintaining type-safe service definitions.

How do I configure OkHttp interceptors and Hilt dependency injection for Retrofit?

OkHttp interceptors and Hilt dependency injection for Retrofit are configured by providing OkHttpClient and converter instances through Hilt modules. This setup ensures predictable, testable networking across multiple Android modules.

What is the best way to handle errors and request bodies in a Retrofit Android app?

Handling errors and request bodies in a Retrofit Android app involves configuring proper converters for serialization and enforcing suspend-based API calls. Resilient OkHttp layers catch failures, ensuring production-grade reliability for request and response models.

Does Retrofit work with Kotlin coroutines for asynchronous API calls?

Retrofit works seamlessly with Kotlin coroutines by enforcing suspend-based API calls in service interfaces. This integration provides asynchronous, cancellable network requests without blocking the main thread, ensuring maintainable network layers.