Skip to content
logseq-to-obsidian logo

Logseq to Obsidian Migration

logseq-to-obsidian

Migrate Logseq graphs to Obsidian vaults. Use when the user wants to convert their Logseq notes to Obsidian format, migrate from Logseq, or mentions both Logseq and Obsidian in a migration context. Handles property conversion, admonition blocks, block references, journal renaming, collapsed state...

SKILL.md

Full skill instructions

Logseq to Obsidian Migration

Migrate Logseq graphs to clean Obsidian vaults while preserving content and structure.

Workflow

Step 1: Locate and Analyze the Graph

First, find the Logseq graph. Check current directory for pages/ and journals/ folders:

ls -la

If not in a Logseq graph, ask the user for the path.

Run the analysis script to detect patterns:

python3 scripts/​analyze_graph.py /​path/​to/​logseq/​graph --json

This outputs a JSON report of detected features (admonitions, block refs, properties, namespaces, etc.).

Step 2: Check for Existing Config

Check if a config file already exists:

cat /​path/​to/​logseq/​graph/​.logseq-to-obsidian/​config.json 2>/​dev/​null || echo "No config found"

If config exists, ask: "Found existing migration config. Use these settings, or reconfigure?"

If using existing config, skip to Step 4.

Step 3: Gather Preferences and Write Config

Based on analysis, ask ONLY the questions that matter. Skip questions for features not detected.

IMPORTANT: The AskUserQuestion tool has a maximum of 4 questions per call. If you have more than 4 questions, ask in multiple rounds. Never skip questions.

Round 1 — Core questions (always ask)
  1. Output folder location (default: ../​obsidian-vault)
  2. "Keep all bullets or flatten top-level to paragraphs?" (recommend flatten for document-like notes)
  3. "Place pages in vault root or in a pages/ subfolder?" (recommend root — cleaner structure)
  4. "Organize pages by parent?" (recommend yes — pages linked from only one parent get nested, reducing sidebar clutter)
Round 2 — Conditional questions (ask if detected, in a second AskUserQuestion call)
  • Namespaces found → "Convert Parent/​Child pages to folder hierarchy?"
  • Block references found → "Flag block refs for manual fix, or remove?"

If no conditional questions are needed, skip Round 2.

Automatic defaults (never ask)
  • Journals → Daily/ folder, YYYY-MM-DD.md format
  • Properties → YAML frontmatter
  • Admonitions → Obsidian callouts
  • collapsed:: true → Remove
  • logseq.order-list-type:: number → Standard numbered lists
  • Image sizing {:height X, :width Y} → Remove

After gathering preferences, create the config directory and write the config file:

mkdir -p /​path/​to/​logseq/​graph/​.logseq-to-obsidian

Then use the Write tool to create /​path/​to/​logseq/​graph/​.logseq-to-obsidian/​config.json:

{
  "version": 1,
  "source": "/​absolute/​path/​to/​logseq/​graph",
  "output": "/​absolute/​path/​to/​obsidian/​vault",
  "preferences": {
    "flattenTopLevel": false,
    "namespacesToFolders": false,
    "organizeByParent": false,
    "pagesInRoot": false,
    "blockRefs": "flag",
    "journalsFolder": "Daily"
  }
}

Important: Use absolute paths in the config file.

Step 4: Run Dry-Run Migration

Always run dry-run first using the config:

python3 scripts/​migrate.py --config /​path/​to/​logseq/​graph/​.logseq-to-obsidian/​config.json --dry-run

Show the user:

  • Number of files to process
  • Sample of 2-3 converted files (before/​after)
  • Any warnings or issues detected

Step 5: Execute Migration

After user confirms:

python3 scripts/​migrate.py --config /​path/​to/​logseq/​graph/​.logseq-to-obsidian/​config.json

The script:

  1. Creates output directory structure
  2. Processes all .md files in pages/ and journals/
  3. Copies assets/ folder
  4. Reports progress and any issues

Step 6: Post-Migration Guidance

After migration, provide:

  1. Recommended Obsidian plugins for Logseq refugees:

    • Calendar (visual calendar sidebar)
    • Periodic Notes (daily/​weekly notes)
    • Outliner (folding, move items up/​down)
    • Dataview (query notes, replaces Logseq queries)
  2. Manual fixes needed (if any):

    • Block references flagged with <!-- TODO: -->
    • Logseq queries that need Dataview conversion
  3. Quick start: "Open Obsidian → Open folder as vault → Select the output folder"

Config File Reference

The config file is stored at .logseq-to-obsidian/​config.json in the Logseq graph directory.

Schema

{
  "version": 1,
  "source": "/​absolute/​path/​to/​logseq/​graph",
  "output": "/​absolute/​path/​to/​obsidian/​vault",
  "preferences": {
    "flattenTopLevel": false,
    "namespacesToFolders": false,
    "organizeByParent": false,
    "pagesInRoot": false,
    "blockRefs": "flag",
    "journalsFolder": "Daily"
  }
}

Fields

FieldTypeRequiredDefaultDescription
versionnumberNo1Config schema version
sourcestringYes-Absolute path to Logseq graph
outputstringYes-Absolute path to output Obsidian vault
preferences.flattenTopLevelbooleanNofalseConvert top-level bullets to paragraphs
preferences.namespacesToFoldersbooleanNofalseConvert A/​B pages to folder hierarchy
preferences.organizeByParentbooleanNofalseNest pages under their parent's folder (pages with exactly 1 incoming link)
preferences.pagesInRootbooleanNofalsePlace pages in vault root instead of pages/ folder
preferences.blockRefsstringNo"flag""flag" or "remove"
preferences.journalsFolderstringNo"Daily"Folder name for journal files

Re-running Migrations

Users can edit the config file directly and re-run without going through questions again:

python3 scripts/​migrate.py --config .logseq-to-obsidian/​config.json

Or via the Node wrapper:

logseq-to-obsidian --config .logseq-to-obsidian/​config.json

Conversion Reference

See references/​patterns.md for complete Logseq→Obsidian syntax mappings.

Script Options

analyze_graph.py

python3 scripts/​analyze_graph.py <logseq-path> [--sample-size N] [--json]
  • --sample-size: Number of files to analyze (default: 50)
  • --json: Output raw JSON only (for parsing)

migrate.py

python3 scripts/​migrate.py --config <config-file> [--dry-run] [--verbose]
python3 scripts/​migrate.py <logseq-path> --output <obsidian-path> [options]

Config mode (recommended):

  • --config: Path to config JSON file

CLI mode options:

  • --dry-run: Preview without writing files
  • --journals-folder NAME: Journal folder name (default: "Daily")
  • --flatten-top-level: Convert top-level bullets to paragraphs
  • --namespaces-to-folders: Convert A/​B pages to A/​B.md in folders
  • --organize-by-parent: Nest pages under their parent's folder (pages linked from exactly one parent)
  • --pages-in-root: Place pages in vault root instead of pages/ folder
  • --block-refs [flag|remove]: How to handle block references (default: flag)
  • --verbose: Show detailed progress

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
Any Summary logo
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View