OpenParable
Skip to content
← Back to skills

Permix

Development
permix

Permix is an Agent Skill for development published in the letstri/permix repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Applies Permix authorization once a schema exists: permix.check() paths and ReBAC callbacks, frontend bindings (permix/react, permix/vue, permix/solid, permix/svelte) with SSR dehydrate/hydrate for Next.js and TanStack Start, and server middleware (permix/express, hono, fastify, trpc, orpc, node, elysia). Use for anything past initial setup — checking permissions, gating UI, or protecting routes. For creating the schema and first `permix.setup()`, use permix-getting-started first.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/letstri/permix/blob/HEAD/permix/skills/permix/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/permix, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Permix — check, frontend, server

Assumes a permix instance already exists (see permix-getting-started). Load the reference file that matches the task instead of reading everything:

TaskReference
permix.check() paths, callbacks, ~all/~any, ReBAC/ABAC with entity data, isReadyreferences/check.md
React, Vue, Solid, or Svelte UI — PermixProvider, usePermix, createComponents, SSR dehydrate/hydrate for Next.js / TanStack Startreferences/frontend.md
Protecting Express, Hono, Fastify, tRPC, oRPC, Node, or Elysia routes — setupMiddleware, checkMiddlewarereferences/server.md

Rules that apply everywhere

  • Authorization must run on the server. Client-side check (React/Vue/Solid/Svelte) is UX only — mirror every path with checkMiddleware in references/server.md.
  • Use the same schema and path strings (post.update, not ad-hoc strings) across client hooks and server middleware, or types and behavior drift apart.
  • check before isReady throws PermixNotReadyError — gate UI with isReady/isReadyAsync, and call setupMiddleware before checkMiddleware on the server.
  • SSR hydrate alone is not enough. It only restores booleans; call setup again on the client for function-based/ReBAC rules — see the SSR section of references/frontend.md.