
Android Retrofit
This handles the standard Retrofit setup you'll need for any modern Android app doing HTTP calls. It covers the practical stuff: dynamic URLs with path and query parameters, sending JSON bodies versus form data, header management both static and through interceptors, and proper Kotlin coroutines integration. The Hilt module example shows how to wire up OkHttp with logging and timeouts alongside kotlinx.serialization. The guidance on when to use Response<T> versus direct body types is actually useful, since that trips people up when they need to handle specific status codes. It assumes you're already sold on Retrofit and just want the current best practices without digging through Stack Overflow.
- skills.sh installs
- 495
- GitHub stars
- 1K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill android-retrofit --agent claude-codeInstalls into .claude/skills of the current project.
Files
Android Networking with Retrofit
Instructions
When implementing network layers using Retrofit, follow these modern Android best practices (2025).
1. URL Manipulation
Retrofit allows dynamic URL updates through replacement blocks and query parameters.
- Dynamic Paths: Use
{name}in the relative URL and@Path("name")in parameters. - Query Parameters: Use
@Query("key")for individual parameters. - Complex Queries: Use
@QueryMap Map<String, String>for dynamic sets of parameters.
interface SearchService {
@GET("group/{id}/users")
suspend fun groupList(
@Path("id") groupId: Int,
@Query("sort") sort: String?,
@QueryMap options: Map<String, String> = emptyMap()
): List<User>
}
2. Request Body & Form Data
You can send objects as JSON bodies or use form-encoded/multipart formats.
- @Body: Serializes an object using the configured converter (JSON).
- @FormUrlEncoded: Sends data as
application/x-www-form-urlencoded. Use@Field. - @Multipart: Sends data as
multipart/form-data. Use@Part.
Sponsors
Details
- Repository
- github.com/new-silvermoon/awesome-android-agent-skills
- Categories
- AI & Agent Building, Mobile Development
- First seen
- Jun 3, 2026
More from new-silvermoon/awesome-android-agent-skills
All 17- Coil Compose464
- Xml To Compose Migration451
- Compose Navigation438
- Rxjava To Coroutines Migration347
- Android Testing869
- Gradle Build Performance809
- Compose Ui760
- Android Gradle Logic738
- Android Architecture701
- Kotlin Concurrency Expert684
- Compose Performance Audit596
- Android Emulator Skill578
- Android Viewmodel576
- Android Coroutines569
- Android Accessibility560
- Android Data Layer531