retrofit

retrofit is a skill for Claude Code, Codex from snk-devcenter/addon-studio. It costs 183 tokens per session (4,122 once invoked), scanned A, original, MIT.

A pattern for making a Java application call an outside web API using Retrofit, Moshi, and OkHttp. A web API is a service that lets one application exchange data with another over HTTP.

In plain words
What is it for?
Use it to configure and review outgoing API calls, including GET and POST requests, request bodies, URL paths, query parameters, headers, JSON data, and HTTP interceptors.
Why use it?
It removes the need to design the HTTP connection, JSON conversion, dependency setup, and dependency-injection wiring from scratch. It also keeps the external-service call separate from the rest of the add-on.

Skill for Claude CodeCodex

Part of the addon-studio plugin — 23 skills, 6 agents, 1 hook shipped together

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.

agentmods
npx agentmods add skills/snk-devcenter/addon-studio/retrofit
Any agent
npx skills add snk-devcenter/addon-studio --skill retrofit
Clone the repo
git clone --depth 1 https://github.com/snk-devcenter/addon-studio

Made for: Claude Code, Codex.

Or install addon-studio, the plugin that ships this one along with the rest of its 23 skills, 6 agents, 1 hook.

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/snk-devcenter/addon-studio/retrofit.svg)](https://agentmods.dev/skills/snk-devcenter/addon-studio/retrofit)
Your own site
<a href="https://agentmods.dev/skills/snk-devcenter/addon-studio/retrofit"><img src="https://agentmods.dev/badge/skills/snk-devcenter/addon-studio/retrofit.svg" alt="Measured on agentmods" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00183 $0.04122
Opus 5 $0.00092 $0.02061
Sonnet 5 $0.00037 $0.00824
Haiku 4.5 $0.00018 $0.00412

Measured yesterday against content hash c015483ee3fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

plugins/addon-studio/skills/retrofit/SKILL.md · 432 lines

How it starts

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

Integração HTTP com Retrofit — Addon Studio 2.0

Stack oficial para integração HTTP externa: Retrofit + Moshi + OkHttp. Substitui HttpClient nativo, URLConnection, Apache HTTP Client.

Esta skill cobre: declaração de deps no Gradle, interface client, wiring Guice, interceptors. Decisões arquiteturais (factory wrapper vs builder direto, retry, URL dinâmica) são do projeto — a skill mostra patterns válidos sem opinar.


1. Dependências (build.gradle do módulo)

NÃO declarar no build.gradle raiz. Vai no build.gradle do módulo (model/build.gradle, etc.).

Use somente moduleLib — a configuração custom do plugin br.com.sankhya.addonstudio já adiciona o JAR ao classpath de compilação e empacota no EJB final. Não duplicar com implementation.

dependencies {
    // Retrofit + Moshi (JSON) — padrão para APIs REST.
    moduleLib 'com.squareup.retrofit2:retrofit:2.12.0'
    moduleLib 'com.squareup.retrofit2:converter-moshi:2.12.0'
    moduleLib 'com.squareup.moshi:moshi:1.15.2'

    // OkHttp — cliente HTTP subjacente (obrigatório).
    moduleLib 'com.squareup.okhttp3:okhttp:3.14.9'
}

Conversores opcionais

Conversor Quando usar Dependência
converter-moshi JSON (padrão) com.squareup.retrofit2:converter-moshi:2.12.0
converter-scalars Body String cru (SOAP/XML/texto) com.squareup.retrofit2:converter-scalars:2.12.0
converter-jaxb XML via JAXB usar fábrica externa (JaxbConverterFactory de pacote terceiro)

Para testes com MockWebServer, adicionar em testImplementation:

testImplementation 'com.squareup.okhttp3:mockwebserver:3.14.9'

2. Interface do client

Declare a API como interface anotada com Retrofit. Sempre retorno Call<T> (síncrono — executor trata .execute()).

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ParceiroApi {

    @GET("v1/produtos/{id}")
    Call<ProdutoDto> buscarProduto(@Path("id") Long id);

    @GET("v1/produtos")
    Call<ListaProdutosDto> listarProdutos(@Query("limit") Integer limit,
                                          @Query("offset") Integer offset);

    @POST("v1/pedidos")
    @Headers("Content-Type: application/json")
    Call<PedidoCriadoDto> criarPedido(@Body NovoPedidoDto pedido);
}

Read the full file on GitHub · 432 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. yesterday Changed · -1 lines c015483ee3fa
  2. 4d ago First seen · 433 lines · 183 tokens per session scan A 1e909a663da4

Subscribe to this mod's changes

retrofit is a skill published in the GitHub repository snk-devcenter/addon-studio (5 stars, last pushed today), licensed MIT. It adds 183 tokens to every session and 4,122 once invoked, about $0.0009 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens