zenstack-schema-modeling
zenstackhq/skills · skills.sh
Open source Repository Open in the app JSON README (API)
About
Skill publicada por zenstackhq/skills no skills.sh. Instale com: npx skills add zenstackhq/skills@zenstack-schema-modeling
Details
- Kind
- Agent skills
- Publisher
- zenstackhq
- Origin
- skillssh
- Category
- ferramentas
- Stars
- 3
- Forks
- 1
- Open pull requests
- 1
- Last push
- 2026-09-23T03:20:06Z
- Repository state
- ativo
- Language
- TypeScript
- License
- MIT
- Added
- 2026-10-07 05:18:28
- Updated
- 2026-10-07 05:18:28
- Origin id
zenstackhq/skills/zenstack-schema-modeling
README
# ZenStack Skills
[](https://skills.sh/zenstackhq/skills)
A collection of [Agent Skills](https://skills.sh) that teach AI coding agents how to build
applications with [ZenStack V3](https://zenstack.dev) — the TypeScript database toolkit with a
Prisma-compatible API, a built-in access-control engine, and a Kysely query-builder escape hatch.
Install these skills so your agent (Claude Code, Cursor, Codex, Copilot, and
[70+ others](https://github.com/vercel-labs/skills#supported-agents)) writes correct, idiomatic
ZenStack code instead of guessing.
## Install
Install all skills into your project:
```bash
npx skills add zenstackhq/skills
```
Install into your user/global directory (available across all projects):
```bash
npx skills add zenstackhq/skills -g
```
List the available skills without installing:
```bash
npx skills add zenstackhq/skills --list
```
Install only specific skills, to specific agents:
```bash
npx skills add zenstackhq/skills --skill zenstack-schema-modeling --skill zenstack-querying -a claude-code
```
Use a skill once without installing (pipes a generated prompt into your agent):
```bash
npx skills use zenstackhq/skills@zenstack-access-control | claude
```
## Skills
| Skill | What it covers |
| ----- | -------------- |
| [`zenstack-project-setup`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-project-setup/SKILL.md) | Installing ZenStack V3, scaffolding a project, the `zen` CLI, and logging. |
| [`zenstack-db-migration`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-db-migration/SKILL.md) | Database schema migrations: `zen migrate dev/deploy/reset/status/resolve`, `db push`/`pull`, seeding, and deployment-pipeline guidance. |
| [`zenstack-migrate-from-prisma`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-migrate-from-prisma/SKILL.md) | Migrating an existing Prisma project to ZenStack V3: dependencies, schema conversion, client swap, scripts, custom generators, and client extensions. |
| [`zenstack-migrate-from-v2`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-migrate-from-v2/SKILL.md) | Upgrading a ZenStack V2 project to V3: package renames, policy plugin, `post-update`/`before()`, types+mixins, server-adapter and TanStack Query hook changes. |
| [`zenstack-schema-modeling`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-schema-modeling/SKILL.md) | Authoring `.zmodel` schemas: models, fields, relations, enums, custom types & mixins, polymorphism, typed JSON, and computed fields. |
| [`zenstack-access-control`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-access-control/SKILL.md) | Access policies (`@@allow`/`@@deny`), the `auth()` function, field-level rules, post-update rules, and data validation. |
| [`zenstack-querying`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-querying/SKILL.md) | Creating the `ZenStackClient`, the Prisma-compatible ORM API, relation queries, transactions, the Kysely query builder, and error handling. |
| [`zenstack-crud-server`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-crud-server/SKILL.md) | Automatic CRUD web APIs ("Query as a Service"): RPC/REST handlers, server adapters (Express, Next.js, Fastify, Nuxt, SvelteKit, Hono, Elysia, TanStack Start), client SDKs (fetch-client, TanStack Query), and OpenAPI generation. |
| [`zenstack-plugin-dev`](https://github.com/zenstackhq/skills/blob/HEAD/skills/zenstack-plugin-dev/SKILL.md) | Developing plugins: custom ZModel attributes/functions, CLI code generators (`CliPlugin`), and runtime plugins (`$use`/`definePlugin` with `onQuery`/`onKyselyQuery`/`onEntityMutation`, client extension, computed fields). |
All skills target **ZenStack V3** (the current major line). The full product documentation lives at
[zenstack.dev/docs](https://zenstack.dev/docs).
## Repository layout
```
skills/
zenstack-project-setup/SKILL.md
zenstack-schema-modeling/SKILL.md
zenstack-access-control/SKILL.md
zenstack-querying/SKILL.md
zenstack-crud-server/SKILL.md
zenstack-plugin-dev/SKILL.md
zenstack-migrate-from-prisma/SKILL.md
zenstack-migrate-from-v2/SKILL.md
zenstack-db-migration/SKILL.md
```
Each skill is a directory containing a `SKILL.md` file with YAML frontmatter (`name`,
`description`) followed by the instructions an agent loads on demand. This is the structure the
[`skills` CLI](https://github.com/vercel-labs/skills) and [skills.sh](https://skills.sh) discover.
## References
The [`references/`](https://github.com/zenstackhq/skills/blob/HEAD/references) folder contains plain-markdown copies of the official ZenStack
documentation (`docs/docs` in the [`zenstack-docs`](https://github.com/zenstackhq/zenstack-docs)
submodule), with all Docusaurus/MDX scaffolding stripped. They're the source material the skills are
distilled from, kept in the repo so an agent can grep/read the full docs offline.
They're produced by [`scripts/generate-references.ts`](https://github.com/zenstackhq/skills/blob/HEAD/scripts/generate-references.ts):
```bash
# one-time: pull the docs + embedded code-repos submodules
git submodule update --init --recursive
# regenerate references/ from docs/docs
npm install
npm run generate:references # or: npx tsx scripts/generate-references.ts
```
The generator only reads `docs/docs` (not `versioned_docs`, `blog`, etc.), mirrors the directory
structure into `references/`, converts MDX components and admonitions to plain markdown, inlines
imported markdown partials, and — for `<StackBlitzGithub>` embeds — inlines the referenced source
files from `docs/code-repos` as fenced code blocks.
## Contributing
To add a skill, create `skills/<skill-name>/SKILL.md` with `name` and `description` frontmatter and
add a row to the table above. Validate it locally before publishing:
```bash
npx skills add ./ --list
```
## License
[MIT](https://github.com/zenstackhq/skills/blob/HEAD/LICENSE)