agentsclimarketplace

Zodipus

Skill bratsos/zodipus/skills/zodipus

Prisma-to-Zod schema generator with composable Query Engine. Use when user mentions zodipus, prisma zod schemas, prisma validation, zod from prisma, query builders with zod, runtime database validation, or type-safe prisma queries.From its SKILL.md

Install
npx -y skills add bratsos/zodipus --skill zodipus

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.4 KB, as published. Nobody here has run it

Zodipus

Type-safe Zod schema generator for Prisma with composable Query Engine.

When to Apply

  • User mentions "zodipus" anywhere in conversation
  • User wants Zod schemas generated from Prisma
  • User needs runtime validation for Prisma queries
  • User asks about type-safe query builders
  • User has Prisma + Zod integration questions
  • User mentions "prisma-zod" or similar terms

Quick Routing

User IntentSkill
Install, setup, configure generatorzodipus-setup
Query engine, createRegistry, type-safe querieszodipus-query-engine
JSON fields, @zodSchema, custom schemaszodipus-custom-schemas
Errors, validation failed, not workingzodipus-troubleshooting
Migrate from other generatorszodipus-migration

Core Concepts

1. Generator

Zodipus is a Prisma generator that outputs Zod schemas:

generator zodipus {
  provider = "zodipus"
  output   = "./generated"
}

2. Clean Schemas

Generated schemas contain scalar fields only (no relations). This keeps validation fast and focused:

// Generated UserSchema validates: id, email, name, role, createdAt, updatedAt
// Does NOT include: posts, comments, profile (relations)
const user = UserSchema.parse(data);

3. Query Engine

Build composable queries with automatic validation:

import { createRegistry } from 'zodipus/queryEngine';
import { models, modelRelations } from './generated/generated-index';

const registry = createRegistry({ models, relations: modelRelations });
const userQuery = registry.createQuery('user');

const query = userQuery({
  select: { id: true, email: true },
  posts: { select: { title: true } }
});

const result = query.parse(await prisma.user.findFirst(query.query));
// Fully typed: { id: string; email: string; posts: { title: string }[] }

4. Custom JSON Schemas

Type Prisma JSON fields with @zodSchema:

model Post {
  /// @zodSchema PostMetadataSchema
  metadata Json?
}

Minimal Working Example

Step 1: Install

npm install zodipus zod

Step 2: Configure

generator client {
  provider = "prisma-client-js"
}

generator zodipus {
  provider = "zodipus"
  output   = "./generated"
}

model User {
  id    String @id @default(cuid())
  email String @unique
  name  String?
  posts Post[]
}

model Post {
  id       String  @id @default(cuid())
  title    String
  author   User    @relation(fields: [authorId], references: [id])
  authorId String
}

Step 3: Generate

npx prisma generate

Step 4: Use

import { UserSchema, PostSchema } from './generated';
import { createRegistry } from 'zodipus/queryEngine';
import { models, modelRelations } from './generated/generated-index';

// Direct validation
const user = UserSchema.parse(userData);

// Query with validation
const registry = createRegistry({ models, relations: modelRelations });
const query = registry.createQuery('user')({
  select: { id: true, email: true, name: true }
});

const users = await prisma.user.findMany(query.query);
const validated = query.array().parse(users);

Generated Files

After running prisma generate, Zodipus creates:

FileContents
enums.tsPrisma enums as Zod schemas
models.tsClean model schemas (no relations)
custom-schemas.tsPlaceholder for @zodSchema definitions
generated-relations.tsRelation metadata for Query Engine
generated-index.tsRe-exports and convenience exports

Priority Reference

PriorityFeatureWhen to Use
CriticalUserSchema.parse()Validate any model data
CriticalcreateRegistry()Set up Query Engine
Highquery.array().parse()Validate findMany results
Highquery.safeParse()Handle errors without throwing
Medium@zodSchema annotationType JSON fields
MediumrelationDepth configDeep nested queries
LowCLI inspect commandDebug schema issues

Quick Reference

See references/QUICK-REFERENCE.md for a complete cheat sheet.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.