Agent skill

Android Retrofit

by Moustachauve in Moustachauve/WLED-Android

Expert guidance on setting up and using Retrofit for type-safe HTTP networking in Android.

Apache-2.0Auto-check passedDevelopment

Install Android Retrofit

skills CLI
$ npx skills add Moustachauve/WLED-Android --skill android-retrofit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Moustachauve/WLED-Android android-retrofit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Moustachauve/WLED-Android.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/android-retrofit .claude/skills/android-retrofit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
android-retrofit
GitHub stars
169
Used in
2 other repos
Token cost
~1.2k tokens
SKILL.md length
265 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Expert guidance on setting up and using Retrofit for type-safe HTTP networking in Android.

  • Works in 7 steps: URL Manipulation → Request Body & Form Data → Header Manipulation → …
  • Tasks that involve Type safety
  • Reaches api.github.com
  • Tasks that involve gRPC and Protobuf

What it does

Android Retrofit is an agent skill from Moustachauve/WLED-Android. Expert guidance on setting up and using Retrofit for type-safe HTTP networking in Android. Covers service definitions, coroutines, OkHttp configuration, and Hilt integration.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Type safety and gRPC and Protobuf. It works with Android. The repository describes itself as: Native Android application for WLED. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Type safety
  • Tasks that involve gRPC and Protobuf

Example prompts

  • “/android-retrofit”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. URL Manipulation
  2. Request Body & Form Data
  3. Header Manipulation
  4. Kotlin Support & Response Handling
  5. Hilt & Serialization Configuration
  6. Error Handling in Repositories
  7. Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 7e164a8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Android Retrofit loads about 1.2k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 265 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Moustachauve/WLED-Android at commit 7e164a8, republished under its Apache-2.0 licence (© Moustachauve). 265 words, ~1,159 tokens.

