Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/aiskillstore-understanding-db-schema/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 11% | 0% |
This skill auto-invokes when:
: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.
Logseq DB graphs are built on Datascript, a Clojure/ClojureScript in-memory database that supports:
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)
clojure:block/tags ; Classes/tags assigned to the entity :block/refs ; Outgoing references to other entities :block/alias ; Alternative names for a page :block/parent ; Parent block in hierarchy :block/page ; Page containing this block
:logseq.class/Root
├── :logseq.class/Page
├── :logseq.class/Tag (classes themselves)
├── :logseq.class/Property
├── :logseq.class/Task
│ └── Status, Priority, Deadline, Scheduled
├── :logseq.class/Query
├── :logseq.class/Asset
├── :logseq.class/Code-block
└── :logseq.class/TemplateAll non-Root classes extend :logseq.class/Root via :logseq.property.class/extends.
| Type | Validator | Closed Values | Use Case | |------|-----------|---------------|----------| | :default | text-entity? | ✅ | Text blocks with titles | | :number | number-entity? | ✅ | Numeric values | | :date | date? | ❌ | Journal page entities | | :datetime | datetime? | ❌ | Time-based scheduling | | :checkbox | boolean? | ❌ | Toggle properties | | :url | url-entity? | ✅ | URL strings or macros | | :node | node-entity? | ❌ | Block/page references | | :class | class-entity? | ❌ | Class entities |
clojure{:db/ident :user.property/my-property :logseq.property/type :default ; Property type :logseq.property/cardinality :one ; :one or :many :logseq.property/hide? false ; Hide by default :logseq.property.ui/position :properties ; UI placement :logseq.property/closed-values [...] ; Restricted choices :logseq.property/schema-classes [...] ; Associated classes :block/title "My Property"} ; Display name
| Namespace | Purpose | Example | |-----------|---------|---------| | logseq.property | Core system properties | :logseq.property/type | | logseq.property.class | Class-related | :logseq.property.class/extends | | logseq.property.table | Table views | :logseq.property.table/columns | | user.property | User-defined | :user.property/author | | plugin.property | Plugin-defined | :plugin.property/custom |
clojure;; Version format {:major 65 :minor 12} ;; Stored in :logseq.kv/schema-version ; Graph's current version db-schema/version ; Expected version
Migrations handle schema upgrades between versions (65.0 → 65.12+).
[property-map value] tuples:logseq.property/type:many vs :one handlingvalidate-tx-report ensures integrityIn DB version, nodes represent both pages and blocks:
Node
├── Page (unique by tag combination)
│ ├── Journal pages (#Journal)
│ ├── Regular pages (#Page)
│ └── Class pages (#Tag)
└── Block (within pages)
├── Content blocks
├── Property blocks
└── Convertible to page via #Page tagPages are unique by their tag combination:
clojure;; Define a class with properties {:db/ident :user.class/Book :block/tags [:logseq.class/Tag] :block/title "Book" :logseq.property.class/extends :logseq.class/Root :logseq.property/schema-classes [:user.property/author :user.property/isbn :user.property/rating]}
clojure;; Number property with choices {:db/ident :user.property/rating :block/title "Rating" :logseq.property/type :number :logseq.property/cardinality :one :logseq.property/closed-values [1 2 3 4 5]}
When users need more information, reference:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→pass | 20,342 | 13,698 | -33% | 1 | 1 | 0% | 2,304 | 3,202 | +39% | 0 | 0 | — |
case-01 | fail→pass | 21,477 | 16,341 | -24% | 1 | 1 | 0% | 2,832 | 3,836 | +35% | 0 | 0 | — |
case-02 | fail→pass | 23,822 | 12,935 | -46% | 1 | 1 | 0% | 2,756 | 3,876 | +41% | 0 | 0 | — |
case-03 | fail→fail | 17,298 | 15,101 | -13% | 1 | 1 | 0% | 2,887 | 3,511 | +22% | 0 | 0 | — |
case-20 | pass→pass | 19,081 | 12,694 | -33% | 1 | 1 | 0% | 2,556 | 2,985 | +17% | 0 | 0 | — |
case-04 | pass→pass | 21,751 | 8,762 | -60% | 1 | 1 | 0% | 2,303 | 3,122 | +36% | 0 | 0 | — |
case-05 | fail→pass | 16,813 | 9,066 | -46% | 1 | 1 | 0% | 2,094 | 3,157 | +51% | 0 | 0 | — |
case-06 | pass→pass | 26,095 | 24,279 | -7% | 1 | 1 | 0% | 3,374 | 4,953 | +47% | 0 | 0 | — |
case-07 | fail→pass | 16,405 | 12,375 | -25% | 1 | 1 | 0% | 2,679 | 2,978 | +11% | 0 | 0 | — |
case-14 | fail→fail | 22,721 | 15,489 | -32% | 1 | 1 | 0% | 3,209 | 3,610 | +12% | 0 | 0 | — |
case-08 | fail→pass | 10,068 | 9,060 | -10% | 1 | 1 | 0% | 1,803 | 2,382 | +32% | 0 | 0 | — |
case-09 | fail→pass | 17,505 | 11,521 | -34% | 1 | 1 | 0% | 2,209 | 2,856 | +29% | 0 | 0 | — |
case-10 | fail→pass | 13,111 | 6,034 | -54% | 1 | 1 | 0% | 2,174 | 2,641 | +21% | 0 | 0 | — |
case-11 | fail→pass | 22,630 | 14,937 | -34% | 1 | 1 | 0% | 2,846 | 3,496 | +23% | 0 | 0 | — |
case-12 | fail→pass | 20,097 | 8,654 | -57% | 1 | 1 | 0% | 2,387 | 3,083 | +29% | 0 | 0 | — |
case-15 | fail→fail | 20,928 | 12,388 | -41% | 1 | 1 | 0% | 2,720 | 3,039 | +12% | 0 | 0 | — |
case-16 | fail→pass | 11,853 | 13,027 | +10% | 1 | 1 | 0% | 1,985 | 2,970 | +50% | 0 | 0 | — |
case-17 | pass→pass | 19,360 | 11,545 | -40% | 1 | 1 | 0% | 2,488 | 2,765 | +11% | 0 | 0 | — |
case-18 | fail→pass | 23,235 | 8,380 | -64% | 1 | 1 | 0% | 4,158 | 2,201 | -47% | 0 | 0 | — |
case-19 | fail→pass | 14,858 | 10,418 | -30% | 1 | 1 | 0% | 1,612 | 2,529 | +57% | 0 | 0 | — |
case-21 | fail→pass | 22,552 | 17,726 | -21% | 1 | 1 | 0% | 2,646 | 3,700 | +40% | 0 | 0 | — |
case-22 | fail→fail | 22,507 | 9,573 | -57% | 1 | 1 | 0% | 2,941 | 2,281 | -22% | 0 | 0 | — |
case-23 | fail→pass | 40,262 | 17,092 | -58% | 1 | 1 | 0% | 2,412 | 3,536 | +47% | 0 | 0 | — |
case-24 | fail→pass | 15,876 | 2,762 | -83% | 1 | 1 | 0% | 2,742 | 2,012 | -27% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +67 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.