Agent skill · Backend & API

api-routes

Generate secure TanStack Start API routes with authentication, rate limiting, validation, and proper error handling. Use when creating API endpoints, REST resources, or backend logic.

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

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

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

# API Route Generator Create production-ready API endpoints following this project's security-first patterns. ## Quick Start Template ```typescript import { createFileRoute } from '@tanstack/react-router' import { eq } from 'drizzle-orm' import { db } from '@/db' import { tableName } from '@/db/schema' import { errorResponse, requireAuth, simpleErrorResponse, successResponse, } from '@/lib/api' import { checkRateLimit } from '@/lib/rate-limit' export const Route = createFileRoute('/api/resource')({ server: { handlers: { GET: async ({ request }) => { try { // 1. Rate limiting const rateLimit = await checkRateLimit(request, 'api') if (!rateLimit.allowed) { return new Response( JSON.stringify({ error: 'Too many requests' }), { status: 429, headers: { 'Retry-After': String(rateLimit.retryAfter) }, }, ) } // 2. Authentication const auth = await requireAuth(request) if (!auth.success) return auth.response // 3. Business logic const items = await db.select().from(tableName) // 4. Success response return successResponse({ items }) } catch (error) { return errorResponse('Failed to fetch', error) } }, }, }, }) ``` ## Authentication Patterns ### User Authentication (any logged-in user) ```typ

What's inside
Steps it walks through
  1. Quick Start Template
  2. Authentication Patterns
  3. User Authentication (any logged-in user)
  4. Admin Authentication
  5. Optional Authentication (public with user context)
  6. Response Helpers
  7. Input Validation
  8. Required Fields
  9. Localized String Validation
  10. URL Parameter Validation
  11. CRUD Operations
  12. List with Pagination, Filtering, Sorting
  13. Create with Transaction
  14. Update (PATCH)
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-routes skill do?

Generate secure TanStack Start API routes with authentication, rate limiting, validation, and proper error handling. Use when creating API endpoints, REST resources, or backend logic.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-routes --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