What problem does it solve?
Adding a new backend endpoint in ryOS requires following many project-specific conventions—CORS handling, origin allowlisting, auth resolution, Zod validation, Redis key prefixes, rate limiting, and structured logging. This Skill encodes those conventions so new API routes under api/ are consistent and correct on the first pass.
Core Features & Use Cases
- Standardized Route Scaffolding: Guides creation of collection routes (
api/<feature>/index.ts) and item routes ([id].ts) wrapped in the shared apiHandler with typed Zod bodySchema validation.
- Auth & Rate Limiting: Applies the unified
request-auth modes (none, optional, required, admin) and counter-based rate limits via _utils/_rate-limit.ts with proxy-aware client IP detection.
- Testing & Docs Workflow: Directs integration tests under
tests/integration/api/ against the standalone Bun server and keeps docs/8.*.md contracts in sync.
- Use Case: You need a new authenticated POST endpoint that stores data in Redis. The Skill walks you through wrapping the handler in
apiHandler, validating input with Zod, rate-limiting by IP, and writing the matching integration test.
Quick Start
Ask the assistant to create a new authenticated POST API route under api/ for your feature using the apiHandler pattern with Zod validation and rate limiting.