packtpublishing/the-claude-code-operating-model/api-generating

Claude Code and agent skill by packtpublishing/the-claude-code-operating-model

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

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.

Install

npx vskill@latest install packtpublishing/the-claude-code-operating-model/api-generating

SKILL.md

The same SKILL.md was published earlier as huangjia2019/claude-code-engingeering-en/api-generating.

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
  1. Service file (src/services/{resource}Service.ts)
  • Business rules and validation
  • Orchestration of repo calls
  • Domain error throwing
  1. Repo file (src/repos/{resource}Repo.ts)
  • Data access only
  • Prisma operations
  • NO business logic
  1. 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)

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/packtpublishing/the-claude-code-operating-model/api-generating/badge)](https://verified-skill.com/skills/packtpublishing/the-claude-code-operating-model/api-generating)

Something wrong with this skill or its page? Tell us.