permix
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, debug, configure, migrate, teach, or plan Permix type-safe permissions with current docs and a full usage guide. Use for permix, createPermix, setup, check, template, dehydrate, hydrate, isReady, isReadyAsync, ~all/~any, ValidateDefinition, Rules, ReBAC closures, permix/react, permix/vue, permix/solid, permix/svelte, permix/next, permix/tanstack-start, permix/express, permix/hono, permix/elysia, permix/fastify, permix/node, permix/server, permix/trpc, permix/orpc, permix/drizzle, permix/effect, and Permix v3 to v4 migration.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when work touches Permix permissions: definitions, setup/check, SSR hydration, UI adapters, server middleware, or v3→v4 …
- Very specific: line 14
Import path: permix (core) vs subpaths (permix/react, permix/next, permix/express, …).
- Distinctive: line 24
Prefer Permix v4 APIs (dot paths, action tuples).
- Very specific: line 25
Verify with typecheck plus focused setup/check tests (and middleware 403 paths when server-integrated).
- Very specific: line 34
Before any rules: check / dehydrate throw PermixNotReadyError (not false).
- Distinctive: line 43
Prefer repository-owned commands.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Permix
Use this skill when work touches Permix permissions: definitions, setup/check, SSR hydration, UI adapters, server middleware, or v3→v4 migration.
Workflow
- Inspect the local Permix surface:
- Package version (
permix@4.xpreferred; current stable snapshot 4.1.2). - Import path:
permix(core) vs subpaths (permix/react,permix/next,permix/express, …). - Definition shape: action tuples /
{ name, type, required? }vs legacy v3{ action, dataType }. - Where enforcement runs (server middleware vs client UX) and whether SSR dehydrate/hydrate is used.
- Package version (
- For day-to-day how-to, follow usage-guide.md first.
- Refresh docs when versions drift or the task is migration/SSR/integration-specific. Start from source-map.md.
- Route deeper detail:
- Core API, rules, check, template, ReBAC, errors: core-api.md.
- React/Vue/Solid/Svelte, Next, TanStack Start, hydration: frameworks-ssr.md.
- Express/Hono/Elysia/Fastify/Node/server/tRPC/oRPC/Drizzle/Effect: server-integrations.md.
- v3→v4 breaking changes: migration-v4.md.
- Prefer Permix v4 APIs (dot paths, action tuples). Treat client checks as UX only — enforce on the server.
- Verify with typecheck plus focused
setup/checktests (and middleware 403 paths when server-integrated).
Core Judgment
- Flow:
createPermix<Definition>()→setup(rules)→check('entity.action'[, data]). - Definitions are action lists (strings or
{ name, type?, required? }), optionally nested trees. - Rules are booleans or
(data?) => booleanclosures (capture the actor atsetuptime). checkreturnsboolean. Use callbacks for AND/OR; use'~all'/'~any'(or'post.~all') for aggregates.checkAsyncis removed in v4 —await isReadyAsync()thencheck().- Before any rules:
check/dehydratethrowPermixNotReadyError(notfalse). - Invalid path throws
PermixRuleNotDefinedError. - SSR:
dehydrate()→ JSON booleans (functions becomefalse) → clienthydrate→ mustsetup()again for function rules; hydrate alone does not setisReady. - Server: prefer per-request instances via integration middleware; do not share mutable singletons across concurrent requests.
- Security: server enforcement is mandatory; hide UI with client checks only.
- Engines: package declares
node: >=22. Optional peer deps only for the adapters you import.
Verification
Prefer repository-owned commands. For meaningful Permix work, cover the relevant subset:
- Typecheck paths (
$inferPath),required: truedata args, and sharedValidateDefinition/Rules. - Unit tests: allow/deny, entity-data rules with/without data,
~all/~any, callback composition, not-ready / missing-path errors. - SSR: dehydrate snapshot shape; client hydrate + re-
setup;isReadygating in UI. - Server:
setupMiddlewarethencheckMiddleware— assert 200 vs 403 /onForbidden. - Migration: no remaining
check('entity', 'action'),checkAsync, Better Auth plugin, orentity+actionUI props.
Report which checks ran, which did not, and any version assumptions that remain.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

