zenstack-plugin-dev
Installation
SKILL.md
ZenStack V3 — Plugin Development
Plugins are a preview feature and may change in future releases.
A ZenStack plugin can extend the toolkit at three levels, independently or together:
- Schema (ZModel) — contribute custom attributes (e.g.
@password) and functions to the schema language. - CLI (code generation) — participate in
zen generateto emit artifacts from the schema. - Runtime (ORM) — install on the client to intercept queries, hook CRUD lifecycle events, transform SQL, add custom methods, or compute fields.
ZenStack's plugin replaces Prisma's generator. To declare/consume plugins in a schema see
zenstack-schema-modeling; this skill is about authoring them.
Packages: @zenstackhq/orm (runtime plugin types), @zenstackhq/sdk (CLI plugin types + ZModel
AST). Install the SDK as a dev dependency: npm install -D @zenstackhq/sdk.