<< All versions

Skill v1.0.0

currentLLM-judged scan98/100
debanjandhar12/logseq-astro-box/logseq-properties-and-tags
──Details
PublishedOctober 23, 2026 at 07:28 PM
Content Hashsha256:6a57ee1fe57101ff...
Git SHA068146ee2b9f
──Files
Files (1 file, 4.0 KB)
SKILL.md4.0 KBactive
SKILL.md · 67 lines · 4.0 KB

version: "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:

  1. Property definitions (schema) [a.k.a. property pages]
  • A property key such as rating, authors, or zotero_key exists 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.
  1. Property values (data)
  • Blocks/pages store values for property keys as structural DB data.
  • Do not emit key:: value text 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:

  1. 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.
  1. Tagged blocks
  • Blocks tagged by the tag through actual DB tags/classes.
  • Do not assume a #tag string in block text equals a DB tag. Use tag tools or :block/tags queries for actual tagged blocks.

Special Tags and Properties

Several special tags change the visual look or behavior of a normal block:

  • #Code converts 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.
  • #Math converts block content to a math block. For example, x^2 renders as a math expression. Alternatively, use markdown math syntax. However, do not use markdown $$ syntax together with Math tag.
  • #Task converts the block to a task. Change logseq.property/status to values such as Todo, Backlog, Canceled, Doing, Done or empty string (default: empty string).
  • #Query converts the block to a query block. The visible block content is the query title; set the visible block's logseq.property/query to the query text (advanced queries wrapped in a {:query ...} map work directly).
  • #Quote converts the block to a quote block.

Several special properties change rendering or behavior:

  • logseq.property/background-color changes block background color.

[For changing text color, you must use HTML. Logseq DB does not have logseq.property/color]

  • logseq.property/order-list-type set to number makes 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 LogseqDataScriptQueryTool examples that use :in $ ?value plus a separate inputs array 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 #Code tag.
All versions