api-rest
REST API conventions for Next.js App Router with Zod validation and standardized error handling. This skill should be used when creating API routes, implementing CRUD operations, or establishing API patterns for a project.
npx skills add majiayu000/claude-skill-registry --skill api-rest --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# REST API Skill Conventions and patterns for building REST APIs in Next.js App Router with type-safe validation and consistent error handling. ## When to Use This Skill - Creating new API routes - Implementing CRUD operations - Setting up validation with Zod - Establishing error handling patterns - Designing resource endpoints ## Core Conventions ### Resource Naming **Resources are always plural**: | Resource | Endpoint | |----------|----------| | Project | `/api/projects` | | User | `/api/users` | | Task | `/api/tasks` | ### HTTP Methods | Method | Purpose | Example | |--------|---------|---------| | GET | Read | `GET /api/projects` | | POST | Create | `POST /api/projects` | | PATCH | Partial update | `PATCH /api/projects/:id` | | PUT | Full replace | `PUT /api/projects/:id` | | DELETE | Remove | `DELETE /api/projects/:id` | ### URL Structure ``` /api/{resource} # Collection /api/{resource}/{id} # Single item /api/{resource}/{id}/{sub-resource} # Nested resource ``` Examples: ``` GET /api/projects # List all projects POST /api/projects # Create project GET /api/projects/123 # Get project 123 PATCH /api/projects/123 # Update project 123 DELETE /api/projects/123 # Delete project 12
- When to Use This Skill
- Core Conventions
- Resource Naming
- HTTP Methods
- URL Structure
- Directory Structure
- Response Format
- Success Responses
- Error Responses
- Setup
- Error Utilities
- Validation Helpers
- Response Helpers
- Route Implementations
What does the api-rest skill do?
REST API conventions for Next.js App Router with Zod validation and standardized error handling. This skill should be used when creating API routes, implementing CRUD operations, or establishing API patterns for a project.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-rest --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
