Agent skill · software engineering · davila7
PocketBase Collections
Collection and schema design for PocketBase. Use when creating collections, designing schemas, adding fields, setting up relations, or choosing between base/auth/view collection types. Prevents wrong field types, documents zero-default behavior, and covers relation cascading.
Why this skill is useful
Provides specific collection and schema design patterns for PocketBase that the AI wouldn't reliably generate on its own.
What it needs
About 3k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.
What this skill does
PocketBase Collection & Schema Design Collection Types Base Collection Standard data collection. System fields: id, created, updated. Auth Collection Extends base with authentication. Additional system fields: email, emailVisibility, verified, password, tokenKey. Cannot delete system fields. Can disable email/password auth in collection options. View Collection Read-only, backed by a SQL SELECT query. No create/update/delete. Fields are auto-detected from the query. Useful for aggregations, joins, and computed views. View collections support API rules (list/view only) and can be used in relations. Field Types Type Go type Zero default Notes ------ --------- ------------- ------- text string "" min/max length, regex pattern editor string "" Rich text (sanitized HTML) number float64 0 min/max, noDecimal option bool bool false email string "" Auto-validated format url string "" Auto-validated format date string "" ISO 8601 (2024-01-01 00:00:00.000Z) select string/[]string ""/[] values list, maxSelect file string/[]string ""/[] maxSelect, maxSize, mimeTypes relation string/[]string ""/[] collectionId, cascadeDelete, maxSelect json any null Only type that can be null! maxSize autodate string auto onCreate/onUpdate modifiers password string "" Stored hashed, never returned in API Critical: all types default to their zero value, NOT null. Only json fields can be null. Field Modifiers Use in collection schema definitions: required — field cannot be empty/zero unique — unique constraint (composite via unique indexes) presentable — included in relation display hidden — excluded from API responses unless explicitly requested :autogenerate — for text fields: auto-generate value (e.g., slug from other field) Relation Patterns One-to-many Each post has one author. Query posts by author: author = "USERID". Many-to-many Multi-select relation. Filter: tags ?= "TAGID" (contains). Back-relations No explicit back-relation field needed. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills davila7/pb-collections