Skip to content
Skill

Retrofit

Sets up outbound HTTP calls to third-party APIs with Retrofit, Moshi and OkHttp in Sankhya

Retrofit is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
7
Last commit
License
MIT
Listing updated

Similar skills

About Retrofit

This skill guides an agent through building an outbound HTTP integration inside a Sankhya Addon Studio 2.0 addon, where the addon acts as a client of an external REST or JSON API. It covers declaring the Retrofit, Moshi and OkHttp libraries as moduleLib dependencies in the module's Gradle file, writing a Retrofit client interface with Call return types, and wiring that client through a Guice custom module with a singleton provider.

The skill also explains how to create OkHttp interceptors for authentication, logging or headers, including the rule that only the first interceptor may be a component and later ones must be provided explicitly to avoid binding conflicts at deploy time. It offers two wiring options, a direct builder or a reusable factory, and common errors with their fixes, such as missing runtime classes or malformed JSON mapping.

The guidance is written for Java 8 with Lombok DTOs and ISO-8859-1 encoding, and it points to related skills for dependency injection, configuration values, testing with MockWebServer and error mapping.

When your agent uses it

Configura, revisa e debuga integração HTTP de saída em Sankhya Addon Studio — o addon como cliente de uma API de terceiro — usando Retrofit + Moshi + OkHttp — declara dependências `moduleLib` no `build.gradle`, escreve interface client (`@GET`/`@POST`/`@Body`/`@Path`/`@Query`/`@Headers`), faz wiring Guice via `@Provides @Singleton` em `@CustomModule`, cria interceptors OkHttp (autenticação, logging, headers). Use ao integrar API REST/JSON externa, ao consumir (não expor — expor endpoint do addon é `controller`), consumir endpoint de terceiro, adicionar lib Retrofit/Moshi/OkHttp, montar HTTP client, criar interceptor, ou diagnosticar `NoClassDefFoundError` runtime de classe Retrofit/OkHttp.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (17 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the addon-studio plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add snk-devcenter/addon-studio
/plugin install addon-studio@snk-devcenter

Or copy only this skill to ~/.claude/skills/retrofit:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/retrofit &&
cp -R "$tmp/plugins/addon-studio/skills/retrofit" ~/.claude/skills/retrofit &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/retrofit inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/retrofit to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/retrofit &&
cp -R "$tmp/plugins/addon-studio/skills/retrofit" ~/.agents/skills/retrofit &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/retrofit inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/retrofit to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/retrofit &&
cp -R "$tmp/plugins/addon-studio/skills/retrofit" ~/.cursor/skills/retrofit &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/retrofit inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/snk-devcenter/addon-studio.git --path plugins/addon-studio/skills/retrofit

Or copy the folder to ~/.gemini/skills/retrofit yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/retrofit:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/retrofit &&
cp -R "$tmp/plugins/addon-studio/skills/retrofit" ~/.copilot/skills/retrofit &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/retrofit inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git

Then copy addon-studio/plugins/addon-studio/skills/retrofit into your agent's skills folder as retrofit. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Gradle dependency setup
Declares Retrofit, Moshi, OkHttp and optional converters as moduleLib dependencies in the module build file.
Retrofit client interface
Shows how to annotate a client interface with HTTP verbs, path, query, header and body parameters.
Guice wiring
Explains providing a singleton client through a custom module, with a direct or factory-based approach.
OkHttp interceptors
Covers building authentication and header interceptors and ordering them in the request pipeline.
Error troubleshooting
Lists common runtime and mapping errors with causes and corrections.

Good for

  • Connect an addon to a third-party REST API that returns JSON
  • Add an authentication interceptor that sends a bearer token on each request
  • Set up a Retrofit client with Guice in a Sankhya addon module
  • Fix a NoClassDefFoundError for Retrofit or OkHttp classes at runtime
  • Map JSON fields to DTOs when a remote response uses different names

Retrofit FAQ

Which dependency scope should I use for Retrofit in an Addon Studio project?

Use only the moduleLib configuration in the module's build.gradle, not implementation, because the plugin adds the jar to compilation and packages it into the EJB.

Can I add more than one interceptor annotated as a component?

No. Only the first interceptor should be a component; later ones should be provided with @Provides @Singleton of their concrete type, otherwise Wildfly fails with a BindingAlreadySet error.

Why must Retrofit client methods return Call?

The skill sets the convention of returning Call<T> so the caller decides when to run it, typically with execute() for synchronous calls.

Does the skill cover exposing endpoints from the addon?

No. It is limited to consuming third-party APIs; exposing an addon endpoint is handled by a different controller skill.

How do I install Retrofit in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/retrofit to use it in all your projects, or to .claude/skills/retrofit in one project. Or install the addon-studio plugin, which includes it: /plugin marketplace add snk-devcenter/addon-studio, then /plugin install addon-studio@snk-devcenter.

Does Retrofit run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Retrofit?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Retrofit?

The closest alternatives to Retrofit are Dependency injection, Test, Sankhya js, Sankhya utils and API integration.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from snk-devcenter/addon-studio

  1. Adds dynamic search filters to Sankhya entity finders before the query runs

    • Open source
    • 7 GitHub stars
    • Developer tools
  2. Guides writing Sankhya commercial business rules with @BusinessRule for sales documents

    • Open source
    • 7 GitHub stars
    • Enterprise it
  3. Lets agents write, review and refactor Sankhya document callbacks with @Callback hooks

    • Open source
    • 7 GitHub stars
    • Developer tools
  4. Builds and reviews Sankhya REST endpoints with @Controller, DTOs and transactions

    • Open source
    • 7 GitHub stars
    • Developer tools
  5. Sets up global Sankhya exception handlers with rollback, error DTOs and HTTP status

    • Open source
    • 7 GitHub stars
    • Developer tools
  6. Generates Sankhya CRUD screens from table XML in datadictionary/ with no JS or HTML

    • Open source
    • 7 GitHub stars
    • Developer tools