Retrofit
Skill Randomguy01/claudekit/plugins/retrofit/skills/retrofit
Build and maintain a Retrofit HTTP client in a Java or Kotlin/Android app. Use this skill when the user defines a typed API interface and its request annotations (@GET/@POST, @Path, @Query, @Body, @Field, @Part, @Header); builds or configures a Retrofit instance; adds converters (Gson, Moshi, kotlinx.serialization, Jackson, XML, protobuf, scalars) or call adapters (RxJava, Guava, Scala, coroutine suspend); handles responses and error bodies; rewrites URLs or hosts at runtime; adds per-method logging or metrics via interceptors; or mocks a service for tests. Applies even when the user doesn't say "Retrofit" by name — e.g. "turn this REST API into a Kotlin interface," "call this JSON endpoint from Android," or "my @GET / suspend fun won't deserialize." Skip for raw OkHttp/HttpURLConnection work, Ktor, or non-JVM HTTP clients.From its SKILL.md
npx -y skills add Randomguy01/claudekit --skill retrofitAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.6 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Retrofit
Retrofit turns an HTTP API into a Java or Kotlin interface. Annotations on the interface methods describe how each request is built — URL and query parameters, request bodies, form and multipart data, headers — and the Retrofit class generates the implementation that performs the calls over OkHttp.
This skill is a router. Decide what the task needs, then read the matching file before writing or reviewing code:
references/*.md— task guides. How to declare requests and configure aRetrofitinstance. Read these first.recipes/*.md— worked solutions to specific, recurring problems (custom adapters, error bodies, mocking, logging). Read these when the task matches one.api/<package>/*.md— per-type API references. Exact annotation attributes, method signatures, and parameters. Read these when you need the precise contract of a specific type.
When in doubt, open the reference guide for the task, then drill into the api/ file for any type it links.
Reference guides (references/)
- New to Retrofit, or want the one-page picture of interface →
Retrofit.create→Call→references/introduction.md - Add Retrofit to a build (Gradle/Maven, version selection, R8/ProGuard) →
references/installation.md - Declare HTTP requests — methods,
@Path/@Query,@Body, form-encoded and multipart, headers, sync/async, Kotlinsuspend→references/declarations.md - Configure the
Retrofitinstance — converters (Gson, Moshi, kotlinx, XML, protobuf, scalars) and call adapters (RxJava, Guava, Scala, suspend) →references/configuration.md
Recipes (recipes/)
Converters
- One service mixes JSON and XML; pick the converter per method with a marker annotation →
recipes/json-and-xml-converters.md - Generalize that to any annotation → delegate-factory mapping →
recipes/annotated-converters.md - Read a structured error document out of a non-2xx response →
recipes/deserialize-error-body.md
Call adapters
- Return a custom type instead of
Call, with a callback that splits outcomes by status class →recipes/custom-call-adapter.md
Requests and hosts
- Switch the base URL / host at runtime without rebuilding Retrofit →
recipes/dynamic-base-url.md
Observability
- Attribute timing/metrics to the exact API method via the
Invocationrequest tag →recipes/invocation-metrics.md - Enable verbose logging on selected endpoints only, gated on a method annotation →
recipes/conditional-logging.md
Testing
- Back a service interface with fake data and simulated network behavior →
recipes/mock-service.md
API references (api/)
Each annotation, class, and interface has its own file. Filenames are the kebab-case form of the type name (@GET → get.md, Retrofit.Builder → retrofit-builder.md). Run ls api/<package>/ to discover the full set.
Core (api/retrofit2/)
retrofit.md— the access point; built withretrofit-builder.mdcall.md,callback.md,response.md— the request/response contract;http-exception.mdfor suspend-body failuresconverter.md,converter-factory.md,optional-converter-factory.md— body conversioncall-adapter.md,call-adapter-factory.md— adaptingCallto other return typesinvocation.md— per-call metadata tag;skip-callback-executor.mdto bypass the callback executor
Request annotations (api/retrofit2.http/)
- HTTP methods:
get.md,post.md,put.md,patch.md,delete.md,head.md,options.md,http.md - URL and parameters:
path.md,query.md,query-map.md,query-name.md,url.md - Bodies:
body.md,form-url-encoded.md,field.md,field-map.md,multipart.md,part.md,part-map.md,streaming.md - Headers and tags:
headers.md,header.md,header-map.md,tag.md
Converters (api/retrofit2.converter.*/)
One factory per serialization library: gson, moshi, kotlinx.serialization (as-converter-factory.md), jackson, protobuf, wire, scalars, simplexml, jaxb/jaxb3. The two delegating optional converters live under api/retrofit2.converter.guava/ and api/retrofit2.converter.java8/.
Call adapters (api/retrofit2.adapter.*/)
One factory per execution library: rxjava, rxjava2, rxjava3 (each with result.md), guava, java8, scala. RxJava and Guava adapters define their own http-exception.md.
Mocking (api/retrofit2.mock/)
mock-retrofit.md (+ mock-retrofit-builder.md), network-behavior.md, behavior-delegate.md, calls.md.
Read the api/ file when you need to confirm an annotation's attributes or a method's exact signature — not for how-to workflows, which live in references/ and recipes/.
What ships with it: 82 files
124.2 KB alongside SKILL.md, 1 of them executable
api/
- retrofit2.adapter.guava/guava-call-adapter-factory.md1.4 KB
- retrofit2.adapter.guava/http-exception.md564 B
- retrofit2.adapter.java8/http-exception.md564 B
- retrofit2.adapter.java8/java8-call-adapter-factory.md1.5 KB
- retrofit2.adapter.rxjava2/http-exception.md568 B
- retrofit2.adapter.rxjava2/result.md1.4 KB
- retrofit2.adapter.rxjava2/rxjava2-call-adapter-factory.md2.0 KB
- retrofit2.adapter.rxjava3/http-exception.md568 B
- retrofit2.adapter.rxjava3/result.md1.4 KB
- retrofit2.adapter.rxjava3/rxjava3-call-adapter-factory.md2.3 KB
- retrofit2.adapter.rxjava/http-exception.md566 B
- retrofit2.adapter.rxjava/result.md1.5 KB
- retrofit2.adapter.rxjava/rxjava-call-adapter-factory.md2.2 KB
- retrofit2.adapter.scala/scala-call-adapter-factory.md1.3 KB
- retrofit2/call-adapter-factory.md1.3 KB
- retrofit2/call-adapter.md1.4 KB
- retrofit2/callback.md1.2 KB
- retrofit2/call.md2.3 KB
- retrofit2/converter-factory.md2.7 KB
- retrofit2.converter.gson/gson-converter-factory.md2.3 KB
- retrofit2.converter.guava/guava-optional-converter-factory.md897 B
- retrofit2.converter.jackson/jackson-converter-factory.md2.1 KB
- retrofit2.converter.java8/java8-optional-converter-factory.md1.1 KB
- retrofit2.converter.jaxb3/jaxb-converter-factory.md1.4 KB
- retrofit2.converter.jaxb/jaxb-converter-factory.md1.4 KB
- retrofit2.converter.kotlinx.serialization/as-converter-factory.md1.6 KB
- retrofit2/converter.md674 B
- retrofit2.converter.moshi/moshi-converter-factory.md2.5 KB
- retrofit2.converter.protobuf/proto-converter-factory.md1.7 KB
- retrofit2.converter.scalars/scalars-converter-factory.md1.1 KB
- retrofit2.converter.simplexml/simple-xml-converter-factory.md1.9 KB
- retrofit2.converter.wire/wire-converter-factory.md1.7 KB
- retrofit2.http/body.md608 B
- retrofit2.http/delete.md554 B
- retrofit2/http-exception.md599 B
- retrofit2.http/field-map.md755 B
- retrofit2.http/field.md1.3 KB
- retrofit2.http/form-url-encoded.md588 B
- retrofit2.http/get.md620 B
- retrofit2.http/header-map.md1.2 KB
42 more files not listed here. See all 82 in the repository.