retrofit

retrofit is a skill for Claude Code, Codex from piyushverma0/android-agent-skills. It costs 122 tokens per session (2,171 once invoked), scanned A, original, MIT.

A guide to using Retrofit, an Android library for calling web APIs, with OkHttp and Kotlin serialization to send and receive structured data.

In plain words
What is it for?
Use it when creating REST API clients with GET, POST, PUT, DELETE, PATCH, query parameters, paths, request bodies, headers, fields, or file uploads.
Why use it?
It helps prevent mistakes in API definitions, request annotations, authentication headers, data conversion, and error handling.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating REST API clients with GET, POST, PUT, DELETE, PATCH, query parameters, paths, request bodies, headers, fields, or file uploads.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/piyushverma0/android-agent-skills/retrofit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add piyushverma0/android-agent-skills --skill retrofit
Clone the repo
git clone --depth 1 https://github.com/piyushverma0/android-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for retrofit

README.md
[![agentmods](https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/retrofit/github.svg)](https://agentmods.dev/skills/piyushverma0/android-agent-skills/retrofit)
Your own site
<a href="https://agentmods.dev/skills/piyushverma0/android-agent-skills/retrofit"><img src="https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/retrofit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for retrofit

Your own site · 80×15
<a href="https://agentmods.dev/skills/piyushverma0/android-agent-skills/retrofit"><img src="https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/retrofit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,171 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00122 $0.02171
Opus 5 $0.00061 $0.01086
Sonnet 5 $0.00024 $0.00434
Haiku 4.5 $0.00012 $0.00217

Measured 11d ago against content hash 3a85280899dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

retrofit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/retrofit/SKILL.md · 281 lines

How it starts

The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Retrofit HTTP Networking

These rules cover the complete Retrofit setup — from interface definition to error handling.

Setup

[versions]
retrofit = "2.11.0"
okhttp = "4.12.0"
kotlinxSerialization = "1.7.3"

[libraries]
retrofit-core = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
retrofit-kotlin-serialization = { group = "com.squareup.retrofit2", name = "converter-kotlinx-serialization", version.ref = "retrofit" }
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
okhttp-logging = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }

[plugins]
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

Rule 1: Service interface — correct annotations

// ✅ Complete service interface
interface ItemApiService {
    // GET with path parameter
    @GET("items/{id}")
    suspend fun getItem(@Path("id") id: String): ItemDto

    // GET with query parameters
    @GET("items")
    suspend fun getItems(
        @Query("page") page: Int = 1,
        @Query("limit") limit: Int = 20,
        @Query("sort") sort: String = "created_at",
        @Query("order") order: String = "desc"
    ): PagedResponse<ItemDto>

    // POST with JSON body
    @POST("items")
    suspend fun createItem(@Body request: CreateItemRequest): ItemDto

    // PUT for full update
    @PUT("items/{id}")
    suspend fun updateItem(@Path("id") id: String, @Body request: UpdateItemRequest): ItemDto

    // PATCH for partial update
    @PATCH("items/{id}")
    suspend fun patchItem(
        @Path("id") id: String,
        @Body fields: Map<String, @JvmSuppressWildcards Any>
    ): ItemDto

    // DELETE
    @DELETE("items/{id}")
    suspend fun deleteItem(@Path("id") id: String): Unit

    // File upload
    @Multipart
    @POST("items/{id}/image")
    suspend fun uploadImage(
        @Path("id") id: String,
        @Part image: MultipartBody.Part
    ): ImageDto

    // Dynamic header
    @GET("user/profile")
    suspend fun getProfile(@Header("Authorization") token: String): UserDto
}

Read the full file on GitHub · 281 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 281 lines · 122 tokens per session scan A 3a85280899dd

Subscribe to this mod's changes

retrofit is a skill published in the GitHub repository piyushverma0/android-agent-skills (15 stars, last pushed 4mo ago), licensed MIT. It adds 122 tokens to every session and 2,171 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

android-ui-journey-testing

XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.

sickn33/agentic-awesome-skills · 27 tokens

Debroid CLI Debugger

Orchestrate headless Android debugging via JDWP. ACTIVATE this skill whenever asked to debug an Android application, set line or exception breakpoints, inspect runtime variables or Jetpack Compose state, step through execution, evaluate live expressions, watch fields, or diagnose runtime crashes.

PatilShreyas/debroid · 61 tokens

maui-networking-offline-data

Build MAUI networking and offline data. USE FOR: typed HttpClient, JSON serialization, Android 10.0.2.2, iOS simulator localhost, LAN/dev-tunnel fallback, debug cleartext, offline-first screens, SQLite/EF Core sync metadata, queues, encryption decisions, retries, cancellation. DO NOT USE FOR: auth redirects, Aspire…

dotnet/maui-labs · 87 tokens

maui-aspire-client

Connect MAUI apps to Aspire-hosted APIs. USE FOR: AddServiceDiscovery, typed HttpClient, https+http://apiservice, missing AppHost config on devices, Android emulator 10.0.2.2, iOS simulator localhost, physical-device LAN/dev-tunnel fallbacks, dev certs, Bearer handlers, debug-only cleartext. DO NOT USE FOR: offline…

dotnet/maui-labs · 100 tokens

network-tracing

Instrument API requests with spans and distributed tracing. Use when tracking request latency, correlating client-backend traces, or debugging API issues.

nexus-labs-automation/mobile-observability · 31 tokens

state-sync

When implementing offline-first features, handling optimistic updates, or building sync queues.

sawrus/agent-guides · 0 tokens