skills/kaotypr/skills/kao-logseq

kao-logseq

SKILL.md

Logseq Graph — File-Level Operations Guide

Overview

This skill covers file-level operations on Logseq graphs — creating and editing markdown files that Logseq reads as pages, journals, and blocks. This graph uses the NOW/LATER workflow (not TODO/DOING).

You can: create/edit pages, write journal entries, manage tasks, build templates, write queries, link knowledge, and configure logseq/config.edn.

You cannot (and should not attempt): GUI-only operations, plugin management, whiteboard features, or anything requiring the Logseq desktop app.

Critical Rules

  1. Every content line starts with - — Logseq is an outliner. Every block (paragraph, heading, task, property at block level) must begin with a bullet - . Lines without - are continuation lines of the previous block. Use 2-space indentation for nesting (not tabs, not 4 spaces).
  2. Properties use double-colonkey:: value, not key: value. Single colon is YAML; Logseq requires double colon.
  3. Never generate block UUIDs or ((block-ref)) — Block references like ((64a7b...)) are generated by Logseq. Never fabricate them. Use [[page links]] instead.
  4. Journal filenames use yyyy_MM_dd.md — Example: 2026_03_15.md for March 15, 2026. Stored in journals/.
  5. Namespace files use ___ (triple underscore) — A page named Projects/Alpha maps to pages/Projects___Alpha.md.
  6. Don't modify logseq/ directory unless askedlogseq/config.edn, logseq/custom.css, and logseq/custom.js are user configuration. Only touch when explicitly requested.
  7. Page-level properties go at the top, before any blocks — They are NOT prefixed with - .

Graph Structure

graph-root/
├── journals/          # Daily journal pages (yyyy_MM_dd.md)
├── pages/             # Named pages (*.md)
│   └── contents.md    # Sidebar "Contents" page
├── logseq/
│   ├── config.edn     # Graph configuration
│   ├── custom.css      # Custom styles
│   └── custom.js       # Custom scripts (if present)
└── assets/            # Uploaded images and files (if present)

Block Syntax

Every piece of content in Logseq is a block. Blocks are list items starting with - .

Correct

- This is a block
- This is another block
  - This is a child block (indented 2 spaces)
    - Grandchild block
- A block with a longer paragraph that
  continues on the next line (no `- ` prefix on continuation)

Incorrect

This line is NOT a block — missing `- ` prefix.

- Block one
    - Wrong: 4-space indent (use 2 spaces)
- Block two
	- Wrong: tab indent (use 2 spaces, never tabs)

Headings

Headings are blocks that start with # after the bullet:

- # Heading 1
- ## Heading 2
- ### Heading 3

Block Properties

Properties attached to a specific block appear on indented lines immediately after the block:

- Meet with design team
  scheduled:: [[2026-03-15]]
  priority:: high

Page Management

Creating Pages

Create a file in pages/ with the page name as filename. The filename becomes the page title.

File: pages/My Project.md

tags:: [[project]], [[active]]
alias:: my-proj
icon:: 🚀

- # My Project
  - This is the first block on the page
  - Another block with details

Page-Level Properties

Page properties appear at the very top of the file, without - prefix:

tags:: [[design]], [[frontend]]
alias:: ui-spec
category:: documentation

- # UI Specification
  - Content starts here

Common page properties:

  • tags:: — Categorize the page (comma-separated or [[linked]])
  • alias:: — Alternative names for the page
  • icon:: — Emoji icon displayed in sidebar and links
  • public::true/false for publishing

Namespaces

Namespaces create hierarchical page relationships using / in the page name.

Page Name Filename
Projects/Alpha pages/Projects___Alpha.md
Projects/Alpha/Tasks pages/Projects___Alpha___Tasks.md
Areas/Health pages/Areas___Health.md

The parent page Projects should also exist as pages/Projects.md.

Journal Entries

Journal files live in journals/ with the format yyyy_MM_dd.md.

File: journals/2026_03_15.md

- Daily standup notes
  - Discussed sprint progress
  - Blocker: API rate limits
- NOW Fix rate limiter configuration #[[dev tasks]]
  SCHEDULED: <2026-03-15 Sun>
- Read [[Architecture Decision Records]] article
  - Key takeaway: ADRs should be immutable once accepted

No page-level properties or frontmatter needed for journals — the filename determines the date.

Task Management

This graph uses the NOW/LATER workflow (:preferred-workflow :now in config.edn).

Task Markers

Marker Meaning
NOW Currently working on
LATER Planned, not started
DOING In progress (alias for NOW)
DONE Completed
CANCELLED Abandoned

Syntax

- NOW Write the API documentation
- LATER Review pull request #42
- DONE Set up CI pipeline
- CANCELLED Migrate to MongoDB

Priority

Add priority markers after the task marker:

