http_client

http_client is a skill for Claude Code, Codex from jkaninda/okapi-skills. It costs 0 tokens per session (1,697 once invoked), scanned A, original, MIT.

A small Go client for calling HTTP services, such as REST APIs that exchange data over web requests.

In plain words
What is it for?
Use it to send requests, add query values and middleware, decode JSON, XML, or YAML responses, and detect failed HTTP status codes.
Why use it?
It handles common request details such as authentication, time limits, retries, data encoding, and response decoding.

Skill for Claude CodeCodex

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/jkaninda/okapi-skills/http_client
Any agent
npx skills add jkaninda/okapi-skills --skill http_client
Clone the repo
git clone --depth 1 https://github.com/jkaninda/okapi-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 http_client

README.md
[![agentmods](https://agentmods.dev/badge/skills/jkaninda/okapi-skills/http_client.svg)](https://agentmods.dev/skills/jkaninda/okapi-skills/http_client)
Your own site
<a href="https://agentmods.dev/skills/jkaninda/okapi-skills/http_client"><img src="https://agentmods.dev/badge/skills/jkaninda/okapi-skills/http_client.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,697 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.00000 $0.01697
Opus 5 $0.00000 $0.00848
Sonnet 5 $0.00000 $0.00339
Haiku 4.5 $0.00000 $0.00170

Measured 4d ago against content hash 5303ff645ea0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

http_client 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 4d 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.

http_client/SKILL.md · 215 lines

How it starts

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

Okapi HTTP Client (okapi/client package)

github.com/jkaninda/okapi/client is a small fluent HTTP client with:

  • A request builder per verb
  • Default + per-request middleware chain
  • Built-in retry policy with exponential backoff
  • Body encoders for JSON, XML, YAML, form, multipart, raw
  • Response decoders driven by Content-Type
  • Zero dependency on the Okapi server package — usable against any REST API

Quick Start

import "github.com/jkaninda/okapi/client"

c := client.New("https://api.example.com",
    client.WithBearerToken(token),
    client.WithUserAgent("my-app/1.0"),
    client.WithTimeout(10*time.Second),
)

var user User
resp, err := c.Get("/users/42").
    WithContext(ctx).
    QueryParam("expand", "profile").
    Do()
if err != nil { return err }
if err := resp.Error(); err != nil { return err } // *client.HTTPError on non-2xx
if err := resp.JSON(&user); err != nil { return err }

Do() and Send() are aliases. For the common "do, decode, fail on non-2xx" path use Decode:

var user User
err := c.Get("/users/42").Decode(&user)

Decode chooses JSON / XML / YAML based on the response Content-Type.

Client Options

Option Purpose
WithHTTPClient(*http.Client) Provide a pre-configured http.Client (TLS, transport)
WithTimeout(d) Default per-request timeout
WithHeader(k, v) Add one default header
WithHeaders(map) Merge multiple default headers
WithBearerToken(token) Sets Authorization: Bearer <token>
WithBasicAuth(u, p) Sets Authorization: Basic ...
WithUserAgent(ua) Sets the default User-Agent
WithMiddleware(mw...) Append middleware to the chain
WithRetry(policy) Default retry policy

Request Builder

Each verb returns a *RequestBuilder:

resp, err := c.Post("/items").
    WithContext(ctx).
    Header("X-Trace-Id", traceID).
    QueryParam("dry_run", "true").
    JSONBody(Item{Title: "hello"}).
    Timeout(5*time.Second).
    Do()

Read the full file on GitHub · 215 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. 4d ago First seen · 215 lines · 0 tokens per session scan A 5303ff645ea0

Subscribe to this mod's changes

http_client is a skill published in the GitHub repository jkaninda/okapi-skills (3 stars, last pushed 19d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,697 tokens. 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

af-xdp

AFXDP skill for high-performance XDP sockets. Use when creating AFXDP sockets, configuring UMEM and XSK rings, XDPREDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AFXDP, xskumem, XDPREDIRECT, libbpf xsk, or zero-copy XDP.

mohitmishra786/low-level-dev-skills · 81 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

golang-patterns

Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.

affaan-m/ECC · 45 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

gen-test

Generate idiomatic tests for Go packages and handlers in the Meshery project.

meshery/meshery · 18 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens