stripe-inspired-api-design-rules
БесплатноБез исполняемых скриптовНе проверенJSON HTTP API design rules distilled from Stripe — resource modeling, identifier schemes, URL structure, request/response wire format, pagination, errors…
от pproenca★ 231 звезда на GitHubОб этом скилле
Stripe-Inspired API Design Best Practices
A reference distillation of the design conventions behind Stripe's API — the most widely admired and copied JSON HTTP API in the industry. Contains 52 actionable rules across 8 categories, prioritised by how irreversibly a wrong decision cascades through every endpoint, every SDK, and every client integration. Each rule explains the WHY, shows incorrect-vs-correct code, and links to the canonical source.
When to Apply
Reach for this skill when:
- Designing a new JSON HTTP API or a new endpoint on an existing one
- Reviewing an API design proposal, OpenAPI spec, or PR that adds/changes endpoints
- Debugging an integration where the "wrong" shape of the API is causing client bugs
- Auditing an API for naming consistency, error shape uniformity, or compatibility risks
- Producing an API design report (the kind your inspector tool emits —
Critical / Warning / Suggestion / Positive) - Picking between two designs and looking for an authoritative source to back the choice
- Onboarding to API design — these are the canonical patterns to internalise first
The rules are general — they apply to any JSON HTTP API, not just APIs imitating Stripe. Triggers include "API design", "OpenAPI", "endpoint", "schema", "webhook", "idempotency", "pagination", "API versioning", and reviews of YAML/JSON spec files.
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Resource Modeling & Identifiers | CRITICAL | resource- |
| 2 | URL Structure & HTTP Semantics | CRITICAL | url- |
| 3 | Request & Response Format | HIGH | format- |
| 4 | Errors & Status Codes | HIGH | error- |
| 5 | Idempotency & Safe Retries | HIGH | idem- |
| 6 | Versioning & Backwards Compatibility | HIGH | ver- |
| 7 | Naming, Polymorphism & Metadata | MEDIUM-HIGH | naming- |
| 8 | Authentication, Webhooks & Search | MEDIUM-HIGH | ops- |
Earlier categories cascade harder: a wrong choice in resource modeling (numeric IDs, no object discriminator) propagates to every endpoint forever; a wrong choice in webhook event naming is a single category to fix.
Quick Reference
1. Resource Modeling & Identifiers (CRITICAL)
resource-prefixed-string-ids— Use Prefixed String IDs for Every Resourceresource-object-discriminator— Include a Read-OnlyobjectDiscriminator on Every Resourceresource-opaque-ids— Treat IDs as Opaque Strings up to 255 Charactersresource-unix-seconds-timestamps— Use Unix Seconds (Integer) for All Datetimesresource-iso-date-only— Use ISO 8601 Date Strings for Date-Only Valuesresource-birthdate-hash— Represent Birth Dates as{day, month, year}Hashesresource-integer-minor-units— Use Integer Minor Units for Money, Never Floatsresource-currency-field-not-name— Colocate acurrencyField; Never Bake Currency into Field Namesresource-decimal-suffix-strings— Use_decimalString Suffix for Precise Decimals That Can't Be Integers
2. URL Structure & HTTP Semantics (CRITICAL)
url-plural-collections— Pluralize Collection URLs; Singularize Object Typesurl-post-for-updates— Use POST for Updates (Not PUT or PATCH)url-action-verbs-as-subpaths— Express Non-CRUD Actions as Imperative Sub-Pathsurl-no-bulk-endpoints— One Object Per Request — No Bulk Endpointsurl-version-in-path-and-header— Version in URL Path andStripe-VersionHeaderurl-dedicated-search-endpoint— Use a Dedicated/searchEndpoint for Complex Queries
3. Request & Response Format (HIGH)
format-form-encoded-requests— Accept Form-Encoded Requests, Always Return JSONformat-bracket-notation-nesting— Use Bracket Notation for Nested Fields in Form Bodiesformat-list-envelope— Return Lists in a{object, url, has_more, data}Envelopeformat-cursor-pagination— Paginate by Cursor (starting_after/ending_before), Not by Offsetformat-no-total-counts— Usehas_moreBoolean; Never Return Total Countsformat-expand-parameter— Exp
Установить stripe-inspired-api-design-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл stripe-inspired-api-design-rules?
JSON HTTP API design rules distilled from Stripe — resource modeling, identifier schemes, URL structure, request/response wire format, pagination, errors, idempotency, versioning, naming, webhooks, and authentication. Triggers on tasks involving OpenAPI specs, API design reviews, schema decisions, endpoint shaping, error envelope design, webhook delivery, or any "is this API well-designed" question. Apply when designing, reviewing, or refactoring a JSON HTTP API — even when the user doesn't mention Stripe by name, since the rules are general API-design principles distilled from the industry's most-copied reference.
Как установить скилл stripe-inspired-api-design-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл stripe-inspired-api-design-rules запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic