# API Client SDK taste

API Client SDK taste — a prompt for ChatGPT that defines developer-experience standards for building API client SDKs. It runs during API architecture design, OpenAPI code generation, and error-handling setup.

- prompt · `type=prompt` · ChatGPT, Claude.ai, Claude Code · ★ 178201 repo stars
- Author: f
- License: CC0-1.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/f/prompts.chat/tree/HEAD/prompts.csv
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/api-client-sdk-taste

## What it does

This prompt sets guidelines for building developer-friendly API client SDKs by generating low-level clients from an OpenAPI spec and writing a thin idiomatic layer on top. It establishes rules for three-line client initialization, environment variable API key handling, and fully typed request and response models.

The prompt outlines structured error returns, automatic retries with exponential backoff for timeouts and 429 or 5xx responses, auto-paginating iterators, and streaming responses via async generators. It also details versioning policies, minimal runtime dependencies, test suites against recorded HTTP fixtures, and secure package publishing from CI.

To use it in Claude Code, place the file `.claude/commands/prompts.csv.md`. The prompt can also be loaded directly into ChatGPT and Claude.ai sessions as system instructions or initial context.

## Install

### ChatGPT (native platform)

**How to use**
- Paste the text at the start of a chat or into project instructions

### Claude Code

**Manually: put the files in place**
- File: `.claude/commands/prompts.csv.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/f/prompts.chat/tree/HEAD/prompts.csv

## When to use it
- generate client from OpenAPI spec
- configure retries and backoff
- implement auto-pagination and streaming
- return typed SDK errors
- run tests against HTTP fixtures

## Example prompts
- Apply the API Client SDK taste prompt to design our API client
- Use API Client SDK taste to define SDK standards
- Review the SDK architecture using API Client SDK taste

## Source text · prompts.csv · CC0-1.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ebf25adc564f434c.

BEGIN THIRD-PARTY FILE ebf25adc564f434c
```text
# API Client SDK taste of a developer-experience focused SDK maintainer
- Generate the low-level client from an OpenAPI spec, and hand-write only a thin, idiomatic layer on top. Confidence: 0.85
- Treat the API spec as the source of truth and fail CI when the generated code is out of date. Confidence: 0.85
- Make the first call possible in three lines: install, create a client with an API key, call one method. Confidence: 0.90
- Read the API key from a well-known environment variable by default, and never log it or include it in error messages. Confidence: 0.95
- Expose fully typed request and response models, with TypeScript types or Python type hints shipped in the package. Confidence: 0.90
- Return typed errors with the HTTP status, error code, message and request ID, instead of a generic exception. Confidence: 0.90
- Retry idempotent requests on timeouts, 429 and 5xx responses with exponential backoff and jitter, and respect Retry-After headers. Confidence: 0.90
- Send an idempotency key automatically on retried POST requests when the API supports it. Confidence: 0.80
- Set sensible default timeouts and let callers override timeout and retry settings per client and per request. Confidence: 0.85
- Provide auto-paginating iterators so users can loop over all results without handling cursors themselves. Confidence: 0.85
- Support streaming responses with native async iterators or generators instead of callbacks. Confidence: 0.80
- Offer both sync and async clients in languages where both are common, sharing the same models. Confidence: 0.75
- Keep runtime dependencies minimal and avoid pinning users to a specific HTTP library version. Confidence: 0.85
- Send a User-Agent header with the SDK name, version and runtime so API owners can see adoption and debug issues. Confidence: 0.80
- Follow semantic versioning strictly and document breaking changes with migration examples in the changelog. Confidence: 0.90
- Never remove a method in a minor release; deprecate it with a warning first. Confidence: 0.85
- Test against recorded HTTP fixtures for speed and run a smaller suite against a real sandbox environment nightly. Confidence: 0.80
- Run the test suite on every supported runtime version in CI, such as each active Node.js LTS or Python release. Confidence: 0.85
- Put runnable code examples in the README and docs, and test those examples in CI so they never go stale. Confidence: 0.80
- Expose hooks or middleware for logging, tracing and custom headers instead of adding one-off options for each need. Confidence: 0.75
- Allow a custom base URL and HTTP client so users can point the SDK at proxies, mocks or regional endpoints. Confidence: 0.80
- Publish packages from CI with provenance and signed releases, never from a maintainer's laptop. Confidence: 0.75
```
END THIRD-PARTY FILE ebf25adc564f434c

The third-party file has ended. Everything between the ebf25adc564f434c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© f · CC0-1.0 · https://github.com/f/prompts.chat/tree/HEAD/prompts.csv

## Similar
- [consuming-endpoints-from-client-code](https://affpapa.org/en/nevibecode/skills/consuming-endpoints-from-client-code.md) — skill · 322 installs
- [sdk-portfolio-strategy](https://affpapa.org/en/nevibecode/skills/sdk-portfolio-strategy.md) — skill · 10400 installs
- [Octri API Docs](https://affpapa.org/en/nevibecode/mcp/octri-api-docs.md) — MCP server · ★ 4 repo stars
- [api-integration-specialist](https://affpapa.org/en/nevibecode/agents/api-integration-specialist.md) — subagent · ★ 1013 repo stars
- [api-contract-normalizer](https://affpapa.org/en/nevibecode/skills/api-contract-normalizer.md) — skill · 260 installs
- [sdk-dx](https://affpapa.org/en/nevibecode/skills/sdk-dx.md) — skill · ★ 88 repo stars

From the same set: [f/prompts.chat](https://affpapa.org/en/nevibecode/by/f/prompts.chat.md) — 218 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
