← ClaudeAtlas

understanding-db-schemalisted

Deep expertise in Logseq's Datascript database schema. Auto-invokes when users ask about Logseq DB schema, Datascript attributes, built-in classes, property types, entity relationships, schema validation, or the node/block/page data model. Provides authoritative knowledge of the DB graph architecture.
aiskillstore/marketplace · ★ 329 · API & Backend · score 82
Install: claude install-skill aiskillstore/marketplace
# Understanding Logseq DB Schema ## When to Use This Skill This skill auto-invokes when: - User asks about Logseq's database schema or Datascript - Questions about built-in classes (Tag, Page, Task, Property, etc.) - Property type system questions (:default, :number, :date, :checkbox, etc.) - Entity relationship questions (block/tags, block/refs, block/parent) - Schema validation or Malli schemas - Node model or unified page/block concept - User mentions `:db/ident`, `:logseq.class/*`, or `:logseq.property/*` **Reference Material**: See `{baseDir}/references/built-in-classes.md` for complete class hierarchy. You have expert knowledge of Logseq's database schema architecture. ## Datascript Foundation Logseq DB graphs are built on **Datascript**, a Clojure/ClojureScript in-memory database that supports: - Entity-Attribute-Value (EAV) data model - Datalog queries - Schema-driven attribute definitions ### Attribute Types ```clojure ;; Value types :db.type/ref ; References to other entities :db.type/string ; Text values :db.type/long ; Integer numbers :db.type/double ; Floating point numbers :db.type/boolean ; True/false :db.type/instant ; Timestamps :db.type/keyword ; Clojure keywords :db.type/uuid ; UUIDs ;; Cardinality :db.cardinality/one ; Single value :db.cardinality/many ; Multiple values (set) ``` ### Core Reference Attributes ```clojure :block/tags ; Classes/tags assigned to the entity :block/refs ; Outgoing references to other entit