android-retrofit

Configure Retrofit for Android with Hilt and repository error handling.

119|14|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/rcosteira79/android-skills --skill android-retrofit-rcosteira79
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-retrofit
Source: https://github.com/rcosteira79/android-skills/tree/main/skills/android-retrofit
Command: npx skills add https://github.com/rcosteira79/android-skills --skill android-retrofit-rcosteira79

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the setup and usage of Retrofit for network requests in Android applications, ensuring efficient and robust data fetching.

Core Features & Use Cases

  • Service Interface Definition: Define API endpoints using clear, suspendable functions.
  • Hilt Integration: Seamlessly integrate Retrofit with Hilt for dependency injection.
  • Error Handling: Implement resilient error handling at the repository layer to prevent network exceptions from reaching the UI.
  • Authentication: Easily add authentication tokens to requests using interceptors.

Quick Start

Use the android-retrofit skill to set up a GitHubService with Hilt and handle potential network errors.

Frequently Asked Questions about android-retrofit

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

FAQPage Schema
How do I configure Retrofit with Hilt for dependency injection in Android?

To configure Retrofit with Hilt, define your API service interfaces using suspend functions and set up a Hilt module to provide the Retrofit instance. This approach seamlessly integrates network requests into your Android dependency injection graph.

How do I handle Retrofit network errors in the Android repository layer?

Handle Retrofit network errors by implementing resilient error handling within the repository layer. This prevents network exceptions from reaching the UI, ensuring robust data fetching and response parsing across your Android application.

Can I use Kotlin coroutines suspend functions with Retrofit for Android networking?

Yes, you can use Kotlin coroutines suspend functions with Retrofit. The Skill defines API endpoints using clear suspendable functions, allowing you to manage network requests asynchronously within your Android networking architecture.

How do I add authentication tokens to Retrofit requests in Android?

Add authentication tokens to Retrofit requests by using interceptors. This method easily appends authentication credentials to your API interactions, securing the network calls managed by your Android application.

What is the best way to define API service interfaces for Android networking?

The best way to define API service interfaces is by using clear suspendable functions for your endpoints. This setup streamlines network calls and response parsing while supporting robust data fetching within your Android repository layer.