api-client

api-client is a skill for Claude Code, Codex from fmind/dot. It costs 16 tokens per session (770 once invoked), scanned A, original, MIT.

A guide for writing small, typed Python programs that call external web services through HTTP APIs. It covers request and response checks, pagination, time limits, retries, and error handling.

In plain words
What is it for?
Use it when an application must send requests to an external service and turn its responses into reliable Python data. It helps with authentication details, paged results, rate limits, timeouts, and validation.
Why use it?
It prevents API integrations from running without bounds, retrying unsafe operations, or accepting malformed responses. It also makes provider-specific failures easier to diagnose.

Skill for Claude CodeCodex

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

Good fit Use it when an application must send requests to an external service and turn its responses into reliable Python data. It helps with authentication details, paged results, rate limits, timeouts, and validation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fmind/dot/api-client
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 fmind/dot --skill api-client
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

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 api-client

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/api-client/github.svg)](https://agentmods.dev/skills/fmind/dot/api-client)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/api-client"><img src="https://agentmods.dev/badge/skills/fmind/dot/api-client/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 api-client

Your own site · 80×15
<a href="https://agentmods.dev/skills/fmind/dot/api-client"><img src="https://agentmods.dev/badge/skills/fmind/dot/api-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 770 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.00016 $0.00770
Opus 5.5 $0.00006 $0.00308
Sonnet 5.5 $0.00003 $0.00154
Haiku 4.5 $0.00002 $0.00077

Measured 8d ago against content hash 49f0b83f9cbc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-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 8d 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/api-client/SKILL.md · 38 lines

How it starts

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

API Client

Integrate the needed API operation with a small, testable boundary. Prefer an existing CLI or maintained SDK when it satisfies the contract; xh owns endpoint inspection and provider skills own their existing clients.

Workflow

  1. Choose the seam: reuse the project's client and sync/async model. Otherwise use HTTPX through uv with one owned client lifetime, explicit timeouts and pool limits, and typed request/response boundaries. Avoid a generic SDK framework for one endpoint.
  2. Bound the operation: cap pages, records, response bytes, concurrency, attempts, and elapsed time according to configuration. HTTPX read timeouts bound inactivity, not the total duration; enforce the operation's overall deadline separately.
  3. Control traversal: stop on terminal or repeated cursors, and report partial results explicitly when a limit is reached. Validate provider-returned next URLs before following them; do not send credentials to a new origin or follow redirects implicitly.
  4. Retry by meaning: retry only documented transient failures within the total deadline. Honor valid Retry-After; if waiting would exceed the remaining deadline, report exhaustion instead of retrying early. Otherwise use bounded backoff with jitter. Keep authentication, permission, validation, and malformed-success failures visible.
  5. Reconcile writes: reuse a stable provider-supported idempotency key for the same logical write. After a timeout or lost response, read authoritative operation state before retrying; without safe reconciliation or documented idempotency, return an explicit unknown outcome.
  6. Verify offline first: exercise the HTTPX test boundary, including limits and failures; then perform only the live reads or writes authorized for this integration. Poll asynchronous jobs with a bounded deadline and verify their terminal result.

Gotchas

  • Transport retries skip status codes: HTTPX transport retries cover only failed connects (ConnectError, ConnectTimeout); they do not implement status-code retries or safe replay of an uncertain write.
  • Bound streams while reading: enforce byte limits while reading and always close responses and clients, including cancellation paths. Checking size after buffering is not a memory bound.
  • Route credentials deliberately: keep TLS verification enabled and make proxy/environment behavior deliberate. Validate base URLs at the configuration boundary; log only redacted endpoint identities.
  • Never disguise errors as empty: an empty list must mean no records, not a swallowed 403, exhausted page budget, or failed parse. Preserve the original exception cause without including secrets.

Read the full file on GitHub · 38 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago Changed · -2 lines 49f0b83f9cbc
  2. 10d ago Changed 267253999406
  3. 11d ago Changed · -3 tokens per session 8a6ab360273b
  4. 29d ago Changed · +1 lines · -10 tokens per session 2488cfc8adf0
  5. 1mo ago Changed · +1 lines 9cf50e919f4a
  6. 1mo ago First seen · 38 lines · 29 tokens per session scan A 2a674446dd29

Subscribe to this mod's changes

api-client is a skill published in the GitHub repository fmind/dot (11 stars, last pushed 2d ago), licensed MIT. It adds 16 tokens to every session and 770 once invoked, about $0.0001 per session on Opus 5.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-09-10.