skills/c0ntr0lledcha0s/migrating-to-db/SKILL.md
Expert guidance for migrating Logseq graphs from Markdown (MD) format to the new Database (DB) format. Auto-invokes when users ask about MD to DB migration, converting graphs, import options, data transformation, or compatibility between Logseq versions. Covers migration strategies, common issues, and best practices.
npx skillsauth add aiskillstore/marketplace migrating-to-dbInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill auto-invokes when:
You are an expert in migrating Logseq graphs from MD (Markdown) format to DB (Database) format.
| Feature | MD Version | DB Version | |---------|------------|------------| | Storage | Markdown files | SQLite database | | Tags | Page references | Classes with properties | | Properties | Text strings | Typed values | | Queries | Limited | Full Datalog | | Sync | File-based | Real-time (subscription) | | Performance | File I/O dependent | Optimized queries |
Important: Logseq DB is still in alpha. Consider:
Before migrating, assess your graph:
# Create timestamped backup
cp -r ~/logseq/my-graph ~/logseq/my-graph-backup-$(date +%Y%m%d)
# Or compress
tar -czvf my-graph-backup.tar.gz ~/logseq/my-graph
Pages to review:
Properties to review:
Tags to review:
| MD Pattern | DB Options | Decision Needed |
|------------|------------|-----------------|
| #tag | Class or page ref | Which tags become classes? |
| [[page]] | Node reference | Keep as reference |
| property:: value | Typed property | What type? |
| namespace/page | Separate page or hierarchy | Flatten or nest? |
When importing to DB, you'll choose:
Tag Handling:
Namespace Handling:
a/b/c → single page "a/b/c"Property Handling:
;; Check page count matches
[:find (count ?p)
:where [?p :block/tags ?t]
[?t :db/ident :logseq.class/Page]]
;; Check for orphaned blocks
[:find (pull ?b [:block/title])
:where [?b :block/title _]
(not [?b :block/page _])
(not [?b :block/tags ?t]
[?t :db/ident :logseq.class/Page])]
;; Verify properties migrated
[:find ?prop-name (count ?b)
:where [?b ?prop _]
[?p :db/ident ?prop]
[?p :block/title ?prop-name]
[(clojure.string/starts-with? (str ?prop) ":user.property")]]
Symptom: Numbers/dates stored as strings
Solution: Manually update property types
;; In DB, update property type
{:db/ident :user.property/rating
:logseq.property/type :number} ; was :default
Symptom: Tags didn't become proper classes
Solution: Convert pages to classes
#Tag to make it a classSymptom: [[page]] links not working
Cause: Page names changed during migration
Solution: Use find/replace or query to identify broken refs
[:find ?ref-text
:where
[?b :block/title ?title]
[(re-find #"\[\[.*?\]\]" ?title) ?ref-text]
(not [_ :block/title ?ref-text])]
Symptom: project/tasks and project/notes merged
Solution: Pre-migration, rename pages to avoid conflicts
Symptom: Old queries don't work
Reason: Different attribute names
| MD Attribute | DB Attribute |
|--------------|--------------|
| :block/content | :block/title |
| :block/name | :block/title |
| :page/tags | :block/tags |
Clean up your graph
Document your structure
Plan your classes
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.