- NOW [#A] Critical: fix production bug
- LATER [#B] Update dependencies
- LATER [#C] Refactor test utilities

Priority levels: [#A] (urgent) > [#B] (medium) > [#C] (low).

Scheduled & Deadline

- LATER Write quarterly report
  SCHEDULED: <2026-03-20 Fri>
- NOW Prepare presentation
  DEADLINE: <2026-03-18 Wed>

Date format inside angle brackets: <yyyy-MM-dd Day> where Day is the 3-letter abbreviation.

Repeating Tasks

- LATER Weekly review
  SCHEDULED: <2026-03-15 Sun .+1w>
- LATER Monthly report
  SCHEDULED: <2026-03-01 Sun +1m>

Repeat markers: .+1d (day), .+1w (week), .+1m (month). The . prefix means "from completion date"; without . means "from scheduled date".

Knowledge Linking

Page References

Use [[Page Name]] to link to another page. If the page doesn't exist, Logseq creates it on first click. Always wrap page names in [[ ]] — bare text like Project Alpha won't create a link; it must be [[Project Alpha]].

- Discussed [[Project Alpha]] timeline with [[John]]
- See also [[Architecture Decision Records]]

Tags

Tags are shorthand page references. #tag and #[[multi word tag]] both create links.

- Fix login bug #urgent #[[needs review]]
- Meeting notes #meeting #[[Q1 2026]]

When to use which:

  • [[Page Name]] — When referencing a specific page inline within prose
  • #tag — For categorization/labeling at the end of a block
  • #[[multi word]] — For multi-word tags

Embedding Pages

- {{embed [[Page Name]]}}

This renders the full content of the linked page inline.

Templates

Templates are blocks with a template:: property. They can be inserted into any page via the /template command in Logseq.

Defining a Template

File: pages/Templates.md

- # Templates
  - template:: meeting-notes
    template-including-parent:: false
    - ## Meeting:
      - **Date:**
      - **Attendees:**
      - **Agenda:**
        -
      - **Action Items:**
        - LATER
  - template:: project-page
    template-including-parent:: false
    - **Status:**
      - **Owner:**
      - **Start Date:**
      - ## Goals
        -
      - ## Tasks
        - LATER
      - ## Notes
        -

Template Properties

  • template:: name — The name used to invoke the template
  • template-including-parent:: false — Don't include the template definition block itself when inserting

Queries

Logseq supports inline queries to dynamically list blocks matching criteria.

Simple Queries

- {{query [[page name]]}}
- {{query (and [[page1]] [[page2]])}}
- {{query (or #tag1 #tag2)}}
- {{query (not [[page]])}}
- {{query (task NOW LATER)}}
- {{query (priority A)}}
- {{query (between -7d today)}}

For comprehensive query syntax including advanced Datalog queries, see references/query-reference.md.

Recipes

Create a Meeting Notes Page

File: pages/Meeting___2026-03-15 Sprint Review.md

tags:: [[meeting]], [[sprint-review]]
date:: [[2026-03-15]]

- # Sprint Review — 2026-03-15
  - **Attendees:** [[Alice]], [[Bob]], [[Carol]]
  - ## Discussion
    - Reviewed sprint velocity
    - Demo of new dashboard feature
  - ## Action Items
    - NOW [#A] Alice: Deploy dashboard to staging
      DEADLINE: <2026-03-17 Tue>
    - LATER Bob: Update API documentation
      SCHEDULED: <2026-03-18 Wed>
    - LATER Carol: Schedule user testing sessions

Add Tasks to Today's Journal

File: journals/2026_03_15.md

- Morning planning
  - NOW [#A] Fix authentication bug in [[Project Alpha]] #urgent
    DEADLINE: <2026-03-15 Sun>
  - LATER [#B] Write tests for payment module
    SCHEDULED: <2026-03-16 Mon>
  - LATER [#C] Clean up unused CSS #[[tech debt]]
- Standup notes
  - Yesterday: completed API refactor
  - Today: focusing on auth bug
  - Blockers: none

Set Up a Project Namespace

Create the parent page and child pages:

File: pages/Projects___WebApp.md

tags:: [[project]], [[active]]
status:: in-progress

- # WebApp Project
  - ## Overview
    - Customer-facing web application
  - ## Sub-pages
    - [[Projects/WebApp/Architecture]]
    - [[Projects/WebApp/Tasks]]
    - [[Projects/WebApp/Changelog]]

File: pages/Projects___WebApp___Architecture.md

tags:: [[architecture]], [[Projects/WebApp]]

- # Architecture
  - ## Stack
    - Frontend: React + TypeScript
    - Backend: Node.js + PostgreSQL
  - ## Decisions
    - ADR-001: Use REST over GraphQL — simplicity wins for MVP

File: pages/Projects___WebApp___Tasks.md

tags:: [[tasks]], [[Projects/WebApp]]

- # Tasks
  - NOW [#A] Set up CI/CD pipeline
  - LATER [#B] Implement user authentication
  - LATER [#C] Add dark mode support

References

  • Syntax Reference — Text formatting, properties, file naming, admonitions
  • Query Reference — Simple queries, advanced Datalog queries, practical examples
Weekly Installs
1
Repository
kaotypr/skills
First Seen
4 days ago
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1