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…
by 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
About this skill
API Endpoint Generator
Generate REST API endpoints following the project's established patterns.
Before Generating
- Read existing route files to understand the project's patterns
- Check for validation library usage (Zod, Joi, etc.)
- Identify the architecture pattern (layered, MVC, etc.)
Generation Template
For each new resource, create:
Route file (
src/routes/{resource}.ts)- Zod validation schemas
- Route handlers that parse and delegate
- NO business logic in routes
Service file (
src/services/{resource}Service.ts)- Business rules and validation
- Orchestration of repo calls
- Domain error throwing
Repo file (
src/repos/{resource}Repo.ts)- Data access only
- Prisma operations
- NO business logic
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.
- 01
Read - 02
Edit - 03
Write - 04
Bash - 05
Grep - 06
Glob
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
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…