Download SKILL.mdSave it as .claude/skills/android-retrofit/SKILL.md (or your agent's skills folder).
name
android-retrofit
description
Expert guidance on setting up and using Retrofit for type-safe HTTP networking in Android. Covers service definitions, coroutines, OkHttp configuration, and Hilt integration.

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.
kotlin
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.
kotlin
interface UserService {
    @POST("users/new")
    suspend fun createUser(@Body user: User): User

    @FormUrlEncoded
    @POST("user/edit")
    suspend fun updateUser(
        @Field("first_name") first: String,
        @Field("last_name") last: String
    ): User

    @Multipart
    @PUT("user/photo")
    suspend fun uploadPhoto(
        @Part("description") description: RequestBody,
        @Part photo: MultipartBody.Part
    ): User
}
3. Header Manipulation

Headers can be set statically for a method or dynamically via parameters.

  • Static Headers: Use @Headers.
  • Dynamic Headers: Use @Header.
  • Header Maps: Use @HeaderMap.
  • Global Headers: Use an OkHttp Interceptor.
kotlin
interface WidgetService {
    @Headers("Cache-Control: max-age=640000")
    @GET("widget/list")
    suspend fun widgetList(): List<Widget>

    @GET("user")
    suspend fun getUser(@Header("Authorization") token: String): User
}
4. Kotlin Support & Response Handling

When using suspend functions, you have two choices for return types:

  1. Direct Body (User): Returns the deserialized body. Throws HttpException for non-2xx responses.
  2. Response<User>: Provides access to the status code, headers, and error body. Does NOT throw on non-2xx results.
kotlin
@GET("users")
suspend fun getUsers(): List<User> // Throws on error

@GET("users")
suspend fun getUsersResponse(): Response<List<User>> // Manual check
5. Hilt & Serialization Configuration

Provide your Retrofit instances as singletons in a Hilt module.

kotlin
@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {

    @Provides
    @Singleton
    fun provideJson(): Json = Json {
        ignoreUnknownKeys = true
        coerceInputValues = true
    }

    @Provides
    @Singleton
    fun provideOkHttpClient(): OkHttpClient = OkHttpClient.Builder()
        .addInterceptor(HttpLoggingInterceptor().apply { level = HttpLoggingInterceptor.Level.BODY })
        .connectTimeout(30, TimeUnit.SECONDS)
        .build()

    @Provides
    @Singleton
    fun provideRetrofit(okHttpClient: OkHttpClient, json: Json): Retrofit = Retrofit.Builder()
        .baseUrl("https://api.github.com/")
        .client(okHttpClient)
        .addConverterFactory(json.asConverterFactory("application/json".toMediaType()))
        .build()
}
6. Error Handling in Repositories

Always handle network exceptions in the Repository layer to keep the UI state clean.

kotlin
class GitHubRepository @Inject constructor(private val service: GitHubService) {
    suspend fun getRepos(username: String): Result<List<Repo>> = runCatching {
        // Direct body call throws HttpException on 4xx/5xx
        service.listRepos(username)
    }.onFailure { exception ->
        // Handle specific exceptions like UnknownHostException or SocketTimeoutException
    }
}
7. Checklist
  • Use suspend functions for all network calls.
  • Prefer Response<T> if you need to handle specific status codes (e.g., 401 Unauthorized).
  • Use @Path and @Query instead of manual string concatenation for URLs.
  • Configure OkHttpClient with logging (for debug) and sensible timeouts.
  • Map API DTOs to Domain models to decouple layers.

© Moustachauve, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/android-retrofit of Moustachauve/WLED-Android.

Open the folder on GitHubat commit 7e164a8

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in Moustachauve/WLED-Android, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Android Retrofit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Android Retrofit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Android Retrofit this skillMoustachauve/WLED-Android1692 repos~1.2kAutomated safety check: PassApache-2.0
Kotlin SpecialistJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Typescript Prozebbern/claude-code-guide4.7k—~958Automated safety check: PassMIT
Senior Code Criticnekomangaorg/Neko2.8k—~1.8kAutomated safety check: PassApache-2.0
Subspace Buildsdallison/subspace104—~990Automated safety check: PassApache-2.0
Trpc Fullstacksickn33/agentic-awesome-skills47k2 repos~3.9kAutomated safety check: PassMIT

Similar skills

  • Kotlin Specialist

    Jeffallan/claude-skills

    Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint.

    12k GitHub stars~1.5k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Typescript Pro

    zebbern/claude-code-guide

    A skill your agent uses when building TypeScript applications requiring advanced type systems, generics, or full-stack type safety.

    4.7k GitHub stars~958 tokensUpdated today
    DevelopmentAuto-check passed
  • Senior Code Critic

    nekomangaorg/Neko

    Performs rigorous, adversarial senior-staff code reviews that ruthlessly uncover architectural anti-patterns, edge cases, lifecycle hazards, memory leaks, type-safety gaps, and performance pitfalls.

    2.8k GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Subspace Builds

    dallison/subspace

    Build and test Subspace across supported platforms and build systems.

    104 GitHub stars~990 tokensUpdated today
    Backend & APIsAuto-check passed
  • Trpc Fullstack

    sickn33/agentic-awesome-skills

    Build end-to-end type-safe APIs with tRPC — routers, procedures, middleware, subscriptions, and Next.js/React integration patterns.

    47k GitHub starsUsed in 2 repos~3.9k tokens
    Backend & APIsAuto-check passed
  • Zod

    jasonjgardner/blockbench-mcp-plugin

    Zod schema validation best practices for type safety, parsing, and error handling.

    500 GitHub starsUsed in 3 repos~1.4k tokens
    DevelopmentAuto-check passed

More from Moustachauve/WLED-Android

All 17 skills in this repo
  • Compose Performance Audit

    Moustachauve/WLED-Android

    Audit and improve Jetpack Compose runtime performance from code review and architecture.

    169 GitHub starsUsed in 3 repos~1.7k tokens
    Auto-check passed
  • Compose UI

    Moustachauve/WLED-Android

    Best practices for building UI with Jetpack Compose, focusing on state hoisting, detailed performance optimizations, and theming.

    169 GitHub starsUsed in 3 repos~676 tokens
    Auto-check passed
  • Gradle Build Performance

    Moustachauve/WLED-Android

    Debug and optimize Android/Gradle build performance. An agent skill from Moustachauve/WLED-Android.

    169 GitHub starsUsed in 3 repos~2k tokens
    Auto-check passed
  • Kotlin Concurrency Expert

    Moustachauve/WLED-Android

    Kotlin Coroutines review and remediation for Android. An agent skill from Moustachauve/WLED-Android.

    169 GitHub starsUsed in 3 repos~1.4k tokens
    Auto-check passed
  • Coil Compose

    Moustachauve/WLED-Android

    Expert guidance on using Coil for image loading in Jetpack Compose.

    169 GitHub starsUsed in 2 repos~789 tokens
    Auto-check passed
  • XML To Compose Migration

    Moustachauve/WLED-Android

    Convert Android XML layouts to Jetpack Compose. An agent skill from Moustachauve/WLED-Android.

    169 GitHub starsUsed in 2 repos~2.6k tokens
    Auto-check passed

Works with

Questions about Android Retrofit

What does Android Retrofit do?

Expert guidance on setting up and using Retrofit for type-safe HTTP networking in Android. Android Retrofit is an agent skill from Moustachauve/WLED-Android. Expert guidance on setting up and using Retrofit for type-safe HTTP networking in Android.

When should I use Android Retrofit?

Android Retrofit fits situations like: tasks that involve Type safety; tasks that involve gRPC and Protobuf.

How do I install Android Retrofit in Claude Code?

Run `npx skills add Moustachauve/WLED-Android --skill android-retrofit -a claude-code`. Or copy the skill folder (.github/skills/android-retrofit in Moustachauve/WLED-Android) into .claude/skills/android-retrofit in your project. Claude Code loads it when a task matches its description.

How do I install Android Retrofit in Codex?

Run `npx skills add Moustachauve/WLED-Android --skill android-retrofit -a codex`. Or copy the skill folder (.github/skills/android-retrofit in Moustachauve/WLED-Android) into .agents/skills/android-retrofit in your project. Codex loads it when a task matches its description.

Can I use Android Retrofit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Moustachauve/WLED-Android --skill android-retrofit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/android-retrofit, .gemini/skills/android-retrofit, .github/skills/android-retrofit and .opencode/skills/android-retrofit in your project.

What does Android Retrofit need to run?

SKILL.md names no scripts, command-line tools or credentials: Android Retrofit is instructions for the agent only.

Does Android Retrofit access the network?

SKILL.md names 1 domain. In commands or code: api.github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Android Retrofit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Android Retrofit use?

Android Retrofit is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Android Retrofit use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Android Retrofit?

Skills that share tags, products or a category with Android Retrofit: Kotlin Specialist (Jeffallan/claude-skills, 12k stars), Typescript Pro (zebbern/claude-code-guide, 4.7k stars), Senior Code Critic (nekomangaorg/Neko, 2.8k stars) and Subspace Builds (dallison/subspace, 104 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Android Retrofit?

Moustachauve (a GitHub user) maintains it in Moustachauve/WLED-Android, which has 169 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 10, 2026.

Source: Moustachauve/WLED-Android on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.