api-client-generator

api-client-generator is a skill for Claude Code, Codex from SkillMedev/skills. It costs 116 tokens per session (1,269 once invoked), scanned A, original, MIT.

A tool-assisted method for creating a typed software client from an OpenAPI or Swagger document, which describes how a web API works. Generated request methods and data types are kept separate from a custom network layer for timeouts, authentication, headers, and errors.

In plain words
What is it for?
Use it to generate or regenerate a typed client from a versioned API specification, configure shared request handling, or hand-write a small typed wrapper when no suitable specification exists.
Why use it?
It reduces drift between an API and the code that calls it, while keeping generated files safe to recreate when the specification changes. The custom wrapper lets shared request behavior be controlled in one place.

Skill for Claude CodeCodex

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

Good fit Use it to generate or regenerate a typed client from a versioned API specification, configure shared request handling, or hand-write a small typed wrapper when no suitable specification exists.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/skillmedev/skills/api-client-generator"><img src="https://agentmods.dev/badge/skills/skillmedev/skills/api-client-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00116 $0.01269
Opus 5.5 $0.00046 $0.00508
Sonnet 5.5 $0.00023 $0.00254
Haiku 4.5 $0.00012 $0.00127

Measured 1mo ago against content hash 16044aca8af9, 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-generator scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const res = await fetch(url, {
skills/api-client-generator/SKILL.md · 75 lines

How it starts

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

API Client Generator

Generate the API surface from the spec so types stay honest, then wrap the generated code in a transport layer you own for resilience.

Workflow

  1. Confirm a spec exists. If the API ships an OpenAPI/Swagger document, generate from it. If there is no spec, or the integration is a single endpoint, hand-write a small typed wrapper with the same transport in step 4 - skip codegen.
  2. Generate the client. Run a codegen tool (openapi-typescript-codegen, openapi-generator, oapi-codegen, or equivalent) to produce request methods plus request/response types. Pin the spec by version or hash so an upstream change surfaces as a reviewable diff, not a silent runtime surprise.
  3. Treat generated code as a build artifact. Commit it, regenerate it from the pinned spec, and never hand-edit it - edits get clobbered on the next regen.
  4. Wrap, don't modify. Inject a custom HTTP transport (the client's configurable fetch/http layer) instead of editing generated files. Put timeouts, auth, default headers, and logging in that one wrapper so every generated call inherits them and the generated layer stays regenerable.
  5. Set an explicit per-request timeout in the transport - generated clients usually default to none.
  6. Make errors typed. Map non-2xx responses to a discriminated error type - auth (401/403), not-found (404), validation (422), rate-limit (429), server (5xx) - and parse the API's structured error body into a typed shape so callers branch on a tag, not on parsed strings. Never let a non-2xx return a half-empty success object.
  7. Centralize config. Hold base URL, auth token refresh, and default headers in one configured instance; don't scatter raw fetch calls across the codebase.
  8. Optionally validate critical responses against the schema at runtime so spec drift fails loudly. Generated types describe the contract, not reality.
  9. Defer cross-cutting policy. Add the retry/backoff hook point in the transport, but get the backoff policy (exponential backoff, full jitter, Retry-After, retriable status codes, idempotency) from rate-limit-handler. Get cursor pagination and incremental sync from pagination-and-sync-engineer. This skill owns the generated surface and the transport seam, not those policies.

Read the full file on GitHub · 75 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. 1mo ago Changed · +2 lines 16044aca8af9
  2. 3mo ago First seen · 73 lines · 116 tokens per session scan A 4263c65a5f80

Subscribe to this mod's changes

api-client-generator is a skill published in the GitHub repository SkillMedev/skills (28 stars, last pushed 1mo ago), licensed MIT. It adds 116 tokens to every session and 1,269 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

api-client-generator compared with skills from other repositories

api-client-generator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-client-generatorSkillMedev/skillsSkill281mo agoMITA116Claude Code, Codex
add-matrixnanocoai/nanoclawSkill31ktodayMITA19Claude Code
laravel-specialistJeffallan/claude-skillsSkill13ktodayMITA86Claude Code
django-storages-s3Jeffallan/claude-skillsSkill13ktodayMITA138Claude Code
websocket-engineerJeffallan/claude-skillsSkill13ktodayMITA36Claude Code
cognitoitsmostafa/aws-agent-skillsSkill1.2ktodayMITA38Claude Code
snsitsmostafa/aws-agent-skillsSkill1.2ktodayMITA32Claude Code