Command Palette

Search for a command to run...

Back to skills
skill № 89778

api-generating

Generate REST API endpoints following project conventions. Activate when user asks to create a new API endpoint, add a route, or build a new API resource with…

FreeNo executable scripts
PacktPublishingby PacktPublishing★ 24 GitHub stars

Install api-generating in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

API Endpoint Generator

Generate REST API endpoints following the project's established patterns.

Before Generating

  1. Read existing route files to understand the project's patterns
  2. Check for validation library usage (Zod, Joi, etc.)
  3. Identify the architecture pattern (layered, MVC, etc.)

Generation Template

For each new resource, create:

  1. Route file (src/routes/{resource}.ts)

    • Zod validation schemas
    • Route handlers that parse and delegate
    • NO business logic in routes
  2. Service file (src/services/{resource}Service.ts)

    • Business rules and validation
    • Orchestration of repo calls
    • Domain error throwing
  3. Repo file (src/repos/{resource}Repo.ts)

    • Data access only
    • Prisma operations
    • NO business logic
  4. Test file (tests/{resource}.test.ts)

    • Happy path tests
    • Edge case tests
    • Error handling tests

Naming Conventions

  • Files: camelCase (orderService.ts)
  • Classes: PascalCase (OrderService)
  • Routes: kebab-case (/api/order-items)
  • Database: snake_case (handled by Prisma)

Allowed tools

Tools this skill is permitted to call.

  1. 01Read
  2. 02Edit
  3. 03Write
  4. 04Bash
  5. 05Grep
  6. 06Glob

Bundled files

  • templates/route.ts.template

FAQ

What does the api-generating skill do?

Generate REST API endpoints following project conventions. Activate when user asks to create a new API endpoint, add a route, or build a new API resource with CRUD operations.

How do I install the api-generating skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the api-generating skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare api-generating with