API Client SDK taste — промпт для ChatGPT: что делает и как установить
Промпт API Client SDK taste для ChatGPT задаёт стандарты разработки клиентских SDK API. Он включается при проектировании архитектуры, генерации кода из OpenAPI и настройке повторных запросов.
CC0-1.0 ★ 178 201 обновлён 2026-10-24
Открыть на GitHubЧто делает API Client SDK taste
Этот промпт задаёт правила создания клиентских SDK для API с упором на опыт разработчика. Он требует генерировать низкоуровневый код из спецификации OpenAPI и писать тонкую идиоматичную обертку поверх него. В правилах заложено создание клиента в три строки, работа с переменными окружения для ключей и строгая типизация запросов и ответов.
Промпт описывает обработку ошибок с кодами статуса, автоматические повторы идемпотентных запросов при таймаутах и кодах 429 или 5xx, а также пагинацию и потоковую передачу данных через асинхронные итераторы. Дополнительно прописываются требования к минимальным зависимостям, версионированию, тестам на зафиксированных HTTP-фиксачах и публикации релизов из CI с подтверждением происхождения.
Для работы с промптом в Claude Code используется файл .claude/commands/prompts.csv.md. Промпт также может быть запущен в ChatGPT и Claude.ai при передаче инструкций модели.
Какие задачи решает
- сгенерировать клиент из спецификации OpenAPI
- настроить повторы запросов и таймауты
- организовать пагинацию и потоковую передачу
- реализовать типизированные ошибки SDK
- настроить тесты по HTTP-фиксачам
Примеры запросов агенту
- Примени промпт API Client SDK taste для проектирования клиента OpenAPI
- Задай стандарты SDK по промпту API Client SDK taste
- Спроектируй клиент API по гайду API Client SDK taste
Как установить API Client SDK taste
Как использовать
Вставьте текст в начало диалога или в инструкции проекта
Вручную: положить файлы
.claude/commands/prompts.csv.mdВопросы об API Client SDK taste
Как установить API Client SDK taste в Claude Code?
Для установки в Claude Code используется файл .claude/commands/prompts.csv.md.
Что делает API Client SDK taste?
Промпт описывает требования к проектированию SDK клиентских библиотек API, включая генерацию кода из OpenAPI, типизацию, обработку ошибок, повторы запросов и версионирование.
На каких платформах работает API Client SDK taste?
Промпт запускается в ChatGPT, Claude.ai и Claude Code.
Исходный текст
prompts.csv · CC0-1.0
# 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
© f · CC0-1.0 · f/prompts.chat