api-crud

Generate CRUD API layers for OpenOrder resources with Fastify, Prisma, and Zod.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/gunning4it/openorder --skill api-crud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-crud
Source: https://github.com/gunning4it/openorder/tree/main/.claude/skills/api-crud
Command: npx skills add https://github.com/gunning4it/openorder --skill api-crud

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automatically generates production-ready CRUD API endpoints for OpenOrder following established patterns with Fastify, Prisma ORM, Zod validation, and JWT authentication.

Core Features & Use Cases

  • Generates CRUD endpoints for OpenOrder modules using the project's patterns (Fastify, Prisma, Zod, JWT RBAC)
  • Validates inputs against shared-types schemas
  • Enforces restaurant ownership and role-based access control
  • Provides templates for service and routes to speed integration

Quick Start

Provide the resource name and desired actions, and the tool will generate the service and routes scaffolding following OpenOrder conventions.

Frequently Asked Questions about api-crud

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate CRUD API endpoints with Fastify and Prisma?

Generate CRUD API endpoints by providing a resource name and desired actions to automatically scaffold Fastify routes, Prisma ORM service layers, and Zod schema validation for create, read, update, and delete operations.

How do I enforce JWT RBAC and restaurant ownership checks in a Fastify API?

Enforce JWT RBAC and restaurant ownership verification by applying standardized access control checks within generated Fastify route handlers to ensure users only access their authorized restaurant resources.

Can I use Zod shared-types for API input validation in a Fastify backend?

Yes, you can validate API inputs using Zod shared-types schemas. The generated CRUD layers validate incoming request data against these shared schemas to ensure standardized error handling and type safety.

What is the best way to scaffold production-grade CRUD routes with standardized error handling?

Scaffold production-grade CRUD routes by generating service and route templates that automatically wire into server.ts with .js extensions, applying standardized error handling and Prisma ORM database operations.

Do I need Prisma and Zod schemas defined before generating CRUD API layers?

Yes, you need existing Prisma ORM models and Zod shared-types schemas defined. The generator imports these schemas to validate inputs and wire routes into server.ts following established backend patterns.

Why are my generated Fastify CRUD routes failing to import in server.ts?

Generated Fastify CRUD routes may fail to import if the .js extensions are missing or incorrectly resolved. The generator ensures all module imports use .js extensions to maintain strict ESM compatibility within server.ts.