Agent skill · Backend & API

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-rest --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 14 KB
Bundled scripts: none
Path: skills/api/api-rest/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Core Conventions
  3. Resource Naming
  4. HTTP Methods
  5. URL Structure
  6. Directory Structure
  7. Response Format
  8. Success Responses
  9. Error Responses
  10. Setup
  11. Error Utilities
  12. Validation Helpers
  13. Response Helpers
  14. Route Implementations
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
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.

Keep going