public-api-design

Solid

Designing and implementing public-facing APIs with versioning, self-service API key management, per-tier rate limiting, consumer-facing documentation, developer onboarding, and SDK patterns. Use when building API key self-service (user generates own keys in /settings), implementing rate limiting with sliding windows or token buckets, versioning REST or WebSocket APIs (v1 prefix), creating developer portals or quickstart guides, designing error response contracts, or planning deprecation policies. Also use when converting admin-only API key systems to user-facing self-service, building API usage dashboards, or implementing webhook delivery for external consumers. Even if the user just mentions "API keys", "developer portal", "rate limits per plan", "public API", or "API documentation", use this skill.

AI & Automation 3 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
20
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Public API Design ## Fail-Fast Rule If authentication fails, **return immediately** with a structured error. Never leak internal error details, stack traces, or database schemas in public API responses. Never serve stale or partial data without explicit quality flags. API consumers make automated trading decisions — wrong data is worse than no data. ## Cardinal Rule **The public API is a product, not an endpoint.** It needs versioning, documentation, rate limits, error contracts, deprecation policy, and developer experience design — not just working routes. An undocumented API with no error contract is a support ticket generator. ## Architecture: Admin Keys vs User Keys {{PROJECT_NAME}} currently has `api-keys.ts` with admin-only key management. The public API requires a second layer: **user self-service keys**. ``` ┌─────────────────────────────────┐ │ API Key Types │ ├─────────────────────────────────┤ │ │ │ Admin Keys (existing) │ │ ├── Managed via /admin panel │ │ ├── Full access (read/write) │ │ ├── Created by the Owner only │ │ └── Stored in AdminConfig │ │ │ │ User Keys (new) │ │ ├── Self-service via /settings │ │ ├── Scoped by user's tier │ │ ├── Rate limited per tier │ │ ├── Stored in Supabase │ │ └── Tied to user_id via RLS │ │ │ └─────────────────────────────────┘ ...

Details

Author
Canhada-Labs
Repository
Canhada-Labs/ceo-orchestration
Created
4 weeks ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category