api-handler
CommunityAPI route patterns with safe validation.
Authorvassovass
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill standardizes API route creation by wrapping handlers with withApiHandler, ensuring consistent authentication, validation, and error handling across the /api layer.
Core Features & Use Cases
- Unified API route pattern: Use withApiHandler for GET, POST, PUT, DELETE endpoints to reduce boilerplate.
- Auth & validation baked in: Enforces defined auth levels and Zod-based input validation with automatic error responses.
- Return & error handling: Supports auto-wrapped responses or direct json/badRequest/forbidden with typed AppError errors for robust error reporting.
Quick Start
Create a new API route using withApiHandler and a validation schema; implement auth as required, and return a typed response.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: api-handler Download link: https://github.com/vassovass/scl-v3/archive/main.zip#api-handler Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.