Skill v1.0.0
currentLLM-judged scan98/100version: "1.0.0" name: logseq-properties-and-tags description: Use when creating, reading, updating, or reasoning about Logseq DB graph properties, property schemas, tags/classes, inherited tag properties, special tags, or special properties. disable-model-invocation: false built-in-skill: true built-in-skill-user-controllable: false
Logseq Properties
Properties are DB entities. Think of them as a two-layer model:
- Property definitions (schema) [a.k.a. property pages]
- A property key such as
rating,authors, orzotero_keyexists as an entity. - It may define schema: type, cardinality, visibility, classes, and optional default value.
- Discover the property schema/ident before setting or querying values. Display names are not stable DB idents.
- Property values (data)
- Blocks/pages store values for property keys as structural DB data.
- Do not emit
key:: valuetext to set a DB property unless the user explicitly wants Markdown text. - A property can have one value or many values depending on the property schema's cardinality.
Logseq Tags
Tags are DB entities that behave like classes. Think of them as a two-layer model:
- Tag schema [a.k.a. tag page]
- Defines properties that are auto-inherited by blocks tagged with it.
- Each tagged block can define the inherited property values independently.
- Tags provide the property schema, not per-block property values.
- Tags can extend other tags.
- Tagged blocks
- Blocks tagged by the tag through actual DB tags/classes.
- Do not assume a
#tagstring in block text equals a DB tag. Use tag tools or:block/tagsqueries for actual tagged blocks.
Special Tags and Properties
Several special tags change the visual look or behavior of a normal block:
#Codeconverts the block to a code block. Alternatively, you can use markdown ``language\n`syntax. However, do not use markdown syntax together with the#Code` tag.#Mathconverts block content to a math block. For example,x^2renders as a math expression. Alternatively, use markdown math syntax. However, do not use markdown $$ syntax together with Math tag.#Taskconverts the block to a task. Changelogseq.property/statusto values such asTodo,Backlog,Canceled,Doing,Doneor empty string (default: empty string).#Queryconverts the block to a query block. The visible block content is the query title; set the visible block'slogseq.property/queryto the query text (advanced queries wrapped in a{:query ...}map work directly).#Quoteconverts the block to a quote block.
Several special properties change rendering or behavior:
logseq.property/background-colorchanges block background color.
[For changing text color, you must use HTML. Logseq DB does not have logseq.property/color]
logseq.property/order-list-typeset tonumbermakes bullets appear as numbers.
Other Special Tags
- All property pages are tagged with
#Property/:logseq.class/Property. - All tags are tagged with
#Tag/:logseq.class/Tag. - All journal pages are tagged with
#Journal/:logseq.class/Journal.
For low-level query shapes, use the logseq-datascript-queries skill instead of repeating query logic here.
Gotchas
- Do not write
(tags ...)as if it were Datalog / Datascript. - When storing a Datalog query in a query block, the stored query must be self-contained unless Logseq query-block inputs are also configured. Do not directly copy
LogseqDataScriptQueryToolexamples that use:in $ ?valueplus a separateinputsarray into a query block; rewrite constants into the stored query, preferably with the tested tag-entity/title patterns. - All special properties are under logseq.property namespace. Using a different namespace will not change rendering or behavior. Always provide namespace with indent when calling upsert block property.
- Always provide full indent with namespace when calling upsert block property.
- For code blocks, before changing logseq.property.code/lang, add the
#Codetag.