dev-api

Implements backend API conventions for Shopify Remix apps including webhooks, Prisma models, and background jobs.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/dan10002ht/shopify-template --skill dev-api-dan10002ht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-api
Source: https://github.com/dan10002ht/shopify-template/tree/main/.claude/skills/dev-api
Command: npx skills add https://github.com/dan10002ht/shopify-template --skill dev-api-dan10002ht

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @prisma/client, zod, node-cron, @shopify/shopify-app-remix, @remix-run/node, and includes references (resource) components.

What problem does it solve? Building backend code for Shopify apps involves many recurring decisions: how to structure webhook handlers, validate inputs, queue background work, and handle errors consistently. This Skill provides a complete set of backend conventions and ready-to-use code patterns so every API route, webhook, and job follows the same secure, idempotent, type-safe standards. ## Core Features & Use Cases - Webhook Handling: HMAC validation, Zod payload parsing, idempotency checks via webhook logs, and immediate 200 responses with async queue processing. - Data Layer Patterns: Prisma model helpers with soft deletes, multi-tenant shop scoping, transactions, and typed queries without raw SQL. - Infrastructure Without Redis: DB-based job queue with retries and exponential backoff, node-cron scheduled tasks, and in-memory rate limiting. - Use Case: When adding an orders/create webhook to your Shopify app, apply this Skill to generate a handler that validates the payload, skips duplicates, logs the event, and enqueues order processing instead of blocking the response. ## Quick Start Ask the AI to create a webhook handler or Prisma model for your Shopify app following the dev-api backend conventions.

Frequently Asked Questions about dev-api

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

FAQPage Schema
How do I handle Shopify webhooks in a Remix app?

Verify the webhook HMAC, validate the payload with a Zod schema, check for duplicates using a webhook log table keyed by shop, topic, and external ID, then respond 200 immediately. Queue heavy processing as a background job instead of blocking the response.

How to build a background job queue without Redis?

Use a database-backed JobQueue table with status, attempts, and runAt columns. Enqueue jobs as rows, process them in batches from a node-cron schedule, and retry failures with exponential backoff up to a max retry count.

Does Prisma support soft deletes and multi-tenant scoping?

Yes, implement soft deletes with a nullable deletedAt timestamp filtered in every query, and scope all queries by a shop domain column as the tenant key. Add composite indexes on shop plus frequently filtered columns like status.

How do I validate request data in Remix actions?

Define Zod schemas for each operation and parse FormData or JSON bodies at the boundary before any business logic runs. Return structured errors in the form { error: { code, message, details } } with appropriate HTTP status codes.

What are the limitations of in-memory rate limiting?

In-memory rate limiting only works for single-instance deployments since the counter store lives in process memory. It suits solo or small apps, but multi-instance deployments need a shared store such as Redis or a database-backed limiter.