Models PocketBase backends: collections, relations, auth, API rules, migrations, and architecture. Use when designing schema, security rules, data modeling, choosing between hooks vs client access, or explaining PocketBase platform concepts — not for npm JS SDK code or pb_hooks.
68
82%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
PocketBase is a single-binary backend: SQLite database, REST + realtime API, auth, file storage, and admin UI.
Official docs: https://pocketbase.io/docs/
| Task | Skill |
|---|---|
| Design collections, rules, auth | pocketbase (this skill) |
| Browser/Node app calling PocketBase over HTTP | pocketbase-js-sdk |
Server-side hooks in pb_hooks/*.pb.js | pocketbase-jsvm |
| Superuser admin UI extensions (PB ≥0.37) | pocketbase-admin-plugins |
users) support registration, login, OAuth2, OTP._superusers); regular auth records live in auth collections.@request.auth.Rules control list/view/create/update/delete per collection. Write rules as filter expressions:
@request.auth.id != "" && @request.auth.id = user.id@request.auth — current authenticated record (or null).@collection.* — cross-collection lookups in rules.@request.auth.id != "" = any authenticated user.Two migration systems:
| Type | Location | Language | Use for |
|---|---|---|---|
| Go migrations | pb_migrations/ | Go (compiled into binary) | Core schema shipped with PocketBase |
| JS migrations | pb_migrations/*.js | JSVM (sync) | User/instance schema changes via FTP |
JS migrations run in the JSVM — see pocketbase-jsvm for constraints.
pb_data/storage/.pb_public/.PocketBase is designed for client → PocketBase communication with API rules enforcing security.
Avoid wrapping PocketBase in SvelteKit/Next.js server routes unless necessary:
When clients need elevated operations (payments, external APIs, admin-only mutations):
pb_hooks/ (pocketbase-jsvm)pb.send() (pocketbase-js-sdk)Do not instantiate the JS SDK inside hooks to call the same server — use $app APIs directly.
This monorepo is the PocketHost platform. For hosting-specific details (FTP dirs, instance URLs, limits), see pockethost-hosting.md.
6836588
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.