Agent skill · Backend & API

api-route-scaffold

Create new Next.js API routes following project patterns. Use when user mentions "new endpoint", "add API", "create route", or "POST/GET handler".

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-route-scaffold-applelamps-grokify --agent claude-code

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

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/api/api-route-scaffold-applelamps-grokify/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

# Creating API Routes This project uses Next.js 16 App Router with a consistent API pattern across all routes. ## Instructions 1. **Create route file**: `app/api/<endpoint-name>/route.ts` 2. **Use this template**: ```typescript import { NextRequest, NextResponse } from 'next/server'; // CORS headers for cross-origin requests const corsHeaders = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type', }; export async function OPTIONS() { return NextResponse.json(null, { headers: corsHeaders }); } export async function POST(req: NextRequest) { try { const { /* destructure fields */ } = await req.json(); // Input validation if (!requiredField) { return NextResponse.json( { error: 'Field is required' }, { status: 400, headers: corsHeaders } ); } // Check required environment variables const apiKey = process.env.YOUR_API_KEY; if (!apiKey) { console.error('YOUR_API_KEY is not configured'); return NextResponse.json( { error: 'YOUR_API_KEY is not configured' }, { status: 500, headers: corsHeaders } ); } // Business logic here const result = await doSomething(); return NextResponse.json({ result }, { headers: corsHeaders });

What's inside
Steps it walks through
  1. Instructions
  2. Existing Endpoints Reference
  3. Examples
  4. Guardrails
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-route-scaffold skill do?

Create new Next.js API routes following project patterns. Use when user mentions "new endpoint", "add API", "create route", or "POST/GET handler".

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-route-scaffold-applelamps-grokify